go build: skip not current buffer (#531)
* go build: skip not current buffer * fix gobuild_handler.vader
This commit is contained in:
parent
ab9afaa2bf
commit
bf0b2cfd84
@ -43,7 +43,7 @@ function! ale_linters#go#gobuild#Handler(buffer, lines) abort
|
|||||||
|
|
||||||
for l:match in ale_linters#go#gobuild#GetMatches(a:lines)
|
for l:match in ale_linters#go#gobuild#GetMatches(a:lines)
|
||||||
" Omit errors from imported go packages
|
" Omit errors from imported go packages
|
||||||
if ale#path#IsBufferPath(a:buffer, l:match[0])
|
if !ale#path#IsBufferPath(a:buffer, l:match[1])
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ Execute (The gobuild handler should handle names with spaces):
|
|||||||
\ ]), 'v:val[1:4]')
|
\ ]), 'v:val[1:4]')
|
||||||
|
|
||||||
Execute (The gobuild handler should handle relative paths correctly):
|
Execute (The gobuild handler should handle relative paths correctly):
|
||||||
:file! /foo/bar/baz.go
|
:e! /foo/bar/baz.go
|
||||||
|
|
||||||
AssertEqual
|
AssertEqual
|
||||||
\ [
|
\ [
|
||||||
@ -39,6 +39,6 @@ Execute (The gobuild handler should handle relative paths correctly):
|
|||||||
\ 'type': 'E',
|
\ 'type': 'E',
|
||||||
\ },
|
\ },
|
||||||
\ ],
|
\ ],
|
||||||
\ ale_linters#go#gobuild#Handler(42, [
|
\ ale_linters#go#gobuild#Handler(bufnr('$'), [
|
||||||
\ 'baz.go:27: missing argument for Printf("%s"): format reads arg 2, have only 1 args',
|
\ 'baz.go:27: missing argument for Printf("%s"): format reads arg 2, have only 1 args',
|
||||||
\ ])
|
\ ])
|
||||||
|
Loading…
Reference in New Issue
Block a user