forked from sqlfluff/sqlfluff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LT02-tab-space.yml
82 lines (65 loc) · 1.53 KB
/
LT02-tab-space.yml
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
rule: LT02
spaces_pass_default:
pass_str: "SELECT\n 1"
spaces_fail:
fail_str: "SELECT\n 1"
fix_str: "SELECT\n\t1"
configs:
rules:
indent_unit: tab
spaces_fail_custom_tab_space_size:
fail_str: "SELECT\n MAX(\n a\n )"
fix_str: "SELECT\n\tMAX(\n\t\ta\n\t)"
configs:
rules:
indent_unit: tab
tab_space_size: 2
tabs_fail_default:
fail_str: "SELECT\n\t\t1\n"
fix_str: "SELECT\n 1\n"
tabs_fail_default_set_tab_space_size:
fail_str: "SELECT\n\t\t1\n"
fix_str: "SELECT\n 1\n"
configs:
rules:
tab_space_size: 2
tabs_pass:
pass_str: "SELECT\n\t1"
configs:
rules:
indent_unit: tab
indented_comments:
pass_str: |
SELECT
a, -- Some comment
longer_col -- A lined up comment
FROM spam
indented_comments_default_config:
fail_str: |
SELECT
a, -- Some comment
longer_col -- A lined up comment
FROM spam
# The rule will only fix the indent before the select targets.
# Here tab indent is replaced with spaces.
fix_str: |
SELECT
a, -- Some comment
longer_col -- A lined up comment
FROM spam
indented_comments_tab_config:
fail_str: |
SELECT
a, -- Some comment
longer_col -- A lined up comment
FROM spam
# The rule will only fix the indent before the select targets.
# Here spaces indent is replaced with tab.
fix_str: |
SELECT
a, -- Some comment
longer_col -- A lined up comment
FROM spam
configs:
rules:
indent_unit: tab