This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/ale_linters/go/gobuild.vim
dzhou121 55827a9493 add go build for build errors (#180)
* add go build for build errors

* Add go build to doc and README

* Improvement for Go build

Go build works on package level, so copy over the other files
that belong to the same package to the temp folder as well.

* revert back to simple go build

* change gobuild script var name
2016-12-22 12:10:21 +00:00

17 lines
488 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'
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',
\})