diff --git a/autoload/go/lint.vim b/autoload/go/lint.vim index 6726fd035b..953dd753ba 100644 --- a/autoload/go/lint.vim +++ b/autoload/go/lint.vim @@ -2,8 +2,8 @@ if !exists("g:go_metalinter_command") let g:go_metalinter_command = "" endif -if !exists("g:go_metalinter_allowed") - let g:go_metalinter_allowed = ['vet', 'golint', 'errcheck'] +if !exists("g:go_metalinter_enabled") + let g:go_metalinter_enabled = ['vet', 'golint', 'errcheck'] endif if !exists("g:go_golint_bin") @@ -27,7 +27,7 @@ function! go#lint#Gometa(...) abort return endif - for linter in g:go_metalinter_allowed + for linter in g:go_metalinter_enabled let meta_command .= " --enable=".linter endfor diff --git a/doc/vim-go.txt b/doc/vim-go.txt index f95544113e..3c4203750d 100644 --- a/doc/vim-go.txt +++ b/doc/vim-go.txt @@ -422,7 +422,7 @@ COMMANDS *go-commands* Calls the underlying `gometalinter` tool and displays all warnings and errors in a quickfix window. By default the following linters are enabled: "'vet', 'golint', 'errcheck'". This can be changed with the - |g:go_metalinter_allowed| variable. To override the command completely + |g:go_metalinter_enabled| variable. To override the command completely use the variable |g:go_metalinter_command| @@ -831,12 +831,12 @@ Adds custom text objects. By default it's enabled. > let g:go_textobj_enabled = 1 < - *'g:go_metalinter_allowed'* + *'g:go_metalinter_enabled'* -Specifiies the currently allowed linters for the |GoMetaLinter| command. By +Specifies the currently enabled linters for the |GoMetaLinter| command. By default it's using `vet`, `golint` and `errcheck` > - let g:go_metalinter_allowed = ['vet', 'golint', 'errcheck'] + let g:go_metalinter_enabled = ['vet', 'golint', 'errcheck'] < *'g:go_metalinter_command'*