mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-10 05:22:31 +08:00
Merge pull request #3227 from Ma27/nixunstable-error-fmt
Update error-parser for `nix-instantiate` on Nix 2.4+
This commit is contained in:
@@ -5,6 +5,29 @@ After:
|
||||
call ale#linter#Reset()
|
||||
|
||||
Execute(The nix handler should parse nix-instantiate error messages correctly):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': 6,
|
||||
\ 'col': 3,
|
||||
\ 'type': 'E',
|
||||
\ 'text': "syntax error, unexpected ']', expecting ';'",
|
||||
\ },
|
||||
\ {
|
||||
\ 'lnum': 3,
|
||||
\ 'col': 5,
|
||||
\ 'type': 'E',
|
||||
\ 'text': "undefined variable 'foo'",
|
||||
\ },
|
||||
\
|
||||
\ ],
|
||||
\ ale_linters#nix#nix#Handle(bufnr(''), [
|
||||
\ "@nix {\"line\":6,\"column\":3,\"raw_msg\":\"syntax error, unexpected ']', expecting ';'\"}",
|
||||
\ "@nix {\"line\":3,\"column\":5,\"raw_msg\":\"undefined variable 'foo'\"}",
|
||||
\ "@nix {\"unrelated\":\"message\"}"
|
||||
\ ])
|
||||
|
||||
Execute(The nix handler should parse message from old nix-instantiate correctly):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
|
||||
Reference in New Issue
Block a user