Merge pull request #470 from breed808/gobuild

Fix gobuild linter with multiple source files
This commit is contained in:
w0rp 2017-04-13 10:25:48 +01:00 committed by GitHub
commit 349b31104a
1 changed files with 2 additions and 2 deletions

View File

@ -18,8 +18,8 @@ function! ale_linters#go#gobuild#GetCommand(buffer, goenv_output) abort
\ 'GOROOT': a:goenv_output[1],
\}
endif
return 'GOPATH=' . s:go_env.GOPATH . ' go test -c -o /dev/null %s'
" Run go test in local directory with relative path
return 'GOPATH=' . s:go_env.GOPATH . ' cd ' . fnamemodify(bufname(a:buffer), ':.:h') . ' && go test -c -o /dev/null ./'
endfunction
function! ale_linters#go#gobuild#Handler(buffer, lines) abort