Description
Welcome
- Yes, I've searched similar issues on GitHub and didn't find any.
- I agree to follow this project's Code of Conduct
How did you install golangci-lint?
Official binary
Your feature request related to a problem? Please describe
In v1, formatters were not separated from linters and could, without any configuration yaml, be enabled via the cli, e.g. like this:
golangling-ci run --enable goimports,gofmt,misspell,unconvert,revive
After v2, I'm getting an error message:
Error: can't load config: goimports is a formatter
Failed executing command with error: can't load config: goimports is a formatter
@ldez's release blog post mentions that golanglint-ci run
will run all formatters from the configuration file as well: https://ldez.github.io/blog/2025/03/23/golangci-lint-v2/#:~:text=The%20formatters%20defined%20in%20this%20section%20are%20automatically%20used%20as%20%E2%80%9Clinter%E2%80%9D%20when%20you%20run%20the%20command%20golangci%2Dlint%20run.
Thus, I would expect that the --enable
flag of run
also allows to activate formatters.
Describe the solution you'd like
As before, adding formatters into run --enable
should work without issues
Describe alternatives you've considered
Adding configuration files to each repository
Additional context
No response
Supporter
- I am a sponsor through GitHub or OpenCollective