2016-10-11 11:57:42 +00:00
|
|
|
" Author: neersighted <bjorn@neersighted.com>
|
|
|
|
" Description: golint for Go files
|
|
|
|
|
2018-11-11 09:42:57 +00:00
|
|
|
call ale#Set('go_golint_executable', 'golint')
|
|
|
|
call ale#Set('go_golint_options', '')
|
|
|
|
|
|
|
|
function! ale_linters#go#golint#GetCommand(buffer) abort
|
|
|
|
let l:options = ale#Var(a:buffer, 'go_golint_options')
|
|
|
|
|
|
|
|
return '%e'
|
|
|
|
\ . (!empty(l:options) ? ' ' . l:options : '')
|
|
|
|
\ . ' %t'
|
|
|
|
endfunction
|
|
|
|
|
2016-10-11 11:57:42 +00:00
|
|
|
call ale#linter#Define('go', {
|
|
|
|
\ 'name': 'golint',
|
2017-11-15 16:24:29 +00:00
|
|
|
\ 'output_stream': 'both',
|
2018-11-11 09:42:57 +00:00
|
|
|
\ 'executable_callback': ale#VarFunc('go_golint_executable'),
|
|
|
|
\ 'command_callback': 'ale_linters#go#golint#GetCommand',
|
2017-04-24 21:27:18 +00:00
|
|
|
\ 'callback': 'ale#handlers#unix#HandleAsWarning',
|
2016-10-11 11:57:42 +00:00
|
|
|
\})
|