2018-03-31 10:55:20 -04:00
|
|
|
" Author: neersighted <bjorn@neersighted.com>
|
|
|
|
" Description: gofmt for Go files
|
|
|
|
|
2019-08-22 11:36:17 -04:00
|
|
|
function! ale_linters#go#gofmt#GetCommand(buffer) abort
|
|
|
|
return ale#go#EnvString(a:buffer)
|
|
|
|
\ . '%e -e %t'
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
2018-03-31 10:55:20 -04:00
|
|
|
call ale#linter#Define('go', {
|
|
|
|
\ 'name': 'gofmt',
|
|
|
|
\ 'output_stream': 'stderr',
|
|
|
|
\ 'executable': 'gofmt',
|
2019-08-22 11:36:17 -04:00
|
|
|
\ 'command': function('ale_linters#go#gofmt#GetCommand'),
|
2018-03-31 10:55:20 -04:00
|
|
|
\ 'callback': 'ale#handlers#unix#HandleAsError',
|
|
|
|
\})
|