-
-
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
enable-all in config file can't be overridden on command line? #542
Comments
hi, |
@jirfag Correct me if I wrong, but its an end of 2022 and "enable-all" is still valid. It's a quite confusing situation when you have a big config with "enable-all: true", tuned whole linters and try to fix them one-by-one in the project with a command like: golangci-lint run --disable-all -E gomoddirectives and receiving error like ERRO Running error: --enable-all and --disable-all options must not be combined It's a real problem because now with such approach I have to comment "enable-all" and "disable" sections in the config. Could you reopen this issue? |
@ldez Thank you! Can you reopen this issue also? |
The management of the configuration is something global, we will not try to change the behavior only for one flag. |
golangci-lint --version
golangci-lint has version 1.16.0 built from 97ea1cb on 2019-03-31T19:48:46Z
cat .golangci.yml
go version && go env
When I run
golangci-lint run
(or for my text editor) I want all but a certain few linters to be enabled, so my config file hasenable-all: true
and certain linters in thedisable
section.But sometimes I want to run just some of those disabled linters. I hope to be able to do this:
golangci-lint run --disable-all -E gocyclo -E dupl
But I can't:
Is there another way I can do what I want? How do you keep using a single config file (which may have per-linter options in it), but sometimes override to only run 1 or 2 specific linters?
The text was updated successfully, but these errors were encountered: