Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new command called
:GoMetaLinter
which uses the gometalinter tool. Becausegometalinter
invokes other tools to gather the final output some of can be canceled on big source code calls. This can be of course changed with flags passed to gometalinter. I've decided to limit it and make it a little bit more usable for Vim. So our command:GoMetaLinter
is a little bit restricted, but with option to totally change the behavior how it would work.For now we have the following settings:
This causes the following command to be generated and executed:
To add/remove linters just change it for your own needs:
However, if the user change the
g:go_metalinter_command
command to something different, vim-go will call the command without modifying anything. Example (which basically calls all default linters specified by gometalinter):Right now this is how it looks like and everything seems to work perfect:
We also have a mapping to invoke it easily. For example the following calls
:GoMetaLinter
with the shortcut bound to<Leader>l
:Todos:
:GoMetaLinter
commandg:go_metalinter_enabled
g:go_metalinter_command
:GoMetaLinter
Fixes #320