summaryrefslogtreecommitdiff
path: root/ale_linters/go
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-06-06 10:22:52 +0100
committerw0rp <devw0rp@gmail.com>2017-06-06 10:22:52 +0100
commita0e0408ecc39d0fc7b8b66ac39c2dc5e7805e787 (patch)
treeaafb0fc1d8809c25972a1003743cd48e2c9e613d /ale_linters/go
parentd41f15bcbcc53d9a71eaa23dddcd6eb94328f7b7 (diff)
downloadale-a0e0408ecc39d0fc7b8b66ac39c2dc5e7805e787.zip
Complain about incorrect uses of expand('%...')
Diffstat (limited to 'ale_linters/go')
-rw-r--r--ale_linters/go/gometalinter.vim4
1 files changed, 3 insertions, 1 deletions
diff --git a/ale_linters/go/gometalinter.vim b/ale_linters/go/gometalinter.vim
index e6cd7250..671b77cf 100644
--- a/ale_linters/go/gometalinter.vim
+++ b/ale_linters/go/gometalinter.vim
@@ -6,7 +6,9 @@ if !exists('g:ale_go_gometalinter_options')
endif
function! ale_linters#go#gometalinter#GetCommand(buffer) abort
- return 'gometalinter --include=''^' . expand('%:p') . '.*$'' '
+ let l:filename = expand('#' . a:buffer . ':p')
+
+ return 'gometalinter --include=''^' . l:filename . '.*$'' '
\ . ale#Var(a:buffer, 'go_gometalinter_options')
\ . ' ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h'))
endfunction