This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/ale_linters/go/gofmt.vim
Bjorn Neergaard 23442a2ec3
Introduce generic unix formatter
Two wrapper functions allow treating lines as errors or as warnings
2016-10-11 08:43:57 -05:00

17 lines
411 B
VimL

" 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',
\})