lspitzner / brittany

haskell source code formatter
GNU Affero General Public License v3.0
690 stars 72 forks source link

Arguments with comments walk to the right #214

Closed matt-noonan closed 5 years ago

matt-noonan commented 5 years ago

In a multi-line function application with line comments on some arguments, the indent level increases after each commented line. For example:

foo = bar
  arg1 -- this is the first argument
  arg2 -- this is the second argument
  arg3 -- this is the third argument, now I'll skip one comment
  arg4
  arg5 -- this is the fifth argument
  arg6 -- this is the sixth argument

formats to

foo =
  bar arg1 -- this is the first argument
           arg2 -- this is the second argument
                arg3 -- this is the third argument, now I'll skip one comment
                     arg4 arg5 -- this is the fifth argument
                               arg6 -- this is the sixth argument
tfausak commented 5 years ago

Closing as fixed by #215.