-
-
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
Add additional metalinter options #631
Conversation
e905e85
to
a308f10
Compare
@fatih just tried to make things a little cleaner by using a different approach. Please let me know any feedback you might have. Thx! P.S. I didn't squash on purpose so that both approaches are still visible, but will squash before (if) you merge this if you want... |
@fatih PR alecthomas/gometalinter#71 was just merged, so there are no external dependencies blokking this PR anymore... |
This looks good. I have some comments about it:
Thanks btw for your work, I think it's a really awesome contribution and I'm looking forward to use it :) |
Thanks for the review @fatih! Let me reply to your comments...
Let me know your thoughts about all this and if this makes sense to you as well. Cheers! |
@fatih just updated the PR with another approach which removes the duplicate logic and handles everything within one function. Looks pretty clean to me, so let me know your thoughts... |
@@ -73,7 +80,10 @@ function! go#lint#Gometa(...) abort | |||
|
|||
let errors = go#list#Get() | |||
call go#list#Window(len(errors)) | |||
call go#list#JumpToFirst() | |||
|
|||
if a:autosave == 0 |
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.
Better: if !a:autosave
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.
That indeed reads (and looks) a little better...
@svanharmelen this is now in a really good shape :) I've made a comment, once that is done I think it's good to go. |
f33333f
to
7a38218
Compare
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
7a38218
to
9721666
Compare
@fatih cool! Updated and squashed the commits... |
Add additional metalinter options
@svanharmelen thanks for your awesome contribution. This is an awesome addition which I'm going to use myself a lot :) |
👍 😃 |
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 😉