Skip to content

[BUG] Verilator logger doesn't ouput warnings/errors unless they're verilator errors #489

@alex-the-new-guy

Description

@alex-the-new-guy

Describe the bug
When running a linter there may be errors besides linter tool errors, such as linter executable not being reachable.
Linter output then looks like:

2024-07-19 11:38:37.846 [info] [LintManager] [VerilatorLinter] [verilator]   command: C:\devel\FPGA\verilator\bin\verilator_bin.exe --lint-only -I"c:/tmp/vscode_verilog_testenvs/verilator/sources" -Wall -y ${workspaceFolder}/sources "c:/tmp/vscode_verilog_testenvs/verilator/sources/top.v"
2024-07-19 11:38:37.846 [info] [LintManager] [VerilatorLinter] [verilator]   cwd    : c:\work_module\tmp\vscode_verilog_testenvs\verilator
2024-07-19 11:38:37.941 [info] [LintManager] [VerilatorLinter] [verilator] 0 errors/warnings returned

Which doesn't communicate in any way that the install directory is misconfigured and the linter actually didn't run at all. Meanwhile the message about "directory being invalid", or really anything else that might suggest something went wrong and/or help diagnose it just gets ignored.
Just duping stderr messages into logger.error would be very much good enough.

Environment (please complete the following information):

  • OS: Windows 11 Pro 22621.3880
  • VS Code version: VSCodium 1.90.2 7d98c6de73fb939f1eb4b8a500c569b858b2d297 x64
  • Extension version: 1.14.1

Steps to reproduce
Steps to reproduce the behavior:
In my case:

  1. Set "verilog.liting.linter": "verilator" and "verilog.linting.path": "<some wrong path>"
  2. Launch linting via Verilog: Rerun lint tool
  3. Watch the output

In my case, the output is:

2024-07-19 12:15:05.719 [info] [LintManager] Executing runLintTool()
2024-07-19 12:15:07.323 [info] [LintManager] Using verilator linter
2024-07-19 12:15:07.324 [info] [LintManager] [VerilatorLinter] [verilator] Execute
2024-07-19 12:15:07.324 [info] [LintManager] [VerilatorLinter] [verilator]   command: C:\devel\FPGA\verilator\bin\verilator_bin.exe\verilator_bin.exe --lint-only -I"c:/tmp/vscode_verilog_testenvs/vivado/sources"  "c:/tmp/vscode_verilog_testenvs/vivado/sources/top.v"
2024-07-19 12:15:07.324 [info] [LintManager] [VerilatorLinter] [verilator]   cwd    : c:\tmp\vscode_verilog_testenvs\vivado
2024-07-19 12:15:07.356 [info] [LintManager] [VerilatorLinter] [verilator] 0 errors/warnings returned

Dumping stderr into logger.error would add

2024-07-19 12:28:10.576 [error] [LintManager] [VerilatorLinter] The directory name is invalid.
2024-07-19 12:28:10.576 [error] [LintManager] [VerilatorLinter] 

This, at least, indicates there is an issue.
(also, separate regex for errors and warnings would be nice).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions