Documentation Updated

As written in issue #891 apex uses Single Quotes ' ' instead of Double " "
Updated the document to represent the same to the user.
This commit is contained in:
Akshat Bahety
2018-02-15 05:32:47 +05:30
committed by GitHub
parent cd9f4f2248
commit 997a1f61fa

View File

@@ -35,7 +35,7 @@ Otherwise, the other suppression methods are explained in the following sections
## Annotations
When using Java 1.5 or later, or Salesforce.com's Apex you can use annotations to suppress PMD warnings, like this:
When using Java 1.5 or later,you can use annotations to suppress PMD warnings, like this:
// This will suppress all the PMD warnings in this class
@SuppressWarnings("PMD")
@@ -45,6 +45,14 @@ When using Java 1.5 or later, or Salesforce.com's Apex you can use annotations t
}
}
When using Apex make sure to use Single Quotes instead of Double Quotes
```
// This will suppress all the PMD warnings in this class
@SuppressWarnings('PMD')
```
Or you can suppress one rule with an annotation like this:
// This will suppress UnusedLocalVariable warnings in this class
@@ -64,7 +72,7 @@ Multiple rules can be suppressed by providing multiple values, ie:
For Apex, the syntax for this is slightly different:
```
@SuppressWarnings("PMD.UnusedLocalVariable, PMD.UnusedPrivateMethod")
@SuppressWarnings('PMD.UnusedLocalVariable, PMD.UnusedPrivateMethod')
```
PMD Java also obeys the JDK annotation @SuppressWarnings("unused"), which will apply to all rules in the unused ruleset.