mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-08 05:24:46 +08:00
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.
This commit is contained in:
@@ -22,7 +22,7 @@ Execute(The gometalinter callback should return the right defaults):
|
||||
\ ale_linters#go#gometalinter#GetExecutable(bufnr(''))
|
||||
AssertEqual
|
||||
\ ale#Escape('gometalinter')
|
||||
\ . ' --include=' . ale#Escape(ale#util#EscapePCRE(expand('%')))
|
||||
\ . ' --include=' . ale#Escape('^' . ale#util#EscapePCRE(expand('%')))
|
||||
\ . ' ' . ale#Escape(getcwd()),
|
||||
\ ale_linters#go#gometalinter#GetCommand(bufnr(''))
|
||||
|
||||
@@ -34,7 +34,7 @@ Execute(The gometalinter callback should use a configured executable):
|
||||
\ ale_linters#go#gometalinter#GetExecutable(bufnr(''))
|
||||
AssertEqual
|
||||
\ ale#Escape('something else')
|
||||
\ . ' --include=' . ale#Escape(ale#util#EscapePCRE(expand('%')))
|
||||
\ . ' --include=' . ale#Escape('^' . ale#util#EscapePCRE(expand('%')))
|
||||
\ . ' ' . ale#Escape(getcwd()),
|
||||
\ ale_linters#go#gometalinter#GetCommand(bufnr(''))
|
||||
|
||||
@@ -43,7 +43,7 @@ Execute(The gometalinter callback should use configured options):
|
||||
|
||||
AssertEqual
|
||||
\ ale#Escape('gometalinter')
|
||||
\ . ' --include=' . ale#Escape(ale#util#EscapePCRE(expand('%')))
|
||||
\ . ' --include=' . ale#Escape('^' . ale#util#EscapePCRE(expand('%')))
|
||||
\ . ' --foobar'
|
||||
\ . ' ' . ale#Escape(getcwd()),
|
||||
\ ale_linters#go#gometalinter#GetCommand(bufnr(''))
|
||||
|
||||
Reference in New Issue
Block a user