mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-20 00:28:35 +08:00
Make staticcheck configurable with GOPATH detection
This commit is contained in:
@@ -42,3 +42,17 @@ function! ale#go#EnvString(buffer) abort
|
||||
|
||||
return l:env
|
||||
endfunction
|
||||
|
||||
function! ale#go#GetGoPathExecutable(suffix) abort
|
||||
let l:prefix = $GOPATH
|
||||
|
||||
if !empty($GOPATH)
|
||||
let l:prefix = $GOPATH
|
||||
elseif has('win32')
|
||||
let l:prefix = $USERPROFILE . '/go'
|
||||
else
|
||||
let l:prefix = $HOME . '/go'
|
||||
endif
|
||||
|
||||
return ale#path#Simplify(l:prefix . '/' . a:suffix)
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user