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
-
Consider the below snippet, where the
nolint
directive is unused fortypecheck
linter.If we enable
typecheck
andnolintlint
linters, thengolangci-lint
reports an error:But, if we disable
typecheck
and enablenolintlint
, it does not report an error.However, in this case as well the
nolint
directive is unused by any of the linters.Is this the expected behavior ? Will it possible to configure the
nolintlint
to throw warning in the second case as well ?Thanks,
manoranjith
Beta Was this translation helpful? Give feedback.
All reactions