Complain about incorrect uses of expand('%...')

This commit is contained in:
w0rp
2017-06-06 10:22:52 +01:00
parent d41f15bcbc
commit a0e0408ecc
3 changed files with 6 additions and 2 deletions

View File

@@ -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