From c9cb88e55ccfa57febd757f1db87453c0d1ea4f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Mon, 13 Aug 2018 05:16:17 +0200 Subject: [PATCH] Deprecate old rules --- docs/pages/release_notes.md | 11 +++++++++++ .../rule/codestyle/VariableNamingConventionsRule.java | 1 + .../src/main/resources/category/java/codestyle.xml | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index b341ed6703..ad2ae7d665 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -51,6 +51,17 @@ This is a minor release. ### API Changes +#### Deprecated rules + +* The Java rules [`VariableNamingConventions`](pmd_rules_java_codestyle.html#variablenamingconventions), + [`MIsLeadingVariableName`](pmd_rules_java_codestyle.html#misleadingvariablename), + [`SuspiciousConstantFieldName`](pmd_rules_java_codestyle.html#suspiciousconstantfieldname), + and [`AvoidPrefixingMethodParameters`](pmd_rules_java_codestyle.html#avoidprefixingmethodparameters) are now deprecated, + and will be removed with version 7.0.0. They are replaced by the more general + [`FieldNamingConventions`](pmd_rules_java_codestyle.html#fieldnamingconventions), + [`FormalParameterNamingConventions`](pmd_rules_java_codestyle.html#formalparameternamingconventions), and + [`LocalVariableNamingConventions`](pmd_rules_java_codestyle.html#localvariablenamingconventions). + ### External Contributions * [#109](https://github.com/pmd/pmd/pull/109): \[java] Add two linguistics rules under naming - [Arda Aslan](https://github.com/ardaasln) diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/codestyle/VariableNamingConventionsRule.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/codestyle/VariableNamingConventionsRule.java index 093cff17f6..3e79516e91 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/codestyle/VariableNamingConventionsRule.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/codestyle/VariableNamingConventionsRule.java @@ -23,6 +23,7 @@ import net.sourceforge.pmd.properties.BooleanProperty; import net.sourceforge.pmd.properties.PropertyDescriptor; import net.sourceforge.pmd.properties.StringMultiProperty; +@Deprecated public class VariableNamingConventionsRule extends AbstractJavaRule { private boolean checkMembers; diff --git a/pmd-java/src/main/resources/category/java/codestyle.xml b/pmd-java/src/main/resources/category/java/codestyle.xml index a6e9b4c955..398ae674e0 100644 --- a/pmd-java/src/main/resources/category/java/codestyle.xml +++ b/pmd-java/src/main/resources/category/java/codestyle.xml @@ -126,6 +126,7 @@ public class MyClass { @@ -1257,6 +1258,7 @@ public class Foo { @@ -1579,6 +1581,7 @@ public class Something { @@ -1955,6 +1958,7 @@ public class Foo {