diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index b8f8783555..06c1986d19 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -18,6 +18,12 @@ This is a {{ site.pmd.release_type }} release. ### API Changes +#### Deprecated APIs + +* Implementations of {% jdoc core::lang.rule.RuleViolationFactory %} in each language module, eg {% jdoc java::lang.java.rule.JavaRuleViolationFactory %}. + + + ### External Contributions {% endtocmaker %} diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/ApexRuleViolationFactory.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/ApexRuleViolationFactory.java index 935ceb135f..67cbe80c74 100644 --- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/ApexRuleViolationFactory.java +++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/ApexRuleViolationFactory.java @@ -10,7 +10,11 @@ import net.sourceforge.pmd.RuleViolation; import net.sourceforge.pmd.annotation.InternalApi; import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.rule.AbstractRuleViolationFactory; +import net.sourceforge.pmd.lang.rule.RuleViolationFactory; +/** + * @deprecated See {@link RuleViolationFactory} + */ @Deprecated @InternalApi public final class ApexRuleViolationFactory extends AbstractRuleViolationFactory { diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/RuleViolationFactory.java b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/RuleViolationFactory.java index 68959d1df0..b2a74bcbe1 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/RuleViolationFactory.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/lang/rule/RuleViolationFactory.java @@ -6,11 +6,16 @@ package net.sourceforge.pmd.lang.rule; import net.sourceforge.pmd.Rule; import net.sourceforge.pmd.RuleContext; +import net.sourceforge.pmd.lang.LanguageVersionHandler; import net.sourceforge.pmd.lang.ast.Node; /** * This class handles of producing a Language specific RuleViolation and adding * to a Report. + * + *
Since PMD 6.21.0, implementations of this interface are considered internal + * API and hence deprecated. Clients should exclusively use this interface and obtain + * instances through {@link LanguageVersionHandler#getRuleViolationFactory()}. */ public interface RuleViolationFactory { /** diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/JavaRuleViolationFactory.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/JavaRuleViolationFactory.java index 3592850ca2..50cab205a7 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/JavaRuleViolationFactory.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/JavaRuleViolationFactory.java @@ -13,6 +13,9 @@ import net.sourceforge.pmd.lang.java.ast.JavaNode; import net.sourceforge.pmd.lang.rule.AbstractRuleViolationFactory; import net.sourceforge.pmd.lang.rule.RuleViolationFactory; +/** + * @deprecated See {@link RuleViolationFactory} + */ @Deprecated @InternalApi public final class JavaRuleViolationFactory extends AbstractRuleViolationFactory { diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/EcmascriptRuleViolationFactory.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/EcmascriptRuleViolationFactory.java index 3f60014aef..55b3a08c3b 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/EcmascriptRuleViolationFactory.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/rule/EcmascriptRuleViolationFactory.java @@ -12,7 +12,11 @@ import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.ecmascript.ast.EcmascriptNode; import net.sourceforge.pmd.lang.rule.AbstractRuleViolationFactory; import net.sourceforge.pmd.lang.rule.ParametricRuleViolation; +import net.sourceforge.pmd.lang.rule.RuleViolationFactory; +/** + * @deprecated See {@link RuleViolationFactory} + */ @Deprecated @InternalApi public final class EcmascriptRuleViolationFactory extends AbstractRuleViolationFactory { diff --git a/pmd-jsp/src/main/java/net/sourceforge/pmd/lang/jsp/rule/JspRuleViolationFactory.java b/pmd-jsp/src/main/java/net/sourceforge/pmd/lang/jsp/rule/JspRuleViolationFactory.java index 29c14a1e21..c32cf80bba 100644 --- a/pmd-jsp/src/main/java/net/sourceforge/pmd/lang/jsp/rule/JspRuleViolationFactory.java +++ b/pmd-jsp/src/main/java/net/sourceforge/pmd/lang/jsp/rule/JspRuleViolationFactory.java @@ -14,6 +14,9 @@ import net.sourceforge.pmd.lang.rule.AbstractRuleViolationFactory; import net.sourceforge.pmd.lang.rule.ParametricRuleViolation; import net.sourceforge.pmd.lang.rule.RuleViolationFactory; +/** + * @deprecated See {@link RuleViolationFactory} + */ @Deprecated @InternalApi public final class JspRuleViolationFactory extends AbstractRuleViolationFactory { diff --git a/pmd-plsql/src/main/java/net/sourceforge/pmd/lang/plsql/rule/PLSQLRuleViolationFactory.java b/pmd-plsql/src/main/java/net/sourceforge/pmd/lang/plsql/rule/PLSQLRuleViolationFactory.java index 3cc2822a45..efc9d944c8 100644 --- a/pmd-plsql/src/main/java/net/sourceforge/pmd/lang/plsql/rule/PLSQLRuleViolationFactory.java +++ b/pmd-plsql/src/main/java/net/sourceforge/pmd/lang/plsql/rule/PLSQLRuleViolationFactory.java @@ -13,6 +13,9 @@ import net.sourceforge.pmd.lang.rule.AbstractRuleViolationFactory; import net.sourceforge.pmd.lang.rule.ParametricRuleViolation; import net.sourceforge.pmd.lang.rule.RuleViolationFactory; +/** + * @deprecated See {@link RuleViolationFactory} + */ @Deprecated @InternalApi public final class PLSQLRuleViolationFactory extends AbstractRuleViolationFactory { diff --git a/pmd-scala/src/main/java/net/sourceforge/pmd/lang/scala/rule/ScalaRuleViolationFactory.java b/pmd-scala/src/main/java/net/sourceforge/pmd/lang/scala/rule/ScalaRuleViolationFactory.java index 2546de48a6..580ebd22c8 100644 --- a/pmd-scala/src/main/java/net/sourceforge/pmd/lang/scala/rule/ScalaRuleViolationFactory.java +++ b/pmd-scala/src/main/java/net/sourceforge/pmd/lang/scala/rule/ScalaRuleViolationFactory.java @@ -14,7 +14,7 @@ import net.sourceforge.pmd.lang.rule.ParametricRuleViolation; import net.sourceforge.pmd.lang.rule.RuleViolationFactory; /** - * A RuleViolationFactory for Scala. + * @deprecated See {@link RuleViolationFactory} */ @Deprecated @InternalApi diff --git a/pmd-visualforce/src/main/java/net/sourceforge/pmd/lang/vf/rule/VfRuleViolationFactory.java b/pmd-visualforce/src/main/java/net/sourceforge/pmd/lang/vf/rule/VfRuleViolationFactory.java index d8521fbd8b..eaacfbad68 100644 --- a/pmd-visualforce/src/main/java/net/sourceforge/pmd/lang/vf/rule/VfRuleViolationFactory.java +++ b/pmd-visualforce/src/main/java/net/sourceforge/pmd/lang/vf/rule/VfRuleViolationFactory.java @@ -14,6 +14,9 @@ import net.sourceforge.pmd.lang.rule.ParametricRuleViolation; import net.sourceforge.pmd.lang.rule.RuleViolationFactory; import net.sourceforge.pmd.lang.vf.ast.VfNode; +/** + * @deprecated See {@link RuleViolationFactory} + */ @Deprecated @InternalApi public final class VfRuleViolationFactory extends AbstractRuleViolationFactory { diff --git a/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/rule/VmRuleViolationFactory.java b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/rule/VmRuleViolationFactory.java index 39f425c19c..ef333209b0 100644 --- a/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/rule/VmRuleViolationFactory.java +++ b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/rule/VmRuleViolationFactory.java @@ -14,6 +14,9 @@ import net.sourceforge.pmd.lang.rule.ParametricRuleViolation; import net.sourceforge.pmd.lang.rule.RuleViolationFactory; import net.sourceforge.pmd.lang.vm.ast.AbstractVmNode; +/** + * @deprecated See {@link RuleViolationFactory} + */ @Deprecated @InternalApi public final class VmRuleViolationFactory extends AbstractRuleViolationFactory { diff --git a/pmd-xml/src/main/java/net/sourceforge/pmd/lang/xml/rule/XmlRuleViolationFactory.java b/pmd-xml/src/main/java/net/sourceforge/pmd/lang/xml/rule/XmlRuleViolationFactory.java index 9ae89028a2..c4fe01a4be 100644 --- a/pmd-xml/src/main/java/net/sourceforge/pmd/lang/xml/rule/XmlRuleViolationFactory.java +++ b/pmd-xml/src/main/java/net/sourceforge/pmd/lang/xml/rule/XmlRuleViolationFactory.java @@ -14,6 +14,9 @@ import net.sourceforge.pmd.lang.rule.ParametricRuleViolation; import net.sourceforge.pmd.lang.rule.RuleViolationFactory; import net.sourceforge.pmd.lang.xml.ast.XmlNode; +/** + * @deprecated See {@link RuleViolationFactory} + */ @Deprecated @InternalApi public final class XmlRuleViolationFactory extends AbstractRuleViolationFactory {