summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2021-05-27 22:03:39 +0100
committerw0rp <devw0rp@gmail.com>2021-05-27 22:03:46 +0100
commit1b08791228f5aca4545a3fba6699b29a003028fe (patch)
tree42cb78fe66f93100217ecb1230c269c26d58db1b /autoload
parenta02a4f2811f810877f3c3859cca963f9578ff94a (diff)
downloadale-1b08791228f5aca4545a3fba6699b29a003028fe.zip
Make staticcheck configurable with GOPATH detection
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/go.vim14
1 files changed, 14 insertions, 0 deletions
diff --git a/autoload/ale/go.vim b/autoload/ale/go.vim
index 4a21e596..bce85a87 100644
--- a/autoload/ale/go.vim
+++ b/autoload/ale/go.vim
@@ -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