summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-05-06 23:06:51 +0100
committerw0rp <devw0rp@gmail.com>2017-05-06 23:06:51 +0100
commit702b203c5165bbdeb1279b1198d3f0389c5ada69 (patch)
treef04b1b93781f3b8e54bd9c6411fa351b518486d2
parent07bcbd4c06516a03b8d8f5ff8a9293917aed3277 (diff)
downloadale-702b203c5165bbdeb1279b1198d3f0389c5ada69.zip
Make the nimcheck tests more reliable
-rw-r--r--ale_linters/nim/nimcheck.vim1
-rw-r--r--test/handler/test_nim_handler.vader7
2 files changed, 2 insertions, 6 deletions
diff --git a/ale_linters/nim/nimcheck.vim b/ale_linters/nim/nimcheck.vim
index 61af070c..02a7c931 100644
--- a/ale_linters/nim/nimcheck.vim
+++ b/ale_linters/nim/nimcheck.vim
@@ -32,7 +32,6 @@ function! ale_linters#nim#nimcheck#Handle(buffer, lines) abort
endif
call add(l:output, {
- \ 'bufnr': a:buffer,
\ 'lnum': l:line,
\ 'col': l:column,
\ 'text': l:text,
diff --git a/test/handler/test_nim_handler.vader b/test/handler/test_nim_handler.vader
index 9e4159c6..c9a1b715 100644
--- a/test/handler/test_nim_handler.vader
+++ b/test/handler/test_nim_handler.vader
@@ -1,38 +1,35 @@
Execute(Parsing nim errors should work):
runtime ale_linters/nim/nimcheck.vim
+ silent file foobar.nim
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',
\ },
\ {
- \ 'bufnr': 42,
\ 'lnum': 12,
\ 'col': 2,
\ 'text': 'Error: with : character',
\ 'type': 'E',
\ },
\ ],
- \ ale_linters#nim#nimcheck#Handle(42, [
+ \ ale_linters#nim#nimcheck#Handle(bufnr(''), [
\ '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''',