Add enable list to `modernize` linter
Author: taran-pCreated Jul 15, 2026Updated Jul 15, 2026
Labelsenhancementno decision
Welcome
- This is not a request to create or integrate a new linter; those belong in Discussions.
- 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?
Brew
Your feature request related to a problem? Please describe
The only way to select which modernize analyzers to run is through disable, which means as new analyzers are added, the list will require upkeep
Describe the solution you'd like
The ability to whitelist analyzers in addition to the existing blacklist
Describe alternatives you've considered
Disabling all unwanted analyzers. This will require upkeep as the binary is updated
Additional context
No response
Supporter
- I am a sponsor/backer of this project.
Source: golangci/golangci-lint