-
-
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
lint: make staticcheck the default metalinter #3126
Conversation
7531ab4
to
53c7ccc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
👋🏻 What was the motivation for changing the default meta-linter? I don't have an issue with the decision but I was hoping to learn why because I'm a golangci-lint user and want to know why folks are switching for if I should too. The PR description doesn't say why or link to related discussion. |
@leighmcculloch Thanks for asking. Support for golangci-lint was added to vim-go a couple of years ago. At the time gometalinter was deprecated and had been scheduled to be archived. Staticcheck didn't seem like a good fit for vim-go at the time. So at that point, golangci-lint seemed like the only path forward for vim-go's Golangci-lint was problematic pretty much right away. Its messages are inconsistently structured, it behaves differently depending on where its working directory is and whether it's given absolute or relative paths, and it's generally been difficult to work with. In some cases, it's nearly impossible to handle its errors correctly, because its error message formats are so terribly inconsistent depending on which linters' messages are provided. Staticcheck, on the other hand, structures its errors messages consistently which makes it very easy to integrate with Vim, it has straightforward cli options, and is easily customizable using config files. After reevaluating staticcheck due to frustrations with golangci-lint, I became convinced that it was the right path forward, so I added support for staticcheck a few months ago. I'm sure not everyone will agree with this decision. You are free to use golangci-lint for the foreseeable future, though I would like to consider fully removing support for it 2 or 3 vim-go releases from now. |
Thanks for the thorough knowledge share, it was very insightful, and makes a lot of sense. |
First, thanks for maintaining this plugin! AFAICT this change causes whatever That is if I change Also with These may be separate issues. Let me know if you would like to create an issue or two. |
No description provided.