1
0
Fork 0
mirror of synced 2024-11-16 22:15:34 -05:00
ultimate-vim/sources_non_forked/ale/ale_linters/go/govet.vim

24 lines
705 B
VimL
Raw Normal View History

" Author: neersighted <bjorn@neersighted.com>
" Description: go vet for Go files
"
" Author: John Eikenberry <jae@zhar.net>
" Description: updated to work with go1.10
2018-08-25 12:13:42 -04:00
call ale#Set('go_govet_options', '')
function! ale_linters#go#govet#GetCommand(buffer) abort
2018-08-25 12:13:42 -04:00
let l:options = ale#Var(a:buffer, 'go_govet_options')
return ale#path#BufferCdString(a:buffer) . ' go vet .'
2018-08-25 12:13:42 -04:00
\ . (!empty(l:options) ? ' ' . l:options : '')
endfunction
call ale#linter#Define('go', {
2018-07-30 17:18:16 -04:00
\ 'name': 'govet',
\ 'aliases': ['go vet'],
\ 'output_stream': 'stderr',
\ 'executable': 'go',
\ 'command_callback': 'ale_linters#go#govet#GetCommand',
\ 'callback': 'ale#handlers#go#Handler',
\ 'lint_file': 1,
\})