Closed larshb closed 7 months ago
Morning @larshb ,
I added an option upper_or_lower
that will check for upper or lower cases.
I pushed an update to the issue-1047
branch, when you get a chance could you check it out on your end and let me know what you think?
Thanks,
--Jeremy
Morning @larshb ,
Just wanted to ping you on this issue to see if you had time to check it out.
Thanks,
--Jeremy
Hello @jeremiah-c-leary ,
Sorry for my late response. I've tested the branch and it looks good to me.
Excerpt of YAML-config
rule:
use_clause_502:
case: 'upper_or_lower'
Excerpt of VHDL with intentional violation
library mylib;
use mylibrary.mypackage.my_component;
use mylibrary.mypackage.My_Constant;
VSG output
Phase 6 of 7... Reporting
Total Rules Checked: 712
Total Violations: 1
Error : 1
Warning : 0
----------------------------+------------+------------+--------------------------------------
Rule | severity | line(s) | Solution
----------------------------+------------+------------+--------------------------------------
use_clause_502 | Error | 31 | Change "My_Constant" to "MY_CONSTANT" or "my_constant"
----------------------------+------------+------------+--------------------------------------
Morning @larshb ,
Awesome, I will get this merged to master.
--Jeremy
When using the
use
-keyword I will sometimes import components (lowercase) and sometimes import constants (uppercase). But I can't have both without disablinguse_clause_502
.I would like to be able to set enforcement of "either". Eg.
resulting in
Alternatively, the prefix and suffix exceptions can be expanded to let you enforce case of the entire key. Eg. a prefix
C_
enforces upper-case on the entire key, while everything else is enforced 'lower' by default.