-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.sqlfluff
More file actions
153 lines (125 loc) · 3.6 KB
/
.sqlfluff
File metadata and controls
153 lines (125 loc) · 3.6 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
[sqlfluff]
# https://docs.sqlfluff.com/en/stable/configuration.html#default-configuration
verbose = 0
nocolor = False
# Run 'sqlfluff dialects' for supported dialects
dialect = tsql
templater = jinja
rules = None
exclude_rules = L011,L016,L031,L044
recurse = 0
output_line_length = 120
runaway_limit = 10
ignore = None
ignore_templated_areas = True
encoding = autodetect
disable_noqa = False
sql_file_exts = .sql,.sql.j2,.dml,.ddl
fix_even_unparsable = False
large_file_skip_char_limit = 0
large_file_skip_byte_limit = 20000
[sqlfluff:indentation]
# https://docs.sqlfluff.com/en/stable/layout.html#configuring-indent-locations
indented_joins = False
indented_ctes = False
indented_using_on = True
indented_on_contents = True
template_blocks_indent = True
# Layout configuration
# https://docs.sqlfluff.com/en/stable/layout.html#configuring-layout-and-spacing
[sqlfluff:layout:type:comma]
line_position = leading
[sqlfluff:layout:type:binary_operator]
line_position = leading
[sqlfluff:templater]
unwrap_wrapped_queries = True
[sqlfluff:templater:jinja]
apply_dbt_builtins = True
# Some rules can be configured directly from the config common to other rules
[sqlfluff:rules]
tab_space_size = 2
max_line_length = 120
indent_unit = space
allow_scalar = True
single_table_references = consistent
unquoted_identifiers_policy = all
# Some rules have their own specific config
[sqlfluff:rules:L003]
hanging_indents = False
[sqlfluff:rules:L010]
# Keywords
capitalisation_policy = upper
[sqlfluff:rules:L011]
# Aliasing preference for tables
aliasing = implicit
[sqlfluff:rules:L012]
# Aliasing preference for columns
aliasing = explicit
[sqlfluff:rules:L013]
# Column expressions
allow_scalar = False
[sqlfluff:rules:L014]
# Unquoted identifiers
extended_capitalisation_policy = lower
[sqlfluff:rules:L016]
# Line length
ignore_comment_lines = False
ignore_comment_clauses = False
[sqlfluff:rules:L026]
# References must be in FROM clause
# Disabled for some dialects (e.g. bigquery)
force_enable = False
[sqlfluff:rules:L029]
# Keywords should not be used as identifiers.
unquoted_identifiers_policy = aliases
quoted_identifiers_policy = none
# Comma separated list of words to ignore for this rule
ignore_words = timestamp
ignore_words_regex = None
[sqlfluff:rules:L030]
# Function names
extended_capitalisation_policy = upper
[sqlfluff:rules:L031]
# Avoid table aliases in from clauses and join conditions.
# Disabled for some dialects (e.g. bigquery)
force_enable = False
[sqlfluff:rules:L036]
wildcard_policy = single
[sqlfluff:rules:L038]
# Trailing commas
select_clause_trailing_comma = forbid
[sqlfluff:rules:L040]
# Null & Boolean Literals
capitalisation_policy = consistent
[sqlfluff:rules:L042]
# By default, allow subqueries in from clauses, but not join clauses
forbid_subquery_in = join
[sqlfluff:rules:L047]
# Consistent syntax to count all rows
prefer_count_1 = False
prefer_count_0 = False
[sqlfluff:rules:L051]
# Fully qualify JOIN clause
fully_qualify_join_types = inner
[sqlfluff:rules:L052]
# Semi-colon formatting approach
multiline_newline = True
# Disabled for now as causing issues with tsql
require_final_semicolon = False
[sqlfluff:rules:L057]
# Special characters in identifiers
unquoted_identifiers_policy = all
quoted_identifiers_policy = all
allow_space_in_identifier = False
additional_allowed_characters = None
ignore_words = None
ignore_words_regex = None
[sqlfluff:rules:L059] # Unnecessary quoted identifier
ignore_words = date
[sqlfluff:rules:L062]
# Comma separated list of blocked words that should not be used
blocked_words = None
blocked_regex = None
[sqlfluff:rules:L063]
# Data Types
extended_capitalisation_policy = upper