Since: PMD 6.8.0
Priority: Medium (3)
This rule validates that:
reportPrivate andreportProtected.reportMissingDescription.reportProperty is enabled.By settingreportProperty to false, you can ignore missing comments on properties.Method overrides and tests are both exempted from having ApexDoc.
This rule is defined by the following Java class:net.sourceforge.pmd.lang.apex.rule.documentation.ApexDocRule
Example(s):
/** * Hello World */publicclassHelloWorld{/** * Bar * @return Bar */publicObjectbar(){returnnull;}}This rule has the following properties:
| Name | Default Value | Description |
|---|---|---|
| reportPrivate | false | Report private classes, methods and properties |
| reportProtected | false | Report protected classes, methods and properties |
| reportMissingDescription | true | Report missing main description |
| reportProperty | true | Report properties without comments |
Use this rule with the default properties by just referencing it:
<ruleref="category/apex/documentation.xml/ApexDoc"/>Use this rule and customize it:
<ruleref="category/apex/documentation.xml/ApexDoc"><properties><propertyname="reportPrivate"value="false"/><propertyname="reportProtected"value="false"/><propertyname="reportMissingDescription"value="true"/><propertyname="reportProperty"value="true"/></properties></rule>