statix icon indicating copy to clipboard operation
statix copied to clipboard

Warn on a long pattern in top-level lambda

Open viraptor opened this issue 3 years ago • 5 comments

When there are more than 6 arguments, suggest splitting into multiple lines.

viraptor avatar Jun 30 '22 11:06 viraptor

i would say this is a formatting preference, and should be handled by formatting tools, rather than a linter, cc'ing some contributors for their opinions

cc @antifuchs @chenrui333 @NobbZ

oppiliappan avatar Jul 10 '22 13:07 oppiliappan

Yeah, for me this is clearly in the domain of a formatter.

NobbZ avatar Jul 10 '22 14:07 NobbZ

So my idea behind putting it in a linter is that there are two aspects to this issue:

  • formatter: this is the policy how it should be formatted, it's enforced
  • linter: this specific case is long and not readable anymore, but it's up to you how you fix it

viraptor avatar Jul 10 '22 20:07 viraptor

i would say this is a formatting preference, and should be handled by formatting tools, rather than a linter, cc'ing some contributors for their opinions

Yeah, I don't think that is fitting, too.

SuperSandro2000 avatar Jul 11 '22 11:07 SuperSandro2000

The number of arguments should be configurable rather than hardcoding 6, if this is accepted.

ilkecan avatar Sep 24 '22 03:09 ilkecan

while i do appreciate the work gone into this PR, i don't think this patchset fits in statix. i am very sorry, but i am going to have to close this one. i am very glad to have your contributions in statix however @viraptor!

oppiliappan avatar Jan 13 '23 06:01 oppiliappan