golangci-lint
golangci-lint copied to clipboard
nolint by linter rule
Your feature request related to a problem? Please describe.
is some case i don't want to disable all linter checks for expression by nolint:gocritic but only one rule hugeParam for example
Describe the solution you'd like.
add feature to write nolint directive for specific rule i propose the following syntax: nolint:linter_name:check_name as example nolint:gocritic:hugeParam
Describe alternatives you've considered.
~
Additional context.
No response
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.
I'm also interested in this one, especially for revive.
For the gocritic example, there are three possible levels: gocritic:ruleguard:ruleguard-rule-name.
Ruleguard is a powerful checker under gocritic, and within ruleguard it's possible to have hundreds of checks.
As for revive, it actually supports Its own ignore comments, but there're not parsed by golangci-lint. I'm wondering if we can have an API (or a convention) for the linters to support so that they can themselves ignore according to the ignore rule from golangci-lint.
I can volunteer the PR, but before starting with it we need to have a clear vision on how we want to achieve it.
Related to #1658
Duplicate of #1165