2017-03-18 12:33:26 -04:00
|
|
|
Execute(Parsing nim errors should work):
|
|
|
|
runtime ale_linters/nim/nimcheck.vim
|
|
|
|
|
|
|
|
AssertEqual
|
|
|
|
\ [
|
|
|
|
\ {
|
|
|
|
\ 'bufnr': 42,
|
|
|
|
\ 'lnum': 8,
|
|
|
|
\ 'col': 8,
|
|
|
|
\ 'text': 'Warning: use {.base.} for base methods; baseless methods are deprecated [UseBase]',
|
|
|
|
\ 'type': 'W',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'bufnr': 42,
|
|
|
|
\ 'lnum': 12,
|
|
|
|
\ 'col': 2,
|
|
|
|
\ 'text': 'Error: identifier expected, but found ''a.barfoo''',
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ },
|
|
|
|
\ {
|
|
|
|
\ 'bufnr': 42,
|
|
|
|
\ 'lnum': 2,
|
|
|
|
\ 'col': 5,
|
|
|
|
\ 'text': 'Hint: ''NotUsed'' is declared but not used [XDeclaredButNotUsed]',
|
|
|
|
\ 'type': 'W',
|
|
|
|
\ },
|
2017-03-22 05:11:32 -04:00
|
|
|
\ {
|
|
|
|
\ 'bufnr': 42,
|
|
|
|
\ 'lnum': 12,
|
|
|
|
\ 'col': 2,
|
|
|
|
\ 'text': 'Error: with : character',
|
|
|
|
\ 'type': 'E',
|
|
|
|
\ },
|
2017-03-18 12:33:26 -04:00
|
|
|
\ ],
|
|
|
|
\ ale_linters#nim#nimcheck#Handle(42, [
|
|
|
|
\ 'Line with wrong( format)',
|
|
|
|
\ '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''',
|
|
|
|
\ '/nested/folder/foobar.nim(2, 5) Hint: ''NotUsed'' is declared but not used [XDeclaredButNotUsed]',
|
2017-03-22 05:11:32 -04:00
|
|
|
\ 'foobar.nim(12, 2) Error: with : character',
|
2017-03-18 12:33:26 -04:00
|
|
|
\ ])
|