summaryrefslogtreecommitdiff
path: root/ale_linters/go
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-04-15 21:04:43 +0100
committerw0rp <devw0rp@gmail.com>2017-04-15 21:04:43 +0100
commitf0d76bc298778789072b87b73789141c750f1f50 (patch)
treef3039d3ae48eab6e4c2ebe16b15c4657a0cc0f8b /ale_linters/go
parent54991f3082108cb41e5be06a068e3e0472b858b9 (diff)
downloadale-f0d76bc298778789072b87b73789141c750f1f50.zip
Use g:ale_linters for turning gometalinter on, and update documentation as appropriate
Diffstat (limited to 'ale_linters/go')
-rw-r--r--ale_linters/go/gometalinter.vim13
1 files changed, 4 insertions, 9 deletions
diff --git a/ale_linters/go/gometalinter.vim b/ale_linters/go/gometalinter.vim
index 3a827fd3..8dbd8b26 100644
--- a/ale_linters/go/gometalinter.vim
+++ b/ale_linters/go/gometalinter.vim
@@ -1,20 +1,14 @@
" Author: Ben Reedy <https://github.com/breed808>
" Description: Adds support for the gometalinter suite for Go files
-" Disable gometalinter by default
-if !exists('g:ale_go_gometalinter_enabled')
- let g:ale_go_gometalinter_enabled = 0
-endif
-
if !exists('g:ale_go_gometalinter_options')
let g:ale_go_gometalinter_options = ''
endif
function! ale_linters#go#gometalinter#GetCommand(buffer) abort
- if g:ale_go_gometalinter_enabled == 1
- return 'gometalinter ' . g:ale_go_gometalinter_options . ' ' . fnameescape(fnamemodify(bufname(a:buffer), ':p:h'))
- endif
- return ''
+ return 'gometalinter '
+ \ . g:ale_go_gometalinter_options
+ \ . ' ' . fnameescape(fnamemodify(bufname(a:buffer), ':p:h'))
endfunction
function! ale_linters#go#gometalinter#Handler(buffer, lines) abort
@@ -49,6 +43,7 @@ function! ale_linters#go#gometalinter#Handler(buffer, lines) abort
\ 'nr': -1,
\})
endfor
+
return l:output
endfunction