2016-12-22 12:10:21 +00:00
|
|
|
" Author: dzhou121 <dzhou121@gmail.com>
|
|
|
|
" Description: go build for Go files
|
|
|
|
|
|
|
|
function! s:FindGobuildScript() abort
|
2016-12-23 06:56:44 +00:00
|
|
|
return g:ale#util#stdin_wrapper . ' .go go build -o /dev/null'
|
2016-12-22 12:10:21 +00:00
|
|
|
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',
|
|
|
|
\})
|