summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorSander van Harmelen <sander@xanzy.io>2017-07-12 09:51:44 +0200
committerSander van Harmelen <sander@xanzy.io>2017-07-12 09:51:44 +0200
commitb2be833744db7e4a293bae5341891a012a276ffc (patch)
tree49a0fd0252372032aab910a5eca441bea19652ed /ale_linters
parent340c0bbac53df00c2d0c00d3e626776c4a6016bf (diff)
downloadale-b2be833744db7e4a293bae5341891a012a276ffc.zip
Fixup #756
The real fix was not using absolute paths anymore (so not expanding with the `:p` option). The regex was correct and should at least include the `^` character to make sure the string starts with the given path/filename and not references the path/filename in some error description.
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/go/gometalinter.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/ale_linters/go/gometalinter.vim b/ale_linters/go/gometalinter.vim
index 26bef321..6d10871d 100644
--- a/ale_linters/go/gometalinter.vim
+++ b/ale_linters/go/gometalinter.vim
@@ -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(ale#util#EscapePCRE(l:filename))
+ \ . ' --include=' . ale#Escape('^' . ale#util#EscapePCRE(l:filename))
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' ' . ale#Escape(fnamemodify(l:filename, ':h'))
endfunction