From c8f669249ae064aa014ec180df3934f0a82cab29 Mon Sep 17 00:00:00 2001 From: Nathan Sharp <39231199+nwsharp@users.noreply.github.com> Date: Mon, 12 Jul 2021 06:39:53 -0600 Subject: Add Yosys linter for Verilog files. (#3713) * Add yosys for verilog files. * Add handler test for yosys. * fix typo in yosys handler test * fix array order in yosys handler test * add yosys linter to filetype defaults test * fix duplicate tag * add 'yosys' to 'ale-supported-languages-and-tools.txt' --- test/handler/test_yosys_handler.vader | 27 +++++++++++++++++++++++++++ test/test_filetype_linter_defaults.vader | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 test/handler/test_yosys_handler.vader (limited to 'test') diff --git a/test/handler/test_yosys_handler.vader b/test/handler/test_yosys_handler.vader new file mode 100644 index 00000000..a55d0b5b --- /dev/null +++ b/test/handler/test_yosys_handler.vader @@ -0,0 +1,27 @@ +Before: + runtime ale_linters/verilog/yosys.vim + +After: + call ale#linter#Reset() + +Execute(The yosys handler should parse lines correctly): + AssertEqual + \ [ + \ { + \ 'lnum': 3, + \ 'type': 'E', + \ 'text': 'syntax error, unexpected TOK_ID', + \ 'filename': 'file.v' + \ }, + \ { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': 'internal error', + \ }, + \ ], + \ ale_linters#verilog#yosys#Handle(bufnr(''), [ + \ '1. Executing Verilog-2005 frontend: file.v', + \ 'ERROR: internal error', + \ 'file.v:3: ERROR: syntax error, unexpected TOK_ID', + \ ]) + diff --git a/test/test_filetype_linter_defaults.vader b/test/test_filetype_linter_defaults.vader index 419800de..563a093f 100644 --- a/test/test_filetype_linter_defaults.vader +++ b/test/test_filetype_linter_defaults.vader @@ -61,7 +61,7 @@ Execute(The defaults for the zsh filetype should be correct): Execute(The defaults for the verilog filetype should be correct): " This filetype isn't configured with default, so we can test loading all " available linters with this. - AssertEqual ['hdl-checker', 'iverilog', 'verilator', 'vlog', 'xvlog'], GetLinterNames('verilog') + AssertEqual ['hdl-checker', 'iverilog', 'verilator', 'vlog', 'xvlog', 'yosys'], GetLinterNames('verilog') let g:ale_linters_explicit = 1 -- cgit v1.2.3