forked from sqlfluff/sqlfluff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LT01-missing.yml
51 lines (43 loc) · 1.11 KB
/
LT01-missing.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
rule: LT01
test_fail_no_space_after_using_clause:
fail_str: select * from a JOIN b USING(x)
fix_str: select * from a JOIN b USING (x)
test_pass_newline_after_using_clause:
# Check LT01 passes if there's a newline between
pass_str: |
select * from a JOIN b USING
(x)
test_fail_cte_no_space_after_as:
# Check fixing of single space rule when space is missing
fail_str: WITH a AS(select 1) select * from a
fix_str: WITH a AS (select 1) select * from a
test_fail_multiple_spaces_after_as:
# Check fixing of single space rule on multiple spaces
fail_str: WITH a AS (select 1) select * from a
fix_str: WITH a AS (select 1) select * from a
test_fail_cte_newline_after_as:
# Check fixing of replacing newline with space
fail_str: |
WITH a AS
(
select 1
)
select * from a
fix_str: |
WITH a AS (
select 1
)
select * from a
test_fail_cte_newline_and_spaces_after_as:
# Check stripping newlines and extra whitespace
fail_str: |
WITH a AS
(
select 1
)
select * from a
fix_str: |
WITH a AS (
select 1
)
select * from a