2017-04-29 12:33:18 -04:00
|
|
|
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):
|
2017-11-20 05:43:45 -05:00
|
|
|
silent file! /foo/bar/baz.go
|
2017-04-29 12:33:18 -04:00
|
|
|
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'lnum': 27,
|
|
|
|
\ 'col': 0,
|
|
|
|
\ 'text': 'missing argument for Printf("%s"): format reads arg 2, have only 1 args',
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ },
|
|
|
|
\ ],
|
2017-05-06 05:10:24 -04:00
|
|
|
\ ale_linters#go#gobuild#Handler(bufnr(''), [
|
2017-11-20 05:43:45 -05:00
|
|
|
\ 'baz.go:27: missing argument for Printf("%s"): format reads arg 2, have only 1 args',
|
2017-04-29 12:33:18 -04:00
|
|
|
\ ])
|