Update documentation
This commit is contained in:
@@ -51,6 +51,7 @@ List of rulesets and rules contained in each ruleset.
|
||||
* [ApexXSSFromURLParam](pmd_rules_apex_security.html#apexxssfromurlparam): Makes sure that all values obtained from URL parameters are properly escaped / sanitizedto avoid ...
|
||||
|
||||
## Style
|
||||
* [AvoidDirectAccessTriggerMap](pmd_rules_apex_style.html#avoiddirectaccesstriggermap): Avoid directly accessing Trigger.old and Trigger.new as it can lead to a bug. Triggers should be ...
|
||||
* [AvoidGlobalModifier](pmd_rules_apex_style.html#avoidglobalmodifier): Global classes should be avoided (especially in managed packages) as they can never be deleted or...
|
||||
* [AvoidLogicInTrigger](pmd_rules_apex_style.html#avoidlogicintrigger): As triggers do not allow methods like regular classes they are less flexible and suited to apply ...
|
||||
* [ClassNamingConventions](pmd_rules_apex_style.html#classnamingconventions): Class names should always begin with an upper case character.
|
||||
|
@@ -78,3 +78,4 @@ public class Something {
|
||||
``` xml
|
||||
<rule ref="rulesets/apex/performance.xml/AvoidSoqlInLoops" />
|
||||
```
|
||||
|
||||
|
@@ -20,7 +20,8 @@ Avoid directly accessing Trigger.old and Trigger.new as it can lead to a bug. Tr
|
||||
```
|
||||
|
||||
**Example(s):**
|
||||
```
|
||||
|
||||
``` java
|
||||
trigger AccountTrigger on Account (before insert, before update) {
|
||||
Account a = Trigger.new[0]; //Bad: Accessing the trigger array directly is not recommended.
|
||||
|
||||
|
Reference in New Issue
Block a user