From a2bb45e974846cf98d1cecf956565357763581ee Mon Sep 17 00:00:00 2001 From: Ben Reedy Date: Thu, 13 Apr 2017 18:58:55 +1000 Subject: [PATCH] Fix gobuild linter Resolves issues with gobuild linter with multiple go source files belonging to the same go package. --- ale_linters/go/gobuild.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ale_linters/go/gobuild.vim b/ale_linters/go/gobuild.vim index a40565d..5187c68 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