-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy path.sqlfluff
More file actions
50 lines (42 loc) · 1.84 KB
/
Copy path.sqlfluff
File metadata and controls
50 lines (42 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# https://docs.sqlfluff.com/en/stable/configuration/setting_configuration.html
[sqlfluff]
dialect = postgres
max_line_length = 120
# Allow "SELECT *"
exclude_rules = ambiguous.column_count, structure.column_order
# CPU processes to use while linting.
# The default is "single threaded" to allow easy debugging, but this
# is often undesirable at scale.
# If positive, just implies number of processes.
# If negative or zero, implies number_of_cpus - specified_number.
# e.g. -1 means use all processors but one. 0 means all cpus.
processes = -1
[sqlfluff:indentation]
# When addressing both indentation and line-length, implicit indents allow a
# slightly more compact layout, without significant drawbacks in legibility.
# They also enable a style much closer to some established style guides.
# https://docs.sqlfluff.com/en/stable/configuration/layout.html#implicit-indents
implicit-indents = require
# This says to do "FROM table alias" instead of "FROM table AS alias"
[sqlfluff:rules:aliasing.table]
aliasing = implicit
# Capitalize keywords, types, etc but not our identifiers
[sqlfluff:rules:capitalisation.keywords]
capitalisation_policy = upper
[sqlfluff:rules:capitalisation.identifiers]
extended_capitalisation_policy = lower
[sqlfluff:rules:capitalisation.functions]
extended_capitalisation_policy = lower
[sqlfluff:rules:capitalisation.literals]
capitalisation_policy = upper
[sqlfluff:rules:capitalisation.types]
extended_capitalisation_policy = upper
# This fixes the \gset syntax like :'user1_id'
[sqlfluff:layout:type:colon]
spacing_before = touch
spacing_after = touch
# This allows these unreserved keywords to be used as column names
# https://docs.sqlfluff.com/en/stable/reference/rules.html#rule-references.keywords
# https://www.postgresql.org/docs/current/sql-keywords-appendix.html
[sqlfluff:rules:references.keywords]
ignore_words = name, version