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