Add sigfmt formatter #6615
Replies: 4 comments 4 replies
|
Thanks for the proposal. There is a new linter proposals template for discussions which is a better way to discuss new linters since the template contains a bunch of questions helping us. Also it's a good place to keep linter integration requests since they'll end up in the New Linter Proposals section that gives a good overview. |
|
Should it also be used for formatters, though? The description does not mention that. |
|
The template also seems to assume that I want to propose my linter with items like "I understand that tags must never be deleted or recreated once published", but that's not the case. |
|
I moved the issue into the discussion: formatters or linters are evaluating in the same way. FYI, I'm trying to avoid integrating linters/formatters without the certain form of consent of the author. That said, IMHO, formatting a function signature based on the number of characters is not so relevant. Based on how the AST work (the AST is not really aware of lengths), this will be weak. I know that because this is a major limitation inside golines. Also, formatting a signature can be more subtle than only putting parameters on separate lines: you may want to group then. Having too long names for parameters is more a sign of bad function (and/or parameters) naming than a formatting problems. Having too many parameters is generally a sign of several possible problems:
I don't think that formatting the signature will fix those problems. |
Uh oh!
There was an error while loading. Please reload this page.
Welcome
How did you install golangci-lint?
Other
Your feature request related to a problem? Please describe
I would like golangci-lint to have a formatter for function signatures. I found two that look okay:
I tried the first one, and it works. Having it integrated into golangci-lint would be great.
That issue is unrelated to another project with the same name from #6242.
Describe the solution you'd like
See above.
Describe alternatives you've considered
Running github.com/feedr-aps/sigfmt manually.
Additional context
No response
Supporter
All reactions