-
-
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
Can't disable specific revive rules after upgrading from 1.37.0 to 1.37.1 #1770
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
Hello, the difference between v1.37.0 and v1.37.1 is that we follow the revive way to apply rules: some rules are applied by default. |
In revive, some rules are applied by default when not config file provided. However, if you provide a config file, you must explicitly enable the rules that you want to use. By doing that, revive allows users to disable any rule even they are enabled by default. Here is an example.
@ldez I hope we can re-open this issue and discuss a way to disable revive rules |
I will try to fix that but that will be breaking once again. |
The main difficulty is that revive use a filename to detect if the default rules must be applied, but in golangci-lint we cannot do that because the revive rules are not defined in a dedicated file. |
Take a look at my PR #1831 |
After upgrading from 1.37.0 to 1.37.1, configuring explicit rules for the revive linter in the linters-settings no longer prevents other revive rules from running. This is unfortunate, as revive doesn't output rule codes that could be used to filter on...
Thank you for creating the issue!
Please include the following information:
Version of golangci-lint
Config file
Go environment
The text was updated successfully, but these errors were encountered: