Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VerilogLintBear - minor fix for Verilator lint #3003

Open
svenka3 opened this issue May 9, 2023 · 1 comment
Open

VerilogLintBear - minor fix for Verilator lint #3003

svenka3 opened this issue May 9, 2023 · 1 comment

Comments

@svenka3
Copy link

svenka3 commented May 9, 2023

I am trying https://pypi.org/project/VerilogLintBear/ with latest Verilator and I believe the regexp needs enhancement to add column number parsing. Below is what I had to fi to get it working:

Old code:

@linter(executable='verilator',
        output_format='regex',
        use_stderr=True,
        output_regex=r'\%(?:(?P<severity>Error|Warning.*?).*?):'
        r'.+?:(?P<line>.+?)  (?P<message>.+)')

New/fix:

@linter(executable='verilator',
        output_format='regex',
        use_stderr=True,
        output_regex=r'\%(?:(?P<severity>Error|Warning.*?).*?):'
        r'.+?:(?P<line>.+?):(?P<column>.+?): (?P<message>.+)')

Without that fix I got error as:

ValueError: invalid literal for int() with base 10: '6:17:'

With that fix, it is happy and shows:

[DEBUG][17:47:18] Running bear VerilogLintBear...
[DEBUG][17:47:18] Running 'verilator --lint-only /home/srini/proj/AsFigo/git_af_sv_lint/sv_tests/af_sv_mod.sv'

../sv_tests/af_sv_mod.sv
|   6| ··assign·bits_8·=·bits_4;
|    | [NORMAL] VerilogLintBear:
|    | Operator ASSIGNW expects 8 bits on the Assign RHS, but Assign RHS's VARREF 'bits_4' generates 4 bits.
|    | *0: Do nothing
|    |  1: Open file(s)
|    |  2: Add ignore comment

Now it is not clear how to submit this patch. Any comments please?

Thanks
Srini

@svenka3
Copy link
Author

svenka3 commented May 10, 2023

@Adrianzatreanu in case you are tuned in here, please suggest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant