From 71d7fe0cf63d903dac58ee4770c8a909b95c17a7 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Mon, 2 Mar 2026 00:53:11 -0500 Subject: [PATCH] Re-rework rules for local variable names now that we can filter by FINAL/NOTFINAL --- checkstyle.json | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/checkstyle.json b/checkstyle.json index ae9e026c8..bcf299cae 100644 --- a/checkstyle.json +++ b/checkstyle.json @@ -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"