Make the nimcheck tests more reliable
This commit is contained in:
parent
07bcbd4c06
commit
702b203c51
@ -32,7 +32,6 @@ function! ale_linters#nim#nimcheck#Handle(buffer, lines) abort
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
call add(l:output, {
|
call add(l:output, {
|
||||||
\ 'bufnr': a:buffer,
|
|
||||||
\ 'lnum': l:line,
|
\ 'lnum': l:line,
|
||||||
\ 'col': l:column,
|
\ 'col': l:column,
|
||||||
\ 'text': l:text,
|
\ 'text': l:text,
|
||||||
|
@ -1,38 +1,35 @@
|
|||||||
Execute(Parsing nim errors should work):
|
Execute(Parsing nim errors should work):
|
||||||
runtime ale_linters/nim/nimcheck.vim
|
runtime ale_linters/nim/nimcheck.vim
|
||||||
|
silent file foobar.nim
|
||||||
|
|
||||||
AssertEqual
|
AssertEqual
|
||||||
\ [
|
\ [
|
||||||
\ {
|
\ {
|
||||||
\ 'bufnr': 42,
|
|
||||||
\ 'lnum': 8,
|
\ 'lnum': 8,
|
||||||
\ 'col': 8,
|
\ 'col': 8,
|
||||||
\ 'text': 'Warning: use {.base.} for base methods; baseless methods are deprecated [UseBase]',
|
\ 'text': 'Warning: use {.base.} for base methods; baseless methods are deprecated [UseBase]',
|
||||||
\ 'type': 'W',
|
\ 'type': 'W',
|
||||||
\ },
|
\ },
|
||||||
\ {
|
\ {
|
||||||
\ 'bufnr': 42,
|
|
||||||
\ 'lnum': 12,
|
\ 'lnum': 12,
|
||||||
\ 'col': 2,
|
\ 'col': 2,
|
||||||
\ 'text': 'Error: identifier expected, but found ''a.barfoo''',
|
\ 'text': 'Error: identifier expected, but found ''a.barfoo''',
|
||||||
\ 'type': 'E',
|
\ 'type': 'E',
|
||||||
\ },
|
\ },
|
||||||
\ {
|
\ {
|
||||||
\ 'bufnr': 42,
|
|
||||||
\ 'lnum': 2,
|
\ 'lnum': 2,
|
||||||
\ 'col': 5,
|
\ 'col': 5,
|
||||||
\ 'text': 'Hint: ''NotUsed'' is declared but not used [XDeclaredButNotUsed]',
|
\ 'text': 'Hint: ''NotUsed'' is declared but not used [XDeclaredButNotUsed]',
|
||||||
\ 'type': 'W',
|
\ 'type': 'W',
|
||||||
\ },
|
\ },
|
||||||
\ {
|
\ {
|
||||||
\ 'bufnr': 42,
|
|
||||||
\ 'lnum': 12,
|
\ 'lnum': 12,
|
||||||
\ 'col': 2,
|
\ 'col': 2,
|
||||||
\ 'text': 'Error: with : character',
|
\ 'text': 'Error: with : character',
|
||||||
\ 'type': 'E',
|
\ 'type': 'E',
|
||||||
\ },
|
\ },
|
||||||
\ ],
|
\ ],
|
||||||
\ ale_linters#nim#nimcheck#Handle(42, [
|
\ ale_linters#nim#nimcheck#Handle(bufnr(''), [
|
||||||
\ 'Line with wrong( format)',
|
\ 'Line with wrong( format)',
|
||||||
\ 'foobar.nim(8, 8) Warning: use {.base.} for base methods; baseless methods are deprecated [UseBase]',
|
\ 'foobar.nim(8, 8) Warning: use {.base.} for base methods; baseless methods are deprecated [UseBase]',
|
||||||
\ 'foobar.nim(12, 2) Error: identifier expected, but found ''a.barfoo''',
|
\ 'foobar.nim(12, 2) Error: identifier expected, but found ''a.barfoo''',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user