diff --git a/feed.xml b/feed.xml
index 2d6286eae7..e75d2777cc 100644
--- a/feed.xml
+++ b/feed.xml
@@ -5,8 +5,8 @@
It contains the following rules:
-ApexBadCrypto, ApexCRUDViolation, ApexCSRF, ApexDangerousMethods, ApexInsecureEndpoint, ApexOpenRedirect, ApexSharingViolations, ApexSOQLInjection, ApexSuggestUsingNamedCred, ApexUnitTestClassShouldHaveAsserts, ApexUnitTestShouldNotUseSeeAllDataTrue, ApexXSSFromEscapeFalse, ApexXSSFromURLParam, AvoidDeeplyNestedIfStmts, AvoidDirectAccessTriggerMap, AvoidDmlStatementsInLoops, AvoidGlobalModifier, AvoidHardcodingId, AvoidLogicInTrigger, AvoidSoqlInLoops, AvoidSoslInLoops, ClassNamingConventions, CyclomaticComplexity, EmptyCatchBlock, EmptyIfStmt, EmptyStatementBlock, EmptyTryOrFinallyBlock, EmptyWhileStmt, ExcessiveClassLength, ExcessiveParameterList, ExcessivePublicCount, ForLoopsMustUseBraces, IfElseStmtsMustUseBraces, IfStmtsMustUseBraces, MethodNamingConventions, MethodWithSameNameAsEnclosingClass, NcssConstructorCount, NcssMethodCount, NcssTypeCount, StdCyclomaticComplexity, TooManyFields, VariableNamingConventions, WhileLoopsMustUseBraces
+ApexBadCrypto, ApexCRUDViolation, ApexCSRF, ApexDangerousMethods, ApexInsecureEndpoint, ApexOpenRedirect, ApexSharingViolations, ApexSOQLInjection, ApexSuggestUsingNamedCred, ApexUnitTestClassShouldHaveAsserts, ApexUnitTestShouldNotUseSeeAllDataTrue, ApexXSSFromEscapeFalse, ApexXSSFromURLParam, AvoidDeeplyNestedIfStmts, AvoidDirectAccessTriggerMap, AvoidDmlStatementsInLoops, AvoidGlobalModifier, AvoidHardcodingId, AvoidLogicInTrigger, AvoidNonExistentAnnotations, AvoidSoqlInLoops, AvoidSoslInLoops, ClassNamingConventions, CyclomaticComplexity, EmptyCatchBlock, EmptyIfStmt, EmptyStatementBlock, EmptyTryOrFinallyBlock, EmptyWhileStmt, ExcessiveClassLength, ExcessiveParameterList, ExcessivePublicCount, ForLoopsMustUseBraces, IfElseStmtsMustUseBraces, IfStmtsMustUseBraces, MethodNamingConventions, MethodWithSameNameAsEnclosingClass, NcssConstructorCount, NcssMethodCount, NcssTypeCount, StdCyclomaticComplexity, TooManyFields, VariableNamingConventions, WhileLoopsMustUseBraces
Empty Code (rulesets/apex/empty.xml
):
<rule ref="category/apex/errorprone.xml/AvoidHardcodingId" />
Since: PMD 6.5.0
+ +Priority: Medium (3)
+ +Apex supported non existent annotations for legacy reasons. +In the future, use of such non-existent annotations could result in broken apex code that will not compile. +This will prevent users of garbage annotations from being able to use legitimate annotations added to Apex in the future. +A full list of supported annotations can be found at https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation.htm
+ +This rule is defined by the following Java class: net.sourceforge.pmd.lang.apex.rule.errorprone.AvoidNonExistentAnnotationsRule
+ +Example(s):
+ +@NonExistentAnnotation public class ClassWithNonexistentAnnotation {
+ @NonExistentAnnotation public void methodWithNonExistentAnnotation() {
+ // ...
+ }
+}
+
This rule has the following properties:
+ +Name | +Default Value | +Description | +Multivalued | +
---|---|---|---|
cc_categories | +Style | +Code Climate Categories | +yes. Delimiter is ‘|’. | +
cc_remediation_points_multiplier | +1 | +Code Climate Remediation Points multiplier | +no | +
cc_block_highlighting | +false | +Code Climate Block Highlighting | +no | +
Use this rule by referencing it:
+<rule ref="category/apex/errorprone.xml/AvoidNonExistentAnnotations" />
+
Since: PMD 6.0.0
diff --git a/search.json b/search.json index c0d80f96cf..df46a15fdc 100644 --- a/search.json +++ b/search.json @@ -2637,6 +2637,15 @@ "url": "pmd_rules_apex_errorprone.html#methodwithsamenameasenclosingclass", "summary": "Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors." } +, + +{ +"title": "AvoidNonExistentAnnotations (Apex, Error Prone)", +"tags": "", +"keywords": "AvoidNonExistentAnnotations", +"url": "pmd_rules_apex_errorprone.html#avoidnonexistentannotations", +"summary": "Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors." +}