summaryrefslogtreecommitdiff
path: root/ale_linters/go/gofmt.vim
blob: a233b4220ca7c97a3300d6888af733130e6ad8bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
" Author: neersighted <bjorn@neersighted.com>
" Description: gofmt for Go files

function! ale_linters#go#gofmt#GetCommand(buffer) abort
    return ale#go#EnvString(a:buffer)
    \   . '%e -e %t'
endfunction


call ale#linter#Define('go', {
\   'name': 'gofmt',
\   'output_stream': 'stderr',
\   'executable': 'gofmt',
\   'command': function('ale_linters#go#gofmt#GetCommand'),
\   'callback': 'ale#handlers#unix#HandleAsError',
\})