Go checker: even more contortions.
This commit is contained in:
parent
c60e440d00
commit
4d1f2e23ef
@ -50,20 +50,16 @@ 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 cmd = 'build'
|
||||
let opts = syntastic#util#var('go_go_build_args')
|
||||
if type(opts) != type('') || opts != ''
|
||||
let opts = join(syntastic#util#argsescape(opts))
|
||||
endif
|
||||
let makeprg = self.getExec() . ' build ' . opts . ' ' . syntastic#c#NullOutput()
|
||||
let cleanup = 0
|
||||
else
|
||||
let cmd = 'test -c'
|
||||
let opts = syntastic#util#var('go_go_test_args')
|
||||
if type(opts) != type('') || opts != ''
|
||||
let opts = join(syntastic#util#argsescape(opts))
|
||||
endif
|
||||
let makeprg = self.getExec() . ' test -c ' . opts . ' ' . syntastic#c#NullOutput()
|
||||
let cleanup = 1
|
||||
endif
|
||||
let opt_str = (type(opts) != type('') || opts != '') ? join(syntastic#util#argsescape(opts)) : opts
|
||||
let makeprg = self.getExec() . ' ' . cmd . ' ' . opt_str . ' ' . syntastic#c#NullOutput()
|
||||
|
||||
" The first pattern is for warnings from C compilers.
|
||||
let errorformat =
|
||||
|
Loading…
x
Reference in New Issue
Block a user