You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, if I use a nolint directive with an unknown linter (regardless on whether the line has any linter errors or not), the result is a warning that looks like this:
WARN [runner/nolint] Found unknown linters in //nolint directives: foobar
The problem is that if such a directive is added by mistake (e.g., a typo on the linter name), this will masquerade the actual linter error (since the exit status of golangci-lint is 0 with this warning). I couldn't find an obvious configuration parameter to handle these scenarios properly.
Describe the solution you'd like
I would expect the output of golangci-lint to be non-zero for these scenarios, or somehow configure warnings to be treated as errors. Another alternative would be for the nolintlint linter to catch these (I tried playing with allow-unused, but did not get what I expected)
Describe alternatives you've considered
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently, if I use a
nolint
directive with an unknown linter (regardless on whether the line has any linter errors or not), the result is a warning that looks like this:The problem is that if such a directive is added by mistake (e.g., a typo on the linter name), this will masquerade the actual linter error (since the exit status of
golangci-lint
is0
with this warning). I couldn't find an obvious configuration parameter to handle these scenarios properly.Describe the solution you'd like
I would expect the output of
golangci-lint
to be non-zero for these scenarios, or somehow configure warnings to be treated as errors. Another alternative would be for thenolintlint
linter to catch these (I tried playing withallow-unused
, but did not get what I expected)Describe alternatives you've considered
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: