#756 Escape the paths used for the --include parameter for gometalinter, which uses RE2

This commit is contained in:
w0rp
2017-07-11 23:47:13 +01:00
parent d12e990f73
commit 340c0bbac5
4 changed files with 14 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ function! ale_linters#go#gometalinter#GetCommand(buffer) abort
let l:options = ale#Var(a:buffer, 'go_gometalinter_options')
return ale#Escape(l:executable)
\ . ' --include=' . ale#Escape(l:filename)
\ . ' --include=' . ale#Escape(ale#util#EscapePCRE(l:filename))
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' ' . ale#Escape(fnamemodify(l:filename, ':h'))
endfunction