Skip to content

Commit

Permalink
Add deadline flag support in gometalinter
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalo committed Oct 18, 2015
1 parent 17b57b9 commit 344a138
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions autoload/go/lint.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions doc/vim-go.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Expand Down

0 comments on commit 344a138

Please sign in to comment.