From bd13b3915c649c9df426bc20597ee14dd0c563c9 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Thu, 27 Apr 2023 10:33:18 +0200 Subject: [PATCH] [doc] ShortVariable now also reports short enum constant names Refs #3123 --- docs/pages/release_notes.md | 1 + docs/pages/release_notes_pmd7.md | 1 + pmd-java/src/main/resources/category/java/codestyle.xml | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 2ab614df8e..ebed99ea24 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -246,6 +246,7 @@ Contributors: [Lucas Soncini](https://github.com/lsoncini) (@lsoncini), * {% rule java/codestyle/MethodNamingConventions %}: The property `checkNativeMethods` has been removed. The property was deprecated since PMD 6.3.0. Use the property `nativePattern` to control whether native methods should be considered or not. +* {% rule java/codestyle/ShortVariable %}: This rule now also reports short enum constant names. * {% rule java/codestyle/UseDiamondOperator %}: The property `java7Compatibility` has been removed. The rule now handles Java 7 properly without a property. * {% rule java/codestyle/UnnecessaryFullyQualifiedName %}: The rule has two new properties, diff --git a/docs/pages/release_notes_pmd7.md b/docs/pages/release_notes_pmd7.md index ec5fe27f0d..50201d62c3 100644 --- a/docs/pages/release_notes_pmd7.md +++ b/docs/pages/release_notes_pmd7.md @@ -581,6 +581,7 @@ Related issue: [[core] Explicitly name all language versions (#4120)](https://gi * {% rule java/codestyle/MethodNamingConventions %}: The property `checkNativeMethods` has been removed. The property was deprecated since PMD 6.3.0. Use the property `nativePattern` to control whether native methods should be considered or not. +* {% rule java/codestyle/ShortVariable %}: This rule now also reports short enum constant names. * {% rule java/codestyle/UseDiamondOperator %}: The property `java7Compatibility` has been removed. The rule now handles Java 7 properly without a property. * {% rule java/codestyle/UnnecessaryFullyQualifiedName %}: The rule has two new properties, diff --git a/pmd-java/src/main/resources/category/java/codestyle.xml b/pmd-java/src/main/resources/category/java/codestyle.xml index 08bf3bdad7..6eff22774f 100644 --- a/pmd-java/src/main/resources/category/java/codestyle.xml +++ b/pmd-java/src/main/resources/category/java/codestyle.xml @@ -1392,7 +1392,7 @@ public class ShortMethod { class="net.sourceforge.pmd.lang.rule.XPathRule" externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_codestyle.html#shortvariable"> -Fields, local variables, or parameter names that are very short are not helpful to the reader. +Fields, local variables, enum constant names or parameter names that are very short are not helpful to the reader. 3