-
-
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
Revive config apparently broken in 1.56.0 #4353
Comments
Hello, it's because the rule is missing inside revive https://github.com/mgechev/revive/blob/ef34f92cef1c19663acd6bef35da06ede909a375/config/config.go#L42 |
I can create 2 possible fixes inside golangci-lint (removing this rule, copy-paste the code from revive) but we will wait for feedback from the revive team. For now, as a workaround, the |
I've just released a new version: https://github.com/mgechev/revive/releases/tag/v1.3.7 |
#4355 this failed most likely because of mgechev/revive#969, but I didn't investigate deeper, and I'm not sure on which side it should be fixed. |
I will investigate |
hey as far as i remember mgechev/revive#969 - replace ImportsBlacklistRule to ImportsBlocklistRule (using of course dedicated function: actualRuleName), and rule EnforceRepeatedArgTypeStyleRule was added in mgechev/revive#953 (and not added to config/config.go file to allRules list) - so maybe error revealed as a result of using old config files or something (just guessing). so my suggestion @denisvmedia is that after adding a new rule, we should also add some tests for checking content of required maps/lists |
Thanks! 😊 When is the v1.56.1 release coming? |
I think we will wait 1 or 2 days, just to have some feedback on the other linters. |
I'm happy to see a quick fix to this. I'd love to see 1.56.1 released ASAP. This is preventing us from updating to Go 1.22. Version numbers are free, after all 😉 |
yes but my time is not free 😉 Anyway, as I expected another bug was reported, I think we will create a release today (UE timezone). Sponsoring is a good way to sustain open source maintainers: sponsor me |
Done and done! |
@flimzy btw, I don't really think that the linter rule you tried to disable is a duplicate of gosimple. There doesn't seem to be any exact (or even similar) check in it. It might be my ignorance though. P.S. Although it's mostly off topic for this thread, I just think it's worth to note it so that if anyone later comes to this thread doesn't get confused. |
@denisvmedia You're right. The comment mentions gosimple, but gocritic is the the linter that should be mentioned. |
Welcome
Description of the problem
After updating to golangci-lint 1.56.0, the linter fails to start with the following output:
Either disabling the
revive
linter, or configuring it withenable-all-rules = false
allows the linter to run successfully.I have added the relevant configuration section to disable the new revive rule:
But it seems to have no effect. Perhaps I've done it incorrectly, and this isn't actually a bug.
Version of golangci-lint
Configuration
Go environment
Verbose output of running
A minimal reproducible example or link to a public repository
// add your code here
Validation
The text was updated successfully, but these errors were encountered: