-
-
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
Fix to fails of GoMetalinter result filepath in subdir. resolve #1413 #1414
Fix to fails of GoMetalinter result filepath in subdir. resolve #1413 #1414
Conversation
I think Martin changed this so it's consistent with others, adding him so he can chime as well. /cc @Carpetsmoker |
I tested this, and both This is because the command that gets run is:
Which will report back with the full path in the output. I'm not sure why it's failing for you, but
Nope, didn't touch this :-) I did make a similar fix in #1381 though. |
@@ -87,7 +87,7 @@ function! go#lint#Gometa(autosave, ...) abort | |||
|
|||
let meta_command = join(cmd, " ") | |||
|
|||
let out = go#tool#ExecuteInDir(meta_command) | |||
let out = go#util#System(meta_command) |
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.
Small thing, but a comment a few lines up (line 58) says:
" For sync mode (go#tool#ExecuteInDir), always explicitly pass the 5 seconds
" deadline if there is no other deadline configured. If a deadline is
" configured, then use it.
But this is no longer accurate.
Could you also update the comment? This is the sort of small function/code mismatch that can cause a lot of confusion in the (distant) future ;-)
My gometalinter returns relative path. Perhaps this behavior may have changed the behavior of metalinter |
I can confirm this fixes #1417 for me. |
I just noticed that someone else made a PR for this previously: #1402; this PR is (slightly) better though, since it also updates a comment :-) |
@hori-ryota can you remove the accidentally added tags file please? |
Oh, sorry and thank you for fixing it! Remove accidentally committed file; update CHANGELOG · fatih/vim-go@ea33466 |
Execute
:GoMetalinter
in subdir, failed to parse filepath.e.g.
Execute to
foo/bar.go
.Now execute gometalinter in
foo/
dir.So, result path will
bar.go
but wantfoo/bar.go