Merge pull request #3390 from benknoble/fix-dafny-filename

dafny: include correct filename in lint results
This commit is contained in:
Horacio Sanson 2021-01-06 11:19:29 +09:00 committed by GitHub
commit 4c454c96a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -6,7 +6,7 @@ function! ale_linters#dafny#dafny#Handle(buffer, lines) abort
for l:match in ale#util#GetMatches(a:lines, l:pattern) for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, { call add(l:output, {
\ 'bufnr': a:buffer, \ 'filename': l:match[1],
\ 'col': l:match[3] + 0, \ 'col': l:match[3] + 0,
\ 'lnum': l:match[2] + 0, \ 'lnum': l:match[2] + 0,
\ 'text': l:match[5], \ 'text': l:match[5],

View file

@ -8,14 +8,14 @@ Execute(The Dafny handler should parse output correctly):
AssertEqual AssertEqual
\ [ \ [
\ { \ {
\ 'bufnr': 0, \ 'filename': 'File.dfy',
\ 'col': 45, \ 'col': 45,
\ 'lnum': 123, \ 'lnum': 123,
\ 'text': 'A precondition for this call might not hold.', \ 'text': 'A precondition for this call might not hold.',
\ 'type': 'E' \ 'type': 'E'
\ }, \ },
\ { \ {
\ 'bufnr': 0, \ 'filename': 'File.dfy',
\ 'col': 90, \ 'col': 90,
\ 'lnum': 678, \ 'lnum': 678,
\ 'text': 'This is the precondition that might not hold.', \ 'text': 'This is the precondition that might not hold.',