-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
ginkgolinter crashes golangci-lint when enabled #3548
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
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
It seems to be an interaction between ginkgolinter and the SSA-based linters, and something in the code of cluster-api. SSA-based linters:
I think that ginkgolinter is modifying the AST, what should never be done. ping @nunnatsa |
I confirm the root cause is ginkgolinter, so for now you have to disable it. |
Thank you for confirming ldez. It is disabled for now. |
Ldez not Idez 😉 |
My apologies! I didn't want to mention you and trigger a notification. 🙏 |
No problem 👍 @nunnatsa can you confirm my assumption: ginkgolinter is modifying the AST |
Unless there is a bug, ginkgolinter only sets the suggested fix field, but not directly changes the ast. |
FYI, only ginkgolinter is producing the current bug. |
Of course @ldez |
Awesome! Thank you for the quick fix @nunnatsa 💯 |
Welcome
Description of the problem
When enabling
ginkgolinter
in the cluster-api project using v1.51.0 golangci-lint crashes.git diff of the change needed to crash:
I've tried go version
1.18.10
,1.19.5
and1.20
with the same result.I've also tried adding the default linter settings to see if that helps.
I've tested to run ginkgolinter downloaded as a stand alone from github and it seems to work for me.
You can recreate this by enabling ginkgolinter and running
make lint
in cluster-api project.Version of golangci-lint
Configuration file
source: https://github.com/kubernetes-sigs/cluster-api/blob/main/.golangci.yml
Go environment
Verbose output of running
Code example or link to a public repository
https://github.com/kubernetes-sigs/cluster-api
The text was updated successfully, but these errors were encountered: