-
-
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
Request: golangci-lint support with go-vim #1841
Comments
when? |
I'm not sure how maintainable this project is. It vendors and modifies all current linters: https://github.com/golangci/golangci-lint#internals It just doesn't vendor them, it even changes them and modifies them to a point that they are not the same anymore. How can I be sure that I'm not saying it's the wrong way or etc.. I know they have a product offering and trying to earn money with this project, but we have to keep vim-go in a maintainable state. The last thing we want is to fix bugs that might be caused by third-party linter forks. I'm not going to close this for now, happy to read other people thoughts on this. |
@fatih we're upstreaming changes and it will take some time to prepare changes, review and merge them by linters authors. The problem with vet is that it lives in go source code: it's too big repo to vendor it. First we decided to make subtree of go source code with only vet code, but even this repo cloning was super-slow because of long git history. Therefore we've just made a copy of |
Maybe something has changed since I've tried to auto-run gometalinter on file save, but at that time it was incredible slow - wait for 1-3 seconds on each save is not an option. So, I give up and run it manually in console before pushing changes and within CI. If golangci-lint will be fast enough to make it possible to auto-run it on save without noticeable slowdown of vim - I think it's worth to support! Even if it uses modified linters and even if they behave a bit differently - it's just a linters, if they catch most of issues then it's better than nothing. At a glance it looks like it may be that fast, but only when called with |
Hi! |
Thanks for the updates. Especially given Alec Thomas's comments, it seems like replacing gometalinter in vim-go is warranted. After golsp intergration is merged (the focus of my current efforts for vim-go), I can get started on replacing gometalinter if no one else submits the PR before then. |
For anyone following along and looking for this issue to be resolved with formal support in vim-go, you may be able to start using |
or add the following to your .vimrc
and use :GOINT (the first character has to capitalised but not those following! |
@bhcleek I'm trying that right now but I can't seem to make it so I can jump to the lines from the output. Did you manage to make that work ? |
Is there more documentation for the |
Lines 1499 to 1506 in 66d06f3
|
@vrischmann I haven't tried it. If golangci-lint's output is formatted differently than gometalinter's, then it's unlikely to work. gometalinter mostly works, so this issue is a lower priority for me than getting the gopls intergration going. Once I get done with that, I'll put some attention to moving from gometalinter to golangci-lint. |
I started a WIP here, but some of the details of what we want the default config to look like still need to get hashed out #2182 |
https://github.com/alecthomas/gometalinter Would be nice to have golangci-lint as a replacement since thats they are recomending. |
While waiting for golangci-lint, I would like to share my current workaround using ~/.vimrc. Let me know what else I can help to accelerate the effort.
|
golangci-lint support was added in #2182 |
The project description sounds very nice!
https://github.com/golangci/golangci-lint
The text was updated successfully, but these errors were encountered: