Open mitar opened 3 weeks ago
It is already there, like perfsprint -h shows you the flag like fix
Hm, it is not in golangci-lint:
perfsprint: Checks that fmt.Sprintf can be replaced with a faster alternative. [fast: false, auto-fix: false]
I think you are looking for
So the issue is that golangci-lint does not support SuggestedFixes, but some other linters are doing auto-fixing in some other way then?
Yes, so it's not an issue that can be addressed in perfsprint
And the ticket already exists in golangci-lint
I'm unsure what is the latest status. I mean I'm unsure if they were not awaiting something to be merged in Go std lib
Thanks.
Thanks Christophe for answering better and faster than me
Unless ... I was totally wrong
https://github.com/golangci/golangci-lint/pull/4994#issuecomment-2338412029
Here is what is recommended apparently https://github.com/4meepo/tagalign/blob/e25313ba1e10f624375cf2573cdcf07473178606/tagalign.go#L163-L173
I think I had also misunderstood and expected golangci-lint to support suggestedfixes, but it's the opposite, it might be to each linter to support the golangci-lint format
I mean, or we wait for golangci-lint to support suggestedfixes, or this linter implements custom API golangci-lint requires now.
Exactly. But I think it's a simpler move to try supporting the golangci-lint mode maybe
a PR is welcome if you want golangci-lint mode :-)
Let's then reopen this.
This would be great, so that linter could just autofix the issues.