Update documentation

This commit is contained in:
Travis CI (pmd-bot)
2018-06-24 04:52:43 +00:00
parent 09fd4c76a0
commit 300a0fd0f4
4 changed files with 73 additions and 4 deletions

View File

@ -5,8 +5,8 @@
<description>Intended as a documentation theme based on Jekyll for technical writers documenting software and other technical products, this theme has all the elements you would need to handle multiple products with both multi-level sidebar navigation, tags, and other documentation features.</description>
<link>https://pmd.github.io/pmd/</link>
<atom:link href="https://pmd.github.io/pmd/feed.xml" rel="self" type="application/rss+xml"/>
<pubDate>Sun, 24 Jun 2018 04:43:49 +0000</pubDate>
<lastBuildDate>Sun, 24 Jun 2018 04:43:49 +0000</lastBuildDate>
<pubDate>Sun, 24 Jun 2018 04:52:32 +0000</pubDate>
<lastBuildDate>Sun, 24 Jun 2018 04:52:32 +0000</lastBuildDate>
<generator>Jekyll v3.7.3</generator>
</channel>

View File

@ -1308,6 +1308,7 @@ $('#toc').on('click', 'a', function() {
<ul>
<li><a href="pmd_rules_apex_errorprone.html#avoiddirectaccesstriggermap">AvoidDirectAccessTriggerMap</a>: Avoid directly accessing Trigger.old and Trigger.new as it can lead to a bug. Triggers should be …</li>
<li><a href="pmd_rules_apex_errorprone.html#avoidhardcodingid">AvoidHardcodingId</a>: When deploying Apex code between sandbox and production environments, or installing Force.com App…</li>
<li><a href="pmd_rules_apex_errorprone.html#avoidnonexistentannotations">AvoidNonExistentAnnotations</a>: Apex supported non existent annotations for legacy reasons. In the future, use of such…</li>
<li><a href="pmd_rules_apex_errorprone.html#emptycatchblock">EmptyCatchBlock</a>: Empty Catch Block finds instances where an exception is caught, but nothing is done. In most cir…</li>
<li><a href="pmd_rules_apex_errorprone.html#emptyifstmt">EmptyIfStmt</a>: Empty If Statement finds instances where a condition is checked but nothing is done about it.</li>
<li><a href="pmd_rules_apex_errorprone.html#emptystatementblock">EmptyStatementBlock</a>: Empty block statements serve no purpose and should be removed.</li>
@ -1381,7 +1382,7 @@ $('#toc').on('click', 'a', function() {
<p>It contains the following rules:</p>
<p><a href="pmd_rules_apex_security.html#apexbadcrypto">ApexBadCrypto</a>, <a href="pmd_rules_apex_security.html#apexcrudviolation">ApexCRUDViolation</a>, <a href="pmd_rules_apex_security.html#apexcsrf">ApexCSRF</a>, <a href="pmd_rules_apex_security.html#apexdangerousmethods">ApexDangerousMethods</a>, <a href="pmd_rules_apex_security.html#apexinsecureendpoint">ApexInsecureEndpoint</a>, <a href="pmd_rules_apex_security.html#apexopenredirect">ApexOpenRedirect</a>, <a href="pmd_rules_apex_security.html#apexsharingviolations">ApexSharingViolations</a>, <a href="pmd_rules_apex_security.html#apexsoqlinjection">ApexSOQLInjection</a>, <a href="pmd_rules_apex_security.html#apexsuggestusingnamedcred">ApexSuggestUsingNamedCred</a>, <a href="pmd_rules_apex_bestpractices.html#apexunittestclassshouldhaveasserts">ApexUnitTestClassShouldHaveAsserts</a>, <a href="pmd_rules_apex_bestpractices.html#apexunittestshouldnotuseseealldatatrue">ApexUnitTestShouldNotUseSeeAllDataTrue</a>, <a href="pmd_rules_apex_security.html#apexxssfromescapefalse">ApexXSSFromEscapeFalse</a>, <a href="pmd_rules_apex_security.html#apexxssfromurlparam">ApexXSSFromURLParam</a>, <a href="pmd_rules_apex_design.html#avoiddeeplynestedifstmts">AvoidDeeplyNestedIfStmts</a>, <a href="pmd_rules_apex_errorprone.html#avoiddirectaccesstriggermap">AvoidDirectAccessTriggerMap</a>, <a href="pmd_rules_apex_performance.html#avoiddmlstatementsinloops">AvoidDmlStatementsInLoops</a>, <a href="pmd_rules_apex_bestpractices.html#avoidglobalmodifier">AvoidGlobalModifier</a>, <a href="pmd_rules_apex_errorprone.html#avoidhardcodingid">AvoidHardcodingId</a>, <a href="pmd_rules_apex_bestpractices.html#avoidlogicintrigger">AvoidLogicInTrigger</a>, <a href="pmd_rules_apex_performance.html#avoidsoqlinloops">AvoidSoqlInLoops</a>, <a href="pmd_rules_apex_performance.html#avoidsoslinloops">AvoidSoslInLoops</a>, <a href="pmd_rules_apex_codestyle.html#classnamingconventions">ClassNamingConventions</a>, <a href="pmd_rules_apex_design.html#cyclomaticcomplexity">CyclomaticComplexity</a>, <a href="pmd_rules_apex_errorprone.html#emptycatchblock">EmptyCatchBlock</a>, <a href="pmd_rules_apex_errorprone.html#emptyifstmt">EmptyIfStmt</a>, <a href="pmd_rules_apex_errorprone.html#emptystatementblock">EmptyStatementBlock</a>, <a href="pmd_rules_apex_errorprone.html#emptytryorfinallyblock">EmptyTryOrFinallyBlock</a>, <a href="pmd_rules_apex_errorprone.html#emptywhilestmt">EmptyWhileStmt</a>, <a href="pmd_rules_apex_design.html#excessiveclasslength">ExcessiveClassLength</a>, <a href="pmd_rules_apex_design.html#excessiveparameterlist">ExcessiveParameterList</a>, <a href="pmd_rules_apex_design.html#excessivepubliccount">ExcessivePublicCount</a>, <a href="pmd_rules_apex_codestyle.html#forloopsmustusebraces">ForLoopsMustUseBraces</a>, <a href="pmd_rules_apex_codestyle.html#ifelsestmtsmustusebraces">IfElseStmtsMustUseBraces</a>, <a href="pmd_rules_apex_codestyle.html#ifstmtsmustusebraces">IfStmtsMustUseBraces</a>, <a href="pmd_rules_apex_codestyle.html#methodnamingconventions">MethodNamingConventions</a>, <a href="pmd_rules_apex_errorprone.html#methodwithsamenameasenclosingclass">MethodWithSameNameAsEnclosingClass</a>, <a href="pmd_rules_apex_design.html#ncssconstructorcount">NcssConstructorCount</a>, <a href="pmd_rules_apex_design.html#ncssmethodcount">NcssMethodCount</a>, <a href="pmd_rules_apex_design.html#ncsstypecount">NcssTypeCount</a>, <a href="pmd_rules_apex_design.html#stdcyclomaticcomplexity">StdCyclomaticComplexity</a>, <a href="pmd_rules_apex_design.html#toomanyfields">TooManyFields</a>, <a href="pmd_rules_apex_codestyle.html#variablenamingconventions">VariableNamingConventions</a>, <a href="pmd_rules_apex_codestyle.html#whileloopsmustusebraces">WhileLoopsMustUseBraces</a></p>
<p><a href="pmd_rules_apex_security.html#apexbadcrypto">ApexBadCrypto</a>, <a href="pmd_rules_apex_security.html#apexcrudviolation">ApexCRUDViolation</a>, <a href="pmd_rules_apex_security.html#apexcsrf">ApexCSRF</a>, <a href="pmd_rules_apex_security.html#apexdangerousmethods">ApexDangerousMethods</a>, <a href="pmd_rules_apex_security.html#apexinsecureendpoint">ApexInsecureEndpoint</a>, <a href="pmd_rules_apex_security.html#apexopenredirect">ApexOpenRedirect</a>, <a href="pmd_rules_apex_security.html#apexsharingviolations">ApexSharingViolations</a>, <a href="pmd_rules_apex_security.html#apexsoqlinjection">ApexSOQLInjection</a>, <a href="pmd_rules_apex_security.html#apexsuggestusingnamedcred">ApexSuggestUsingNamedCred</a>, <a href="pmd_rules_apex_bestpractices.html#apexunittestclassshouldhaveasserts">ApexUnitTestClassShouldHaveAsserts</a>, <a href="pmd_rules_apex_bestpractices.html#apexunittestshouldnotuseseealldatatrue">ApexUnitTestShouldNotUseSeeAllDataTrue</a>, <a href="pmd_rules_apex_security.html#apexxssfromescapefalse">ApexXSSFromEscapeFalse</a>, <a href="pmd_rules_apex_security.html#apexxssfromurlparam">ApexXSSFromURLParam</a>, <a href="pmd_rules_apex_design.html#avoiddeeplynestedifstmts">AvoidDeeplyNestedIfStmts</a>, <a href="pmd_rules_apex_errorprone.html#avoiddirectaccesstriggermap">AvoidDirectAccessTriggerMap</a>, <a href="pmd_rules_apex_performance.html#avoiddmlstatementsinloops">AvoidDmlStatementsInLoops</a>, <a href="pmd_rules_apex_bestpractices.html#avoidglobalmodifier">AvoidGlobalModifier</a>, <a href="pmd_rules_apex_errorprone.html#avoidhardcodingid">AvoidHardcodingId</a>, <a href="pmd_rules_apex_bestpractices.html#avoidlogicintrigger">AvoidLogicInTrigger</a>, <a href="pmd_rules_apex_errorprone.html#avoidnonexistentannotations">AvoidNonExistentAnnotations</a>, <a href="pmd_rules_apex_performance.html#avoidsoqlinloops">AvoidSoqlInLoops</a>, <a href="pmd_rules_apex_performance.html#avoidsoslinloops">AvoidSoslInLoops</a>, <a href="pmd_rules_apex_codestyle.html#classnamingconventions">ClassNamingConventions</a>, <a href="pmd_rules_apex_design.html#cyclomaticcomplexity">CyclomaticComplexity</a>, <a href="pmd_rules_apex_errorprone.html#emptycatchblock">EmptyCatchBlock</a>, <a href="pmd_rules_apex_errorprone.html#emptyifstmt">EmptyIfStmt</a>, <a href="pmd_rules_apex_errorprone.html#emptystatementblock">EmptyStatementBlock</a>, <a href="pmd_rules_apex_errorprone.html#emptytryorfinallyblock">EmptyTryOrFinallyBlock</a>, <a href="pmd_rules_apex_errorprone.html#emptywhilestmt">EmptyWhileStmt</a>, <a href="pmd_rules_apex_design.html#excessiveclasslength">ExcessiveClassLength</a>, <a href="pmd_rules_apex_design.html#excessiveparameterlist">ExcessiveParameterList</a>, <a href="pmd_rules_apex_design.html#excessivepubliccount">ExcessivePublicCount</a>, <a href="pmd_rules_apex_codestyle.html#forloopsmustusebraces">ForLoopsMustUseBraces</a>, <a href="pmd_rules_apex_codestyle.html#ifelsestmtsmustusebraces">IfElseStmtsMustUseBraces</a>, <a href="pmd_rules_apex_codestyle.html#ifstmtsmustusebraces">IfStmtsMustUseBraces</a>, <a href="pmd_rules_apex_codestyle.html#methodnamingconventions">MethodNamingConventions</a>, <a href="pmd_rules_apex_errorprone.html#methodwithsamenameasenclosingclass">MethodWithSameNameAsEnclosingClass</a>, <a href="pmd_rules_apex_design.html#ncssconstructorcount">NcssConstructorCount</a>, <a href="pmd_rules_apex_design.html#ncssmethodcount">NcssMethodCount</a>, <a href="pmd_rules_apex_design.html#ncsstypecount">NcssTypeCount</a>, <a href="pmd_rules_apex_design.html#stdcyclomaticcomplexity">StdCyclomaticComplexity</a>, <a href="pmd_rules_apex_design.html#toomanyfields">TooManyFields</a>, <a href="pmd_rules_apex_codestyle.html#variablenamingconventions">VariableNamingConventions</a>, <a href="pmd_rules_apex_codestyle.html#whileloopsmustusebraces">WhileLoopsMustUseBraces</a></p>
</li>
<li>
<p>Empty Code (<code class="highlighter-rouge">rulesets/apex/empty.xml</code>):</p>

View File

@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors.">
<meta name="keywords" content=" Error Prone, AvoidDirectAccessTriggerMap, AvoidHardcodingId, EmptyCatchBlock, EmptyIfStmt, EmptyStatementBlock, EmptyTryOrFinallyBlock, EmptyWhileStmt, MethodWithSameNameAsEnclosingClass">
<meta name="keywords" content=" Error Prone, AvoidDirectAccessTriggerMap, AvoidHardcodingId, EmptyCatchBlock, EmptyIfStmt, EmptyStatementBlock, EmptyTryOrFinallyBlock, EmptyWhileStmt, MethodWithSameNameAsEnclosingClass, AvoidNonExistentAnnotations">
<title>Error Prone | PMD Source Code Analyzer</title>
<link rel="stylesheet" href="css/syntax.css">
@ -1382,6 +1382,65 @@ the logic can dynamically identify the proper data to operate against and not fa
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;rule</span> <span class="na">ref=</span><span class="s">"category/apex/errorprone.xml/AvoidHardcodingId"</span> <span class="nt">/&gt;</span>
</code></pre></div></div>
<h2 id="avoidnonexistentannotations">AvoidNonExistentAnnotations</h2>
<p><strong>Since:</strong> PMD 6.5.0</p>
<p><strong>Priority:</strong> Medium (3)</p>
<p>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</p>
<p><strong>This rule is defined by the following Java class:</strong> <a href="https://github.com/pmd/pmd/blob/master/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/errorprone/AvoidNonExistentAnnotationsRule.java">net.sourceforge.pmd.lang.apex.rule.errorprone.AvoidNonExistentAnnotationsRule</a></p>
<p><strong>Example(s):</strong></p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nd">@NonExistentAnnotation</span> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">ClassWithNonexistentAnnotation</span> <span class="o">{</span>
<span class="nd">@NonExistentAnnotation</span> <span class="kd">public</span> <span class="kt">void</span> <span class="nf">methodWithNonExistentAnnotation</span><span class="o">()</span> <span class="o">{</span>
<span class="c1">// ...</span>
<span class="o">}</span>
<span class="o">}</span>
</code></pre></div></div>
<p><strong>This rule has the following properties:</strong></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default Value</th>
<th>Description</th>
<th>Multivalued</th>
</tr>
</thead>
<tbody>
<tr>
<td>cc_categories</td>
<td>Style</td>
<td>Code Climate Categories</td>
<td>yes. Delimiter is |.</td>
</tr>
<tr>
<td>cc_remediation_points_multiplier</td>
<td>1</td>
<td>Code Climate Remediation Points multiplier</td>
<td>no</td>
</tr>
<tr>
<td>cc_block_highlighting</td>
<td>false</td>
<td>Code Climate Block Highlighting</td>
<td>no</td>
</tr>
</tbody>
</table>
<p><strong>Use this rule by referencing it:</strong></p>
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;rule</span> <span class="na">ref=</span><span class="s">"category/apex/errorprone.xml/AvoidNonExistentAnnotations"</span> <span class="nt">/&gt;</span>
</code></pre></div></div>
<h2 id="emptycatchblock">EmptyCatchBlock</h2>
<p><strong>Since:</strong> PMD 6.0.0</p>

View File

@ -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."
}