Skip to content

Commit

Permalink
feat: change config to allow indented case when statements
Browse files Browse the repository at this point in the history
  • Loading branch information
ashish10alex committed Jul 12, 2024
1 parent 6b5f28b commit 2cbc57b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 8 deletions.
22 changes: 18 additions & 4 deletions assets/.sqlfluff
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,27 @@ exclude_rules = AL07, ST06, ST07, AM03, ST04, LT05, AL05
allow_scalar = False

[sqlfluff:indentation]
tab_space_size = 2
# See https://docs.sqlfluff.com/en/stable/layout.html#configuring-indent-locations
indent_unit = space
tab_space_size = 4
indented_joins = False
indented_ctes = False
indented_using_on = True
indented_then = False
indented_on_contents = False
allow_implicit_indents = True
indented_on_contents = True
indented_then = True
indented_then_contents = True
allow_implicit_indents = False
template_blocks_indent = True
# This is a comma separated list of elements to skip
# indentation edits to.
skip_indentation_in = script_content
# If comments are found at the end of long lines, we default to moving
# them to the line _before_ their current location as the convention is
# that a comment precedes the line it describes. However if you prefer
# comments moved _after_, this configuration setting can be set to "after".
trailing_comments = before
# To exclude comment lines from indentation entirely set this to "True".
ignore_comment_lines = False

[sqlfluff:layout:type:where_clause]
line_position = alone:strict
Expand Down
22 changes: 18 additions & 4 deletions cmd/sqlfluff_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,27 @@ exclude_rules = AL07, ST06, ST07, AM03, ST04, LT05, AL05
allow_scalar = False
[sqlfluff:indentation]
tab_space_size = 2
# See https://docs.sqlfluff.com/en/stable/layout.html#configuring-indent-locations
indent_unit = space
tab_space_size = 4
indented_joins = False
indented_ctes = False
indented_using_on = True
indented_then = False
indented_on_contents = False
allow_implicit_indents = True
indented_on_contents = True
indented_then = True
indented_then_contents = True
allow_implicit_indents = False
template_blocks_indent = True
# This is a comma separated list of elements to skip
# indentation edits to.
skip_indentation_in = script_content
# If comments are found at the end of long lines, we default to moving
# them to the line _before_ their current location as the convention is
# that a comment precedes the line it describes. However if you prefer
# comments moved _after_, this configuration setting can be set to "after".
trailing_comments = before
# To exclude comment lines from indentation entirely set this to "True".
ignore_comment_lines = False
[sqlfluff:layout:type:where_clause]
line_position = alone:strict
Expand Down

0 comments on commit 2cbc57b

Please sign in to comment.