From c37cc1c8a3cd2d014258d4252c4b495e48e844a5 Mon Sep 17 00:00:00 2001 From: "D. Ben Knoble" Date: Thu, 8 Oct 2020 11:54:17 -0400 Subject: [PATCH 1/2] dafny: include correct filename in lint results Results can come from included files, not just the current buffer. --- ale_linters/dafny/dafny.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ale_linters/dafny/dafny.vim b/ale_linters/dafny/dafny.vim index b5b90675..e6021d99 100644 --- a/ale_linters/dafny/dafny.vim +++ b/ale_linters/dafny/dafny.vim @@ -6,7 +6,7 @@ function! ale_linters#dafny#dafny#Handle(buffer, lines) abort for l:match in ale#util#GetMatches(a:lines, l:pattern) call add(l:output, { - \ 'bufnr': a:buffer, + \ 'filename': l:match[1], \ 'col': l:match[3] + 0, \ 'lnum': l:match[2] + 0, \ 'text': l:match[5], From 160af4945079ae8df28f298f6d508f15005418fb Mon Sep 17 00:00:00 2001 From: "D. Ben Knoble" Date: Thu, 8 Oct 2020 12:02:30 -0400 Subject: [PATCH 2/2] update tests --- test/handler/test_dafny_handler.vader | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/handler/test_dafny_handler.vader b/test/handler/test_dafny_handler.vader index 674f691d..797d348e 100644 --- a/test/handler/test_dafny_handler.vader +++ b/test/handler/test_dafny_handler.vader @@ -8,14 +8,14 @@ Execute(The Dafny handler should parse output correctly): AssertEqual \ [ \ { - \ 'bufnr': 0, + \ 'filename': 'File.dfy', \ 'col': 45, \ 'lnum': 123, \ 'text': 'A precondition for this call might not hold.', \ 'type': 'E' \ }, \ { - \ 'bufnr': 0, + \ 'filename': 'File.dfy', \ 'col': 90, \ 'lnum': 678, \ 'text': 'This is the precondition that might not hold.',