forked from sqlfluff/sqlfluff
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLT01-trailing.yml
More file actions
40 lines (31 loc) · 816 Bytes
/
Copy pathLT01-trailing.yml
File metadata and controls
40 lines (31 loc) · 816 Bytes
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
rule: LT01
test_fail_trailing_whitespace:
fail_str: "SELECT 1 \n"
fix_str: "SELECT 1\n"
test_fail_trailing_whitespace_on_initial_blank_line:
fail_str: " \nSELECT 1 \n"
fix_str: "\nSELECT 1\n"
test_pass_trailing_whitespace_before_template_code:
pass_str: |
SELECT
{% for elem in ["a", "b"] %}
{{ elem }},
{% endfor %}
0
test_fail_trailing_whitespace_and_whitespace_control:
fail_str: "{%- set temp = 'temp' -%}\n\nSELECT\n 1, \n 2,\n"
fix_str: "{%- set temp = 'temp' -%}\n\nSELECT\n 1,\n 2,\n"
test_pass_macro_trailing:
pass_str: |
{% macro foo(bar) %}
{{bar}}
{% endmacro %}
with base as (
select
a,
b,
{{ foo(1) }} as c
from tblb
)
select *
from tbl