Skip to content

Make comment safety check less sensitive to whitespace changes #434

Closed
@tconbeer

Description

@tconbeer

This fails the safety check, because we first replace the -- and THEN get rid of whitespace. Need to flip that order.

-{#-- We must add a fake join key in case additional grouping variables are not provided --#}
-{#-- Redshift does not allow for dynamically created join conditions (e.g. full join on 1 = 1 --#}
-{#-- The same logic is used in equal_rowcount. In case of changes, maintain consistent logic --#}
-{% set group_by_columns = ['id_dbtutils_test_fewer_rows_than'] + group_by_columns %}
-{% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}
+    {#- - We must add a fake join key in case additional grouping variables are not provided --#}
+    {#- - Redshift does not allow for dynamically created join conditions (e.g. full join on 1 = 1 --#}
+    {#- - The same logic is used in equal_rowcount. In case of changes, maintain consistent logic --#}
+    {% set group_by_columns = ["id_dbtutils_test_fewer_rows_than"] + group_by_columns %}
+    {% set groupby_gb_cols = "group by " + group_by_columns | join(",") %}

Additional context
What is the output of sqlfmt --version?
v0.18.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions