nolintlint does not detect an unused // nolint:... directive, when the corresponding linter is disabled
#2395
Unanswered
manoranjith
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Consider the below snippet, where the
nolintdirective is unused fortypechecklinter.If we enable
typecheckandnolintlintlinters, thengolangci-lintreports an error:But, if we disable
typecheckand enablenolintlint, it does not report an error.However, in this case as well the
nolintdirective is unused by any of the linters.Is this the expected behavior ? Will it possible to configure the
nolintlintto throw warning in the second case as well ?Thanks,
manoranjith
Beta Was this translation helpful? Give feedback.
All reactions