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

if exists('g:loaded_ale_linters_go_gofmt')
    finish
endif

let g:loaded_ale_linters_go_gofmt = 1

call ale#linter#Define('go', {
\   'name': 'gofmt',
\   'output_stream': 'stderr',
\   'executable': 'gofmt',
\   'command': g:ale#util#stdin_wrapper . ' .go gofmt -e',
\   'callback': 'ale#handlers#HandleUnixFormatAsError',
\})