-
-
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
Gocritic panics when using custom linter plugins #4940
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
This comment was marked as outdated.
This comment was marked as outdated.
I have a weird behavior: I test it again and the problem comes again... I need to think more about it. EDIT: the problem was hidden by the cache. |
This comment was marked as outdated.
This comment was marked as outdated.
I found some a good lead: it's related to the Go version used by the plugin (inside the The Go version changes how the custom version is built: some extra godebug args are used (for compatibility). |
My conclusion is that ruleguard (rules core of go-critic) has a problem with |
As a workaround:
|
@ldez thank you for looking into it. Also, I noticed the problem with the gocritic check
|
A ruleguard fix has been proposed and merged but it creates a regression. |
@ilya-hontarau I think you want to say: linters-settings:
gocritic:
disabled-checks:
- externalErrorReassign
enabled-tags:
- diagnostic |
I proposed a fix. We cannot use For now, we can just wait for the merge and the release of ruleguard (and go-critic). |
Welcome
typecheck
section of the FAQ.Description of the problem
When I build a custom linter and run it, I get a panic from the gocritic linter. I can't reproduce it with the official build or with the gocritic linter.
Version of golangci-lint
Configuration
Go environment
Verbose output of running
A minimal reproducible example or link to a public repository
https://github.com/ilya-hontarau/golangci-lint-gocritic-bug
Validation
Supporter
The text was updated successfully, but these errors were encountered: