[Solved] I can't match errors in build package (errorMatch regex doesn't match)


#1

Hi!

It’s my third day with Atom.
I want to compile code in SystemVerilog language using Modelsim and I found the build package.

Everything is fine, except that I can’t match the error messages. I inserted an error in the code and the compilation messages are:
Model Technology ModelSim - …
– Compiling module xxxx_tb
** Error: (vlog-13069) xxxx_tb.sv(28): near “data”: syntax error, unexpected IDENTIFIER, expecting ‘)’.
– Compiling module xxxx_top_tb
End time: 15:06:07 on Mar 03,2017, Elapsed time: 0:00:00
Errors: 1, Warnings: 0

My .atom-build.cson file is:
‘name’: ‘Compile Verilog’
‘cmd’: ‘vlog’
‘args’: [’.sv’]
‘sh’: ‘true’
‘errorMatch’: ['Error: \([^)]
\) (?[a-zA-z0-9._]+)\((?\d+)\): (?.+)’]

It doesn’t match the errors either with single slashes or with double slashes as above.
I tried to insert this RegEx in Atom’s find comand and --after removal of the named groups (atom doesn’t like the ?<>)-- it was able to match. So, where is the problem?

Could it be the miss of the column?
How can I debug this?

Thank you!


#3

My errorMatch was modified due to the forum markup. Since I cannot edit my post I’ll try to post just the relevant pair again, escaping the special characters:

‘errorMatch’: [‘Error: \\([^)]*\\) (?<file>[a-zA-z0-9._]+)\\((?<line>\\d+)\\): (?<message>.+)’]


#4

Solved
After a few more tests, I discovered that errorMatch was working. It just doesn’t generate colored output as I though. One way to discover if the errors are matching or not is the color of the build bar: if it glows red, errors were matched; if it glows green, no errors were matched.

If errors are matched, you just have to press F4 to go to the first error, but there were no other visual clues.
To improve the visual, I installed the package Atom Linter. I could not find the package in the package list, however I installed linter-verilog and linter was automatically installed as it is a dependence.