Skip to content
This repository has been archived by the owner on Apr 10, 2019. It is now read-only.

Add an include flag to only include certain messages #71

Merged
merged 1 commit into from
Nov 29, 2015
Merged

Add an include flag to only include certain messages #71

merged 1 commit into from
Nov 29, 2015

Conversation

svanharmelen
Copy link
Contributor

By adding this option, editors have a way to run gometalinter and only output the results for the file being saved. Of course it also helps other use cases where you only want to check if a specific error/warning is triggered by your code.

Tested this with a customised version of vim-go (will make a PR there as well to use this new functionality) and it works really well.

By adding this option, editors have a way to run `gometalinter` and
only output the results for the file being saved. Of course it also
helps other use cases where you only want to check if a specific
error/warning is triggered by your code.

Tested this with a customised version of `vim-go` (will make a PR there
as well to use this new functionality) and it works really well.
svanharmelen pushed a commit to svanharmelen/vim-go that referenced this pull request Nov 27, 2015
1. Add the option to run the metalinter on save
2. Add the option to limit the output to the currently active buffer

There is a outstanding PR with the `gometalinter` repo to add some
needed logic for this:
alecthomas/gometalinter#71 So I assume this PR
should not be merged before that one is merged.

Also this the first vimscript code I’ve ever written, so I guess this
could be done a little cleaner. Especially the implementation of the
`go#lint#GometaAutoSave` func doesn’t feel all that clean to me, but
I’m not sure how to do this in a different/better way. So if you have
any pointers, I’ll be happy to take them 😉
@svanharmelen
Copy link
Contributor Author

@alecthomas any thoughts or feedback would be great! Thx!

alecthomas added a commit that referenced this pull request Nov 29, 2015
Add an `include` flag to only include certain messages
@alecthomas alecthomas merged commit c091e0a into alecthomas:master Nov 29, 2015
@alecthomas
Copy link
Owner

Thanks!

@svanharmelen
Copy link
Contributor Author

👍

svanharmelen pushed a commit to svanharmelen/vim-go that referenced this pull request Nov 29, 2015
1. Add the option to run the metalinter on save
2. Add the option to limit the output to the currently active buffer

There is a outstanding PR with the `gometalinter` repo to add some
needed logic for this:
alecthomas/gometalinter#71 So I assume this PR
should not be merged before that one is merged.

Also this the first vimscript code I’ve ever written, so I guess this
could be done a little cleaner. Especially the implementation of the
`go#lint#GometaAutoSave` func doesn’t feel all that clean to me, but
I’m not sure how to do this in a different/better way. So if you have
svanharmelen pushed a commit to svanharmelen/vim-go that referenced this pull request Nov 29, 2015
1. Add the option to run the metalinter on save
2. Add the option to limit the output to the currently active buffer

There is a outstanding PR with the `gometalinter` repo to add some
needed logic for this:
alecthomas/gometalinter#71 So I assume this PR
should not be merged before that one is merged.

Also this the first vimscript code I’ve ever written, so I guess this
could be done a little cleaner. Especially the implementation of the
`go#lint#GometaAutoSave` func doesn’t feel all that clean to me, but
I’m not sure how to do this in a different/better way. So if you have
@svanharmelen svanharmelen deleted the f-add-include-flag branch November 29, 2015 21:58
@emead emead mentioned this pull request Dec 14, 2015
@alecthomas
Copy link
Owner

Note that the short flag for this has been changed to -I. It was conflicting with the short flag for --install.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants