When using includes, verilator will print the errors of the included files. Thus if there are errors in the included file they will be also printed in the "parent" file, but the line numbers will be completely messed up and the errors will appear in random places.
It would be better to include the current file name in the error parsing string.
I am not familiar with rust but the regex should be modified as follows
https://github.com/vivekmalneedi/veridian/blob/aca8ee110002bab42435830823db8d569221985e/src/diagnostics.rs#L243
When using
includes
, verilator will print the errors of the included files. Thus if there are errors in the included file they will be also printed in the "parent" file, but the line numbers will be completely messed up and the errors will appear in random places.It would be better to include the current file name in the error parsing string.
I am not familiar with rust but the regex should be modified as follows
r"%(?P<severity>Error|Warning)(-(?P<warning_type>[A-Z0-9_]+))?:
+file_path
+:(?P<line>\d+):((?P<col>\d+):)? ?(?P<message>.*)"