ale/ale_linters/go/gobuild.vim
Heyward Fann e46ef0ae19 Redirect go build output to /dev/null
Named file file will be created after ALE, this can redirect the output to /dev/null if go build failed.
2016-12-23 14:56:44 +08:00

18 lines
501 B
VimL

" Author: dzhou121 <dzhou121@gmail.com>
" Description: go build for Go files
function! s:FindGobuildScript() abort
return g:ale#util#stdin_wrapper . ' .go go build -o /dev/null'
endfunction
let g:ale#util#gobuild_script =
\ get(g:, 'ale_go_gobuild_script', s:FindGobuildScript())
call ale#linter#Define('go', {
\ 'name': 'go build',
\ 'output_stream': 'stderr',
\ 'executable': 'go',
\ 'command': g:ale#util#gobuild_script,
\ 'callback': 'ale#handlers#HandleUnixFormatAsError',
\})