forked from sqlfluff/sqlfluff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LT01-commas.yml
53 lines (43 loc) · 1.14 KB
/
LT01-commas.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
rule: LT01
test_fail_whitespace_before_comma:
fail_str: SELECT 1 ,4
fix_str: SELECT 1, 4
test_fail_whitespace_before_comma_template:
fail_str: |
{{ 'SELECT 1 ,4' }}
configs:
core:
ignore_templated_areas: false
test_pass_errors_only_in_templated_and_ignore:
pass_str: |
{{ 'SELECT 1 ,4' }}, 5, 6
configs:
core:
ignore_templated_areas: true
test_fail_errors_only_in_non_templated_and_ignore:
fail_str: |
{{ 'SELECT 1, 4' }}, 5 , 6
fix_str: |
{{ 'SELECT 1, 4' }}, 5, 6
configs:
core:
ignore_templated_areas: true
test_pass_single_whitespace_after_comma:
pass_str: SELECT 1, 4
test_pass_single_whitespace_after_comma_template:
pass_str: |
{{ 'SELECT 1, 4' }}
configs:
core:
ignore_templated_areas: false
test_fail_multiple_whitespace_after_comma:
fail_str: SELECT 1, 4
fix_str: SELECT 1, 4
test_fail_no_whitespace_after_comma:
fail_str: SELECT 1,4
fix_str: SELECT 1, 4
test_fail_no_whitespace_after_comma_2:
fail_str: SELECT FLOOR(dt) ,count(*) FROM test
fix_str: SELECT FLOOR(dt), count(*) FROM test
test_pass_bigquery_trailing_comma:
pass_str: SELECT 1, 2,