Go checker: extra arguments for "go build" and "go test".

This commit is contained in:
LCD 47 2015-01-08 22:15:35 +02:00
parent 0da7a1e476
commit a18ccb40df

View File

@ -50,10 +50,12 @@ function! SyntaxCheckers_go_go_GetLocList() dict
" Test files, i.e. files with a name ending in `_test.go`, are not
" compiled by `go build`, therefore `go test` must be called for those.
if match(expand('%', 1), '\m_test\.go$') == -1
let makeprg = self.getExec() . ' build ' . syntastic#c#NullOutput()
let opts = syntastic#util#shescape(syntastic#util#var('go_go_build_args'))
let makeprg = self.getExec() . ' build ' . opts . ' ' . syntastic#c#NullOutput()
let cleanup = 0
else
let makeprg = self.getExec() . ' test -c ' . syntastic#c#NullOutput()
let opts = syntastic#util#shescape(syntastic#util#var('go_go_test_args'))
let makeprg = self.getExec() . ' test -c ' . opts . ' ' . syntastic#c#NullOutput()
let cleanup = 1
endif