-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disabling alias silently disables enabled linters #3746
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
I had an attempt at changing the behaviour here: master...matthewhughes934:golangci-lint:fix-silent-linter-disable-through-alias |
Hello, It is a side effect of a "feature" because $ golangci-lint run -v --disable-all -Emegacheck
...
INFO [lintersdb] Active 3 linters: [gosimple staticcheck unused]
... $ golangci-lint run -v -Dmegacheck
...
INFO [lintersdb] Active 4 linters: [errcheck govet ineffassign typecheck]
... $ golangci-lint run -v
...
INFO [lintersdb] Active 7 linters: [errcheck gosimple govet ineffassign staticcheck typecheck unused]
... I think this "feature" must be removed in the future (a major version). |
To be precise I think I was expected: as the following test is explaining the expected behavior:
|
For now, this issue cannot be fixed. |
Thanks for the response, and thanks for the extra info 🙂 |
now alternative names are deprecated, so we can consider this issue as fixed. |
Welcome
Description of the problem
Given the file:
Running with
staticcheck
reports an issue as expected:Disabling and enabling
staticcheck
errors as expected:but Disabling
megacheck
(alias forstaticcheck
) and enablingstaticcheck
silently disablesstaticcheck
:Version of golangci-lint
Tested on
1.52.1
and the current head of master: ca05239Configuration file
No config, see flags in description
Go environment
Verbose output of running
Adding verbosity to example above
Code example or link to a public repository
See description
The text was updated successfully, but these errors were encountered: