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

how to change lint rule "legacy-generate-region"? #2288

Open
ddppt-yy opened this issue Nov 7, 2024 · 6 comments
Open

how to change lint rule "legacy-generate-region"? #2288

ddppt-yy opened this issue Nov 7, 2024 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers style-linter Verilog style-linter issues

Comments

@ddppt-yy
Copy link

ddppt-yy commented Nov 7, 2024

Summary
//Brief description of request. Reference [style-lint-rule-name] if this is
//about an existing rule, or suggest new lint rule name.
hello:
in rule file https://chipsalliance.github.io/verible/lint.html#generate-label-prefix , there is no parameter to user change the style_regex.

May I ask whether modification is not supported or I have not found a way to modify

@ddppt-yy ddppt-yy added enhancement New feature or request style-linter Verilog style-linter issues labels Nov 7, 2024
@IEncinas10
Copy link
Collaborator

The rule specifically checks against gen_ or g_ prefixes

if (!(absl::StartsWith(label->text(), "g_") ||

The rule could be generalized to take a regex (or a list of prefixes, ...). In case you're considering giving it a try, this might serve as an example: https://github.com/chipsalliance/verible/blob/master/verilog/analysis/checkers/enum_name_style_rule.cc

@ddppt-yy
Copy link
Author

ddppt-yy commented Nov 8, 2024

The rule specifically checks against gen_ or g_ prefixes

if (!(absl::StartsWith(label->text(), "g_") ||

The rule could be generalized to take a regex (or a list of prefixes, ...). In case you're considering giving it a try, this might serve as an example: https://github.com/chipsalliance/verible/blob/master/verilog/analysis/checkers/enum_name_style_rule.cc

This means that the user cannot modify the regular expression with test parameters, only by recompiling it to a new linter file, right?

@ddppt-yy ddppt-yy closed this as completed Nov 8, 2024
@ddppt-yy ddppt-yy reopened this Nov 8, 2024
@IEncinas10
Copy link
Collaborator

Right. Currently, there is no way of configuring the rule. But it can be made configurable.

@hzeller hzeller reopened this Nov 11, 2024
@hzeller
Copy link
Collaborator

hzeller commented Nov 11, 2024

I think we should keep this open until implemented.

@IEncinas10 IEncinas10 added the good first issue Good for newcomers label Nov 11, 2024
@IEncinas10
Copy link
Collaborator

Agree. Let's leave it open with a good first issue tag. Feel free to ask for directions/help.

@pranjal3060
Copy link

May I work on this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers style-linter Verilog style-linter issues
Projects
None yet
Development

No branches or pull requests

4 participants