Updated plugins
This commit is contained in:
@@ -2,13 +2,19 @@ if !exists("g:go_errcheck_bin")
|
||||
let g:go_errcheck_bin = "errcheck"
|
||||
endif
|
||||
|
||||
function! go#errcheck#Run() abort
|
||||
let bin_path = go#tool#BinPath(g:go_errcheck_bin)
|
||||
if empty(bin_path)
|
||||
return
|
||||
function! go#errcheck#Run(...) abort
|
||||
if a:0 == 0
|
||||
let package = go#package#ImportPath(expand('%:p:h'))
|
||||
else
|
||||
let package = a:1
|
||||
end
|
||||
|
||||
let bin_path = go#tool#BinPath(g:go_errcheck_bin)
|
||||
if empty(bin_path)
|
||||
return
|
||||
endif
|
||||
|
||||
let out = system(bin_path . ' ' . shellescape(expand('%:p:h')))
|
||||
let out = system(bin_path . ' ' . package)
|
||||
if v:shell_error
|
||||
let errors = []
|
||||
let mx = '^\(.\{-}\):\(\d\+\):\(\d\+\)\s*\(.*\)'
|
||||
@@ -16,7 +22,7 @@ function! go#errcheck#Run() abort
|
||||
let tokens = matchlist(line, mx)
|
||||
|
||||
if !empty(tokens)
|
||||
call add(errors, {"filename": tokens[1],
|
||||
call add(errors, {"filename": expand(DefaultGoPath() . "/src/" . tokens[1]),
|
||||
\"lnum": tokens[2],
|
||||
\"col": tokens[3],
|
||||
\"text": tokens[4]})
|
||||
|
||||
Reference in New Issue
Block a user