From 17cfd2e2f8d4ef0e29480917aacbfe479fa5c364 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Mon, 2 Mar 2026 00:53:27 -0500 Subject: [PATCH] Add a rule forbidding long numbers without separators. --- checkstyle.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/checkstyle.json b/checkstyle.json index bcf299cae..2a7ca94ea 100644 --- a/checkstyle.json +++ b/checkstyle.json @@ -345,6 +345,18 @@ }, "type": "LocalVariableName" }, + { + "comment": "Puts a warning on long numbers without separators. 1000000 is invalid and 1_000_000 is valid.", + "props": { + "severity": "INFO", + + "ignoreNumbers": [], + + "checkBinary": false, + "checkHexadecimal": false + }, + "type": "LongNumber" + }, { "comment": "If enabled, warns when unlabelled numeric values get used. Use named constants instead to improve code clarity.", "props": { "ignoreNumbers": [-1, 0, 1, 2], "severity": "INFO" },