Update documentation

TRAVIS_JOB_NUMBER=5078.2
TRAVIS_COMMIT_RANGE=130fee68def5...0356895cc2e6
This commit is contained in:
Travis CI (pmd-bot)
2020-04-04 16:38:25 +00:00
parent 91c94d597a
commit 1c94add1ea
6 changed files with 155 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>Sat, 04 Apr 2020 09:14:29 +0000</pubDate>
<lastBuildDate>Sat, 04 Apr 2020 09:14:29 +0000</lastBuildDate>
<pubDate>Sat, 04 Apr 2020 16:37:49 +0000</pubDate>
<lastBuildDate>Sat, 04 Apr 2020 16:37:49 +0000</lastBuildDate>
<generator>Jekyll v3.8.5</generator>
</channel>

View File

@ -1396,6 +1396,19 @@ not change the result of your rules</em>, if it does, please report a bug at htt
<p>Note that XPath 1.0 support, the default XPath version, is deprecated since PMD 6.22.0.
<strong>We highly recommend that you upgrade your rules to XPath 2.0</strong>. Please refer to the <a href="https://pmd.github.io/latest/pmd_userdocs_extending_writing_xpath_rules.html#migrating-from-10-to-20">migration guide</a>.</p>
<h4 id="new-rules">New Rules</h4>
<ul>
<li>
<p>The new Apex rule <a href="pmd_rules_apex_codestyle.html#fielddeclarationsshouldbeatstart"><code class="highlighter-rouge">FieldDeclarationsShouldBeAtStart</code></a> (<code class="highlighter-rouge">apex-codestyle</code>)
helps to ensure that field declarations are always at the beginning of a class.</p>
</li>
<li>
<p>The new Apex rule <a href="pmd_rules_apex_bestpractices.html#unusedlocalvariable"><code class="highlighter-rouge">UnusedLocalVariable</code></a> (<code class="highlighter-rouge">apex-bestpractices</code>) detects unused
local variables.</p>
</li>
</ul>
<h3 id="fixed-issues">Fixed Issues</h3>
<ul>
@ -1518,6 +1531,8 @@ implementations, and their corresponding Parser if it exists (in the same packag
<li><a href="https://github.com/pmd/pmd/pull/2314">#2314</a>: [doc] maven integration - Add version to plugin - <a href="https://github.com/gpbp">Pham Hai Trung</a></li>
<li><a href="https://github.com/pmd/pmd/pull/2353">#2353</a>: [plsql] xmlforest with optional AS - <a href="https://github.com/szyman23">Piotr Szymanski</a></li>
<li><a href="https://github.com/pmd/pmd/pull/2383">#2383</a>: [apex] Fix invalid apex in documentation - <a href="https://github.com/gwilymatgearset">Gwilym Kuiper</a></li>
<li><a href="https://github.com/pmd/pmd/pull/2395">#2395</a>: [apex] New Rule: Unused local variables - <a href="https://github.com/gwilymatgearset">Gwilym Kuiper</a></li>
<li><a href="https://github.com/pmd/pmd/pull/2396">#2396</a>: [apex] New rule: field declarations should be at start - <a href="https://github.com/gwilymatgearset">Gwilym Kuiper</a></li>
<li><a href="https://github.com/pmd/pmd/pull/2397">#2397</a>: [apex] fixed WITH SECURITY_ENFORCED regex to recognise line break characters - <a href="https://github.com/kieranlblack">Kieran Black</a></li>
</ul>

View File

@ -1387,6 +1387,7 @@ $('#toc').toc({ minimumHeaders: 0, listType: 'ul', showSpeed: 0, headers: 'h2,h3
<li><a href="pmd_rules_apex_bestpractices.html#avoidglobalmodifier">AvoidGlobalModifier</a>: Global classes should be avoided (especially in managed packages) as they can never be deleted or…</li>
<li><a href="pmd_rules_apex_bestpractices.html#avoidlogicintrigger">AvoidLogicInTrigger</a>: As triggers do not allow methods like regular classes they are less flexible and suited to apply …</li>
<li><a href="pmd_rules_apex_bestpractices.html#debugsshoulduselogginglevel">DebugsShouldUseLoggingLevel</a>: The first parameter of System.debug, when using the signature with two parameters, is a LoggingLe…</li>
<li><a href="pmd_rules_apex_bestpractices.html#unusedlocalvariable">UnusedLocalVariable</a>: Detects when a local variable is declared and/or assigned but not used.</li>
</ul>
<h2 id="code-style">Code Style</h2>
@ -1395,6 +1396,7 @@ $('#toc').toc({ minimumHeaders: 0, listType: 'ul', showSpeed: 0, headers: 'h2,h3
<ul>
<li><a href="pmd_rules_apex_codestyle.html#classnamingconventions">ClassNamingConventions</a>: Configurable naming conventions for type declarations. This rule reports type declarat…</li>
<li><a href="pmd_rules_apex_codestyle.html#fielddeclarationsshouldbeatstart">FieldDeclarationsShouldBeAtStart</a>: Field declarations should appear before method declarations within a class.</li>
<li><a href="pmd_rules_apex_codestyle.html#fieldnamingconventions">FieldNamingConventions</a>: Configurable naming conventions for field declarations. This rule reports variable declarations …</li>
<li><a href="pmd_rules_apex_codestyle.html#forloopsmustusebraces">ForLoopsMustUseBraces</a>: Avoid using for statements without using surrounding braces. If the code formatting orindentati…</li>
<li><a href="pmd_rules_apex_codestyle.html#formalparameternamingconventions">FormalParameterNamingConventions</a>: Configurable naming conventions for formal parameters of methods. This rule reports fo…</li>

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 which enforce generally accepted best practices.">
<meta name="keywords" content=" Best Practices, ApexAssertionsShouldIncludeMessage, ApexUnitTestClassShouldHaveAsserts, ApexUnitTestMethodShouldHaveIsTestAnnotation, ApexUnitTestShouldNotUseSeeAllDataTrue, AvoidGlobalModifier, AvoidLogicInTrigger, DebugsShouldUseLoggingLevel">
<meta name="keywords" content=" Best Practices, ApexAssertionsShouldIncludeMessage, ApexUnitTestClassShouldHaveAsserts, ApexUnitTestMethodShouldHaveIsTestAnnotation, ApexUnitTestShouldNotUseSeeAllDataTrue, AvoidGlobalModifier, AvoidLogicInTrigger, DebugsShouldUseLoggingLevel, UnusedLocalVariable">
<title>Best Practices | PMD Source Code Analyzer</title>
<link rel="stylesheet" href="css/syntax.css">
@ -1830,6 +1830,63 @@ Therefore delegate the triggers work to a regular class (often called Trigger ha
<span class="nt">&lt;/rule&gt;</span>
</code></pre></div></div>
<h2 id="unusedlocalvariable">UnusedLocalVariable</h2>
<p><strong>Since:</strong> PMD 6.23.0</p>
<p><strong>Priority:</strong> Low (5)</p>
<p>Detects when a local variable is declared and/or assigned but not used.</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/bestpractices/UnusedLocalVariableRule.java">net.sourceforge.pmd.lang.apex.rule.bestpractices.UnusedLocalVariableRule</a></p>
<p><strong>Example(s):</strong></p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">public</span> <span class="nc">Boolean</span> <span class="nf">bar</span><span class="o">(</span><span class="nc">String</span> <span class="n">z</span><span class="o">)</span> <span class="o">{</span>
<span class="nc">String</span> <span class="n">x</span> <span class="o">=</span> <span class="err">'</span><span class="n">some</span> <span class="n">string</span><span class="err">'</span><span class="o">;</span> <span class="c1">// not used</span>
<span class="nc">String</span> <span class="n">y</span> <span class="o">=</span> <span class="err">'</span><span class="n">some</span> <span class="n">other</span> <span class="n">string</span><span class="err">'</span><span class="o">;</span> <span class="c1">// used in the next line</span>
<span class="k">return</span> <span class="n">z</span><span class="o">.</span><span class="na">equals</span><span class="o">(</span><span class="n">y</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><span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f; font-size: 75%;">Deprecated</span> Code Climate Categories</td>
<td>yes. Delimiter is |.</td>
</tr>
<tr>
<td>cc_remediation_points_multiplier</td>
<td>1</td>
<td><span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f; font-size: 75%;">Deprecated</span> Code Climate Remediation Points multiplier</td>
<td>no</td>
</tr>
<tr>
<td>cc_block_highlighting</td>
<td>false</td>
<td><span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f; font-size: 75%;">Deprecated</span> Code Climate Block Highlighting</td>
<td>no</td>
</tr>
</tbody>
</table>
<p><strong>Use this rule with the default properties by just 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/bestpractices.xml/UnusedLocalVariable"</span> <span class="nt">/&gt;</span>
</code></pre></div></div>
<div class="tags">

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 which enforce a specific coding style.">
<meta name="keywords" content=" Code Style, ClassNamingConventions, IfElseStmtsMustUseBraces, IfStmtsMustUseBraces, FieldNamingConventions, ForLoopsMustUseBraces, FormalParameterNamingConventions, LocalVariableNamingConventions, MethodNamingConventions, OneDeclarationPerLine, PropertyNamingConventions, VariableNamingConventions, WhileLoopsMustUseBraces">
<meta name="keywords" content=" Code Style, ClassNamingConventions, IfElseStmtsMustUseBraces, IfStmtsMustUseBraces, FieldDeclarationsShouldBeAtStart, FieldNamingConventions, ForLoopsMustUseBraces, FormalParameterNamingConventions, LocalVariableNamingConventions, MethodNamingConventions, OneDeclarationPerLine, PropertyNamingConventions, VariableNamingConventions, WhileLoopsMustUseBraces">
<title>Code Style | PMD Source Code Analyzer</title>
<link rel="stylesheet" href="css/syntax.css">
@ -1476,6 +1476,65 @@ properties.</p>
<span class="nt">&lt;/rule&gt;</span>
</code></pre></div></div>
<h2 id="fielddeclarationsshouldbeatstart">FieldDeclarationsShouldBeAtStart</h2>
<p><strong>Since:</strong> PMD 6.23.0</p>
<p><strong>Priority:</strong> Medium (3)</p>
<p>Field declarations should appear before method declarations within a class.</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/codestyle/FieldDeclarationsShouldBeAtStartRule.java">net.sourceforge.pmd.lang.apex.rule.codestyle.FieldDeclarationsShouldBeAtStartRule</a></p>
<p><strong>Example(s):</strong></p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">class</span> <span class="nc">Foo</span> <span class="o">{</span>
<span class="kd">public</span> <span class="nc">Integer</span> <span class="n">someField</span><span class="o">;</span> <span class="c1">// good</span>
<span class="kd">public</span> <span class="kt">void</span> <span class="nf">someMethod</span><span class="o">()</span> <span class="o">{</span>
<span class="o">}</span>
<span class="kd">public</span> <span class="nc">Integer</span> <span class="n">anotherField</span><span class="o">;</span> <span class="c1">// bad</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><span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f; font-size: 75%;">Deprecated</span> Code Climate Categories</td>
<td>yes. Delimiter is |.</td>
</tr>
<tr>
<td>cc_remediation_points_multiplier</td>
<td>1</td>
<td><span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f; font-size: 75%;">Deprecated</span> Code Climate Remediation Points multiplier</td>
<td>no</td>
</tr>
<tr>
<td>cc_block_highlighting</td>
<td>false</td>
<td><span style="border-radius: 0.25em; color: #fff; padding: 0.2em 0.6em 0.3em; display: inline; background-color: #d9534f; font-size: 75%;">Deprecated</span> Code Climate Block Highlighting</td>
<td>no</td>
</tr>
</tbody>
</table>
<p><strong>Use this rule with the default properties by just 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/codestyle.xml/FieldDeclarationsShouldBeAtStart"</span> <span class="nt">/&gt;</span>
</code></pre></div></div>
<h2 id="fieldnamingconventions">FieldNamingConventions</h2>
<p><strong>Since:</strong> PMD 6.15.0</p>

View File

@ -910,6 +910,15 @@
"url": "pmd_rules_apex_bestpractices.html#debugsshoulduselogginglevel",
"summary": "Rules which enforce generally accepted best practices."
}
,
{
"title": "UnusedLocalVariable (Apex, Best Practices)",
"tags": "",
"keywords": "UnusedLocalVariable",
"url": "pmd_rules_apex_bestpractices.html#unusedlocalvariable",
"summary": "Rules which enforce generally accepted best practices."
}
@ -1809,6 +1818,15 @@
}
,
{
"title": "FieldDeclarationsShouldBeAtStart (Apex, Code Style)",
"tags": "",
"keywords": "FieldDeclarationsShouldBeAtStart",
"url": "pmd_rules_apex_codestyle.html#fielddeclarationsshouldbeatstart",
"summary": "Rules which enforce a specific coding style."
}
,
{
"title": "FieldNamingConventions (Apex, Code Style)",
"tags": "",