sqlfluff icon indicating copy to clipboard operation
sqlfluff copied to clipboard

Add a rule for column / keyword alignment

Open tunetheweb opened this issue 2 years ago • 2 comments

This seems a reasonably popular formatting option (for example discussed here):

    select a
         , b
         , count(*) as count
      from table
     where cond1
       and cond2
     group by a, b
     order by count desc

Should we support enforcing this via a rule?

Optionally is this one:

    select a
         , b
         , count(*) as count
      from table
      join table2 on table.key1                    = table2.key1
                 and table.key2                    = table2.key2
                 and DATEADD('day', 1, table.key3) = table2.key3
     where cond1
       and cond2
     group by a, b
     order by count desc

tunetheweb avatar Oct 06 '21 22:10 tunetheweb