From 344a13821678d712fb923b0d8c7ac5ab447d2435 Mon Sep 17 00:00:00 2001 From: gonzalo Date: Fri, 16 Oct 2015 11:16:04 +0200 Subject: [PATCH] Add deadline flag support in gometalinter --- autoload/go/lint.vim | 6 ++++++ doc/vim-go.txt | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/autoload/go/lint.vim b/autoload/go/lint.vim index f68b30b779..5f3e2cf5da 100644 --- a/autoload/go/lint.vim +++ b/autoload/go/lint.vim @@ -6,6 +6,10 @@ if !exists("g:go_metalinter_enabled") let g:go_metalinter_enabled = ['vet', 'golint', 'errcheck'] endif +if !exists("g:go_metalinter_deadline") + let g:go_metalinter_deadline = "5s" +endif + if !exists("g:go_golint_bin") let g:go_golint_bin = "golint" endif @@ -37,6 +41,8 @@ function! go#lint#Gometa(...) abort let meta_command .= " --enable=".linter endfor + " deadline + let meta_command .= " --deadline=" . g:go_metalinter_deadline let meta_command .= " " . goargs else diff --git a/doc/vim-go.txt b/doc/vim-go.txt index 0754f68ba5..185a74b5d6 100644 --- a/doc/vim-go.txt +++ b/doc/vim-go.txt @@ -845,7 +845,14 @@ an advanced settings and is for users who want to have a complete control over of how `gometalinter` should be executed. By default it's empty. > let g:go_metalinter_command = "" +< + *'g:go_metalinter_deadline'* +Overrides the maximum time the linters have to complete By default it's 5 +seconds. +> + let g:go_metalinter_deadline = "5s" +< =============================================================================== TROUBLESHOOTING *go-troubleshooting*