-
Notifications
You must be signed in to change notification settings - Fork 0
/
.sqlfluff
76 lines (56 loc) · 1.72 KB
/
.sqlfluff
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
# SPDX-FileCopyrightText: 2022 Impulso Gov <[email protected]>
#
# SPDX-License-Identifier: MIT
[sqlfluff]
verbose = 0
nocolor = False
dialect = postgres
templater = jinja
rules = None
recurse = 0
output_line_length = 79
runaway_limit = 10
ignore_templated_areas = False
# Comma separated list of file extensions to lint.
# NB: This config will only apply in the root folder.
sql_file_exts = .sql,.sql.j2,.dml,.ddl
### OPINIONATED DEFAULTS
# Some rules can be configured directly from the config common to other rules.
[sqlfluff:rules]
tab_space_size = 4
max_line_length = 79
indent_unit = space
allow_scalar = True
single_table_references = unqualified
unquoted_identifiers_policy = all
[sqlfluff:layout:type:comma]
line_position = trailing
[sqlfluff:indentation]
indented_joins = False
template_blocks_indent = True
[sqlfluff:templater]
unwrap_wrapped_queries = True
# Excluding this rule will allow USING
exclude_rules = L032,L034
[sqlfluff:rules:L010] # Keywords
capitalisation_policy = upper
[sqlfluff:rules:L014] # Unquoted identifiers
extended_capitalisation_policy = lower
[sqlfluff:rules:L016]
ignore_comment_lines = False
[sqlfluff:rules:L029] # Keyword identifiers
unquoted_identifiers_policy = all
[sqlfluff:rules:L030] # Function names
capitalisation_policy = lower
[sqlfluff:rules:L038]
select_clause_trailing_comma = forbid
[sqlfluff:rules:L040] # Null & Boolean Literals
capitalisation_policy = lower
[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
[sqlfluff:templater:jinja]
apply_dbt_builtins = True
load_macros_from_path = macros,dbt_packages/dbt_utils/macros