Closed javValverde closed 9 months ago
Afternoon @javValverde ,
It sounds like you would want to enforce the prefix except when generics are a specific value.
generic (
g_WIDTH : natural := 32;
g_DEPTH : natural := 256;
RUNNER_CFG : ??
)
I added an exceptions
option to allow for this behavior:
{
"rule": {
"generic_020": {
"disable": false,
"prefixes": [
"g_"
],
"exceptions": [
"runner_cfg"
]
}
}
}
The exceptions are case insensitive. You can use rule generic_007
to enforce the case of the generic.
I pushed an update to the issue-1070
branch. When you get a chance could you check it out on your end and let me know if it works for you?
Thanks,
--Jeremy
I tested it, and it is exactly what I needed. thanks @jeremiah-c-leary
Morning @javValverde ,
Awesome...I will push this to master.
--Jeremy
Is your feature request related to a problem? Please describe. In our naming conventions we enforce generics to start with
g_
. We have however tons of VUnit testbenches, which at least contains the genericRUNNER_CFG
.Describe the solution you'd like I'm unsure as to what the best approach is. One possibility is to add something like
exceptions : [RUNNER_CFG]
to rulegeneric_007
. This kind of exceptions could apply to more rules, so there might be better ideasDescribe alternatives you've considered I could add
vsg_off
/vsg_on
to all my testbenches, but I find it too invasive