b9f02ffb27
- Re: f224ce8a37
- The issues that prompted the above commit which reverted changes made to `go build` and
`gometalinter` seemed to suggest that the main issue was with gometalinter and that
changes should be put into different commits so they are independent of each other
- This commit reinstates the changes to the `go build` linter which seem to be uncontested
and it also seems absolutely necessary to show errors from all files in the package which
may have caused a build failure.
46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
Before:
|
|
runtime ale_linters/go/gobuild.vim
|
|
|
|
After:
|
|
call ale#linter#Reset()
|
|
|
|
Execute (The gobuild handler should handle names with spaces):
|
|
" We can't test Windows paths with the path resovling on Linux, but we can
|
|
" test the regex.
|
|
AssertEqual
|
|
\ [
|
|
\ [
|
|
\ 'C:\something\file with spaces.go',
|
|
\ '27',
|
|
\ '',
|
|
\ 'missing argument for Printf("%s"): format reads arg 2, have only 1 args',
|
|
\ ],
|
|
\ [
|
|
\ 'C:\something\file with spaces.go',
|
|
\ '5',
|
|
\ '2',
|
|
\ 'expected declaration, found ''STRING'' "log"',
|
|
\ ],
|
|
\ ],
|
|
\ map(ale_linters#go#gobuild#GetMatches([
|
|
\ 'C:\something\file with spaces.go:27: missing argument for Printf("%s"): format reads arg 2, have only 1 args',
|
|
\ 'C:\something\file with spaces.go:5:2: expected declaration, found ''STRING'' "log"',
|
|
\ ]), 'v:val[1:4]')
|
|
|
|
Execute (The gobuild handler should handle relative paths correctly):
|
|
call ale#test#SetFilename('app/test.go')
|
|
|
|
AssertEqual
|
|
\ [
|
|
\ {
|
|
\ 'lnum': 27,
|
|
\ 'col': 0,
|
|
\ 'text': 'missing argument for Printf("%s"): format reads arg 2, have only 1 args',
|
|
\ 'type': 'E',
|
|
\ 'filename': ale#path#Winify(expand('%:p:h') . '/test.go'),
|
|
\ },
|
|
\ ],
|
|
\ ale_linters#go#gobuild#Handler(bufnr(''), [
|
|
\ 'test.go:27: missing argument for Printf("%s"): format reads arg 2, have only 1 args',
|
|
\ ])
|