Open JennySmith888 opened 1 month ago
Evening @JennySmith888,
Could you try the following change to your configuration:
rule:
use_clause_501:
case: 'PascalCase'
case_exceptions:
- 'std_logic_1164'
- 'std_logic_unsigned'
- 'std_logic_arith'
That will enforce lower case on the three standard logic libraries while enforcing PascalCase on all other libraries.
Regards,
--Jeremy
Great, that worked, thanks! It would be helpful if there was a way to make the exception more general so it doesn not need to be fully-defined for each standard logic library. Perhaps using something like a wild character, ex. std_*
could work and be intuitive. I can submit a feature request for this is desired. Thanks for the quick help!
Morning @JennySmith888 ,
Great, that worked, thanks!
Awesome.
It would be helpful if there was a way to make the exception more general so it doesn not need to be fully-defined for each standard logic library. Perhaps using something like a wild character, ex. std_* could work and be intuitive.
The exception was implemented to enforce a case for a specific string. So the exception does not exclude the rule from running.
If we allowed wildcards, e.g. std_*
, then any of the following would pass the rule:
std_LoGiC_1164
std_LOGiC_1164
Which I assume would not be desired.
I may be missing a valid use case here though. Could you elaborate on the behavior you would expect if a wild card was allowed?
Regards,
--Jeremy
Afternoon @JennySmith888 ,
Just wanted to ping you on this issue to see if we could move it forward.
Thanks,
--Jeremy
Environment Installed using
pip install vsg --use-pep517
on Ubuntu 22.04.4 LTSDescribe the bug I made the rule:
But when I run
vsg
, it reports errors with packages that begin withstd_
To Reproduce Steps to reproduce the behavior:
AxiVersionTb_badsyntax.vhd
andmy_config.yaml
pasted at the end (GitHub does not support attaching these filetypes)vsg --configuration my_config.yaml --quality_report report.yaml -f AxiVersionTb_badsyntax.vhd
Observe the errors:
View the generated
quality_report.yaml
if desired.Expected behavior I expect the rule
use_clause_501
to be enforced for all package names except those that begin withstd_
. The packages that begin withstd_
should not be reformatted and should not throw an error but should remain as they are in all lowercase.Full
my_config.yaml
Full
AxiVersionTb_badsyntax.vhd
: