diff --git a/ale_linters/go/gobuild.vim b/ale_linters/go/gobuild.vim index 6268753..143c2fd 100644 --- a/ale_linters/go/gobuild.vim +++ b/ale_linters/go/gobuild.vim @@ -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 diff --git a/test/handler/test_gobuild_handler.vader b/test/handler/test_gobuild_handler.vader index 7748dcc..54d7ece 100644 --- a/test/handler/test_gobuild_handler.vader +++ b/test/handler/test_gobuild_handler.vader @@ -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', \ ])