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

Multi-file support #7

Open
DeeeeLAN opened this issue Apr 12, 2019 · 1 comment
Open

Multi-file support #7

DeeeeLAN opened this issue Apr 12, 2019 · 1 comment

Comments

@DeeeeLAN
Copy link

DeeeeLAN commented Apr 12, 2019

This plugin works great until I tried to set it up for linting a testbench. I modified my arguments to compile the full testbench because per-file compiling doesn't work when there are class-based dependencies to be aware of.

Unfortunately, it dumps all the warnings and errors it finds into the current file.

It looks like the linter attempts to track files, but the regex doesn't match the layout of my logs:

** Error: ** while parsing file included at <don't care file>(114)
** at <actual file>(70): (vlog-2730) Undefined variable: 'foo'.

** Error: (vlog-13069) ** while parsing file included at<don't care file>(114)
** at <actual file>(71): near "super": syntax error, unexpected "SystemVerilog keyword 'super'".

** Warning: <other file who's warnings are showing up in my current file>(129): (vlog-2623) Undefined variable: bar.

Obviously this makes the regex more complicated because the vlog error code can go on either side of the file.

I tried editing the regex in linter.py to the following (with multiline on):

        r'\*\* ((?P<error>Error)|(?P<warning>Warning)): '
        r'((\(vlog-\d+\) )?\*\* while .*\n)*'
        r'((\*\* at )?((?P<file>.*)\((?P<line>\d+)\): ))?'
        r'(\(vlog-\d+\) )?'
        r'(?P<message>([^"\'\n]*(?P<quote>["\'])(?P<near>[^"\']+)(?P=quote))?.*)'

This works much better, but I still ended up with all the warning from other files in the main file.

Looking through the SublimeLinter issues, I came across the following:
SublimeLinter/SublimeLinter#1528

Changing ?P<file> to ?P<filename> fixed the multi-file issue for me.

The only issue that remained was because I am compiling the entire testbench, the tempfile doesn't work for me. A setting to disable that would be nice. It doesn't get in the way, but it creates unnecessary work.

Let me know if you have any questions.

@jevogel
Copy link
Owner

jevogel commented Apr 18, 2019

Hi DeeeeLAN, thanks for filing this issue. I've changed jobs recently and no longer work with these tools, but I welcome any improvements to the plugin. Feel free to create a pull request with the fixes you outlined, and a setting for disabling the tempfile setting if you want, and I will merge it.

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

No branches or pull requests

2 participants