New PMD Rules

Updated 2 months ago by Copado Solutions

Copado now supports PMD version 6.16.0. As part of this upgrade, the following rules have been added to the default RuleSet:

  • ApexDoc
  • AvoidDirectAccessTriggerMap
  • AvoidHardcodingId
  • CyclomaticComplexity
  • EmptyCatchBlock
  • EmptyIfStmt
  • EmptyStatementBlock
  • EmptyTryOrFinallyBlock
  • EmptyWhileStmt
  • FieldNamingConventions
  • FormalParameterNamingConventions
  • LocalVariableNamingConventions
  • OneDeclarationPerLine
  • PropertyNamingConventions

In order to ensure these new rules are available, follow the steps below:

  1. Navigate to Setup > Object Manager > Static Code Analysis Rule.
  2. Go to Fields & Relationships and click on Rule Name.
  3. Scroll down to Values and click on New to add the new rules.


How did we do?