vivekmalneedi / veridian

A SystemVerilog Language Server
MIT License
134 stars 15 forks source link

verilator diagnostics v2 #188

Closed vivekmalneedi closed 8 months ago

vivekmalneedi commented 9 months ago

cherry picked from #176 since the original PR had conflicts with dependency updates on master

vivekmalneedi commented 8 months ago

verilator's lint output doesn't seem to be stable between versions. I can ignore the verilator test to pass CI but I think it would be confusing for a user if this only worked on specific verilator versions. I don't see a good way to use verilator as a library either.

hakan-demirli commented 8 months ago

I have been using diagnostic-language-server for the last couple of months with the following regex configuration on helix editor. I use verilator from nixpkgs which is at v 5.018.

formatPattern= [
    "^(%(Warning|Error)[^:]*:)?\\s*([^:]+):(\\d+):(\\d+)?:?\\s*(\\.\\.\\.)?\\s*(.*)$",
    {line = 4, column = 5, message= [ 7 ], security= 2}
]

My whole configuration is here if it helps. I stole the regex from another users' dotfiles. I am not sure if it works on other versions of verilator.

vivekmalneedi commented 8 months ago

Thanks @hakan-demirli, I realized verilator had an official regex in their docs so I made some slight modifications to that.

hilbert-yaa commented 7 months ago

Thanks for the fix @vivekmalneedi ! I haven't been working on this for a while.

vivekmalneedi commented 7 months ago

No problem @hilbert-yaa, thanks for contributing the original PR!