Re-rework rules for local variable names now that we can filter by FINAL/NOTFINAL

This commit is contained in:
EliteMasterEric
2026-04-06 04:18:09 -06:00
committed by Hundrec
parent 1c46c98c84
commit 71d7fe0cf6
+14 -4
View File
@@ -95,7 +95,7 @@
"type": "ConditionalCompilation"
},
{
"comment": "Specifies a specific naming format for constant (static) identifiers.",
"comment": "Specifies a specific naming format for static var identifiers.",
"props": {
"ignoreExtern": true,
"format": "^?:_[a-zA-Z0-9]+(?:_[a-zA-Z0-9]+)*$",
@@ -326,11 +326,21 @@
"type": "ListenerName"
},
{
"comment": "Specifies a specific naming format for local variables.",
"comment": "Specifies a specific naming format for local var variables.",
"props": {
"ignoreExtern": true,
"format": "^[a-zA-Z][_a-zA-Z0-9]*$",
"tokens": [],
"format": "^[a-z][a-zA-Z0-9]*$",
"tokens": ["NOTFINAL"],
"severity": "INFO"
},
"type": "LocalVariableName"
},
{
"comment": "Specifies a specific naming format for local final variables.",
"props": {
"ignoreExtern": true,
"format": "^[A-Z][_A-Z0-9]*$",
"tokens": ["FINAL"],
"severity": "INFO"
},
"type": "LocalVariableName"