summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2017-04-13 10:25:48 +0100
committerGitHub <noreply@github.com>2017-04-13 10:25:48 +0100
commit349b31104a500e1e0376ec0b2022d8c478d0bf24 (patch)
tree099fdeb1590372c2de9bbea13f2aa40340723dba
parente2287a42bce9080ed42b46cc9e8d544838236ec1 (diff)
parenta2bb45e974846cf98d1cecf956565357763581ee (diff)
downloadale-349b31104a500e1e0376ec0b2022d8c478d0bf24.zip
Merge pull request #470 from breed808/gobuild
Fix gobuild linter with multiple source files
-rw-r--r--ale_linters/go/gobuild.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/ale_linters/go/gobuild.vim b/ale_linters/go/gobuild.vim
index a40565d6..5187c682 100644
--- a/ale_linters/go/gobuild.vim
+++ b/ale_linters/go/gobuild.vim
@@ -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