go build: skip not current buffer (#531)

* go build: skip not current buffer

* fix gobuild_handler.vader
This commit is contained in:
Alexandr 2017-05-06 12:08:34 +03:00 committed by w0rp
parent ab9afaa2bf
commit bf0b2cfd84
2 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,7 @@ function! ale_linters#go#gobuild#Handler(buffer, lines) abort
for l:match in ale_linters#go#gobuild#GetMatches(a:lines)
" 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
endif

View File

@ -28,7 +28,7 @@ Execute (The gobuild handler should handle names with spaces):
\ ]), 'v:val[1:4]')
Execute (The gobuild handler should handle relative paths correctly):
:file! /foo/bar/baz.go
:e! /foo/bar/baz.go
AssertEqual
\ [
@ -39,6 +39,6 @@ Execute (The gobuild handler should handle relative paths correctly):
\ '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',
\ ])