mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Remove ANSI color codes from nix linter messages (#4944)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
* Remove ANSI color codes from nix linter messages * Add test for color-coded nix linter findings * Fix test: Escape backslashes --------- Co-authored-by: Sebastian Neuser <sebastian.neuser@fnordkollektiv.de> Co-authored-by: Sebastian Neuser <haggl@sineband.de>
This commit is contained in:
@@ -27,6 +27,22 @@ Execute(The nix handler should parse nix-instantiate error messages correctly):
|
||||
\ "@nix {\"unrelated\":\"message\"}"
|
||||
\ ])
|
||||
|
||||
Execute(The nix handler should parse nix-instantiate error messages with ANSI color codes correctly):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': 3,
|
||||
\ 'col': 5,
|
||||
\ 'type': 'E',
|
||||
\ 'text': "undefined variable 'foo'",
|
||||
\ },
|
||||
\
|
||||
\ ],
|
||||
\ ale_linters#nix#nix#Handle(bufnr(''), [
|
||||
\ "@nix {\"line\":3,\"column\":5,\"raw_msg\":\"undefined variable '\\u001b[35;1mfoo\\u001b[0m'\"}",
|
||||
\ "@nix {\"unrelated\":\"message\"}"
|
||||
\ ])
|
||||
|
||||
Execute(The nix handler should parse message from old nix-instantiate correctly):
|
||||
AssertEqual
|
||||
\ [
|
||||
|
||||
Reference in New Issue
Block a user