Update documentation

TRAVIS_JOB_NUMBER=3559.2
TRAVIS_COMMIT_RANGE=e1f067ab526f...1060e843b191
This commit is contained in:
Travis CI (pmd-bot)
2019-03-18 16:11:04 +00:00
parent f3de97b0fb
commit 49bfce9178
106 changed files with 177 additions and 120 deletions

View File

@ -1297,7 +1297,7 @@ $('#toc').toc({ minimumHeaders: 0, listType: 'ul', showSpeed: 0, headers: 'h2,h3
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
Site last generated: Mar 15, 2019 <br />
Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

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>Fri, 15 Mar 2019 16:17:24 +0000</pubDate>
<lastBuildDate>Fri, 15 Mar 2019 16:17:24 +0000</lastBuildDate>
<pubDate>Mon, 18 Mar 2019 16:09:55 +0000</pubDate>
<lastBuildDate>Mon, 18 Mar 2019 16:09:55 +0000</lastBuildDate>
<generator>Jekyll v3.7.4</generator>
</channel>

View File

@ -5808,7 +5808,7 @@ $('#filter a').click(function (e) {
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
<span>Page last updated:</span> August 2017<br/> Site last generated: Mar 15, 2019 <br />
<span>Page last updated:</span> August 2017<br/> Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1531,7 +1531,7 @@ $('#small-box-links').localScroll({
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
<span>Page last updated:</span> November 30, 2015<br/> Site last generated: Mar 15, 2019 <br />
<span>Page last updated:</span> November 30, 2015<br/> Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1541,7 +1541,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
Site last generated: Mar 15, 2019 <br />
Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1292,7 +1292,7 @@
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
Site last generated: Mar 15, 2019 <br />
Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1293,7 +1293,7 @@
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
Site last generated: Mar 15, 2019 <br />
Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1317,7 +1317,7 @@ through the archives (<a href="http://java-pmd.30631.n5.nabble.com/">archive1</a
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
<span>Page last updated:</span> September 2017<br/> Site last generated: Mar 15, 2019 <br />
<span>Page last updated:</span> September 2017<br/> Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1371,7 +1371,7 @@ flow statement.</li>
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
<span>Page last updated:</span> July 20, 2017<br/> Site last generated: Mar 15, 2019 <br />
<span>Page last updated:</span> July 20, 2017<br/> Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1387,7 +1387,7 @@ please post <a href="http://sourceforge.net/p/pmd/discussion/188192">here</a> an
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
Site last generated: Mar 15, 2019 <br />
Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1335,7 +1335,7 @@ every push. Each pull request is built as well.</p>
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
<span>Page last updated:</span> August 2017<br/> Site last generated: Mar 15, 2019 <br />
<span>Page last updated:</span> August 2017<br/> Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1351,7 +1351,7 @@ type resolution information and DFA nodes.</li>
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
<span>Page last updated:</span> September 2017<br/> Site last generated: Mar 15, 2019 <br />
<span>Page last updated:</span> September 2017<br/> Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1280,23 +1280,79 @@ $('#toc').toc({ minimumHeaders: 0, listType: 'ul', showSpeed: 0, headers: 'h2,h3
<p>If you wish CPD to parse a unsupported language, you can easily develop a new parser for CPD. All you need to is implements the following interface:</p>
<p>First of all, thanks for the contribution!</p>
<ul>
<li>net.sourceforge.pmd.cpd.Language</li>
<li>net.sourceforge.pmd.cpd.Tokenizer</li>
</ul>
<p>Happily for you, to add CPD support for a new language is now easier than ever!</p>
<p>Do not forget to the follow the proper naming convention, as the CPD parser factory use this convention:</p>
<div class="bs-callout bs-callout-primary"><strong>Pro Tip</strong>: If you wish to add a new language, there are more than 50 languages you could easily add with just an <a href="https://github.com/antlr/grammars-v4">Antlr grammar</a>.</div>
<ul>
<li>Language Name + “Language”</li>
<li>Tokenizer Name + “Tokenizer”</li>
</ul>
<p>All you need to do is follow this few steps:</p>
<p>For instance, if you develop a python parser, you should have two classes named PythonLanguage and PythonTokenizer.</p>
<ol>
<li>Create a new module for your language, you can take <a href="https://github.com/pmd/pmd/tree/master/pmd-go">GO as an example</a></li>
<li>
<p>Create a Tokenizer</p>
<p>To test your parser, just package it in a jar and add your jar to the classpath.</p>
<ul>
<li>For Antlr grammars you can take the grammar from <a href="https://github.com/antlr/grammars-v4">here</a> and extend <a href="https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/cpd/AntlrTokenizer.java">AntlrTokenizer</a> taking Go as an example</li>
</ul>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">GoTokenizer</span> <span class="kd">extends</span> <span class="n">AntlrTokenizer</span> <span class="o">{</span>
<span class="nd">@Override</span> <span class="kd">protected</span> <span class="n">AntlrTokenManager</span> <span class="nf">getLexerForSource</span><span class="o">(</span><span class="n">SourceCode</span> <span class="n">sourceCode</span><span class="o">)</span> <span class="o">{</span>
<span class="n">CharStream</span> <span class="n">charStream</span> <span class="o">=</span> <span class="n">AntlrTokenizer</span><span class="o">.</span><span class="na">getCharStreamFromSourceCode</span><span class="o">(</span><span class="n">sourceCode</span><span class="o">);</span>
<span class="k">return</span> <span class="k">new</span> <span class="nf">AntlrTokenManager</span><span class="o">(</span><span class="k">new</span> <span class="n">GolangLexer</span><span class="o">(</span><span class="n">charStream</span><span class="o">),</span> <span class="n">sourceCode</span><span class="o">.</span><span class="na">getFileName</span><span class="o">());</span>
<span class="o">}</span>
<span class="o">}</span>
</code></pre></div> </div>
<ul>
<li>For JavaCC grammars you should subclass <a href="https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/cpd/internal/JavaCCTokenizer.java">JavaCCTokenizer</a> wich has many examples you could follow, you should also take the <a href="https://github.com/pmd/pmd/blob/master/pmd-python/src/main/java/net/sourceforge/pmd/cpd/PythonTokenizer.java">Python implementation</a> as reference</li>
<li>For any other scenario you can use <a href="https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/cpd/AnyTokenizer.java">AnyTokenizer</a></li>
</ul>
</li>
<li>
<p>Create your <a href="https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/cpd/AbstractLanguage.java">Language</a> class</p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code> <span class="kd">public</span> <span class="kd">class</span> <span class="nc">GoLanguage</span> <span class="kd">extends</span> <span class="n">AbstractLanguage</span> <span class="o">{</span>
<span class="kd">public</span> <span class="nf">GoLanguage</span><span class="o">()</span> <span class="o">{</span>
<span class="kd">super</span><span class="o">(</span><span class="s">"Go"</span><span class="o">,</span> <span class="s">"go"</span><span class="o">,</span> <span class="k">new</span> <span class="n">GoTokenizer</span><span class="o">(),</span> <span class="s">".go"</span><span class="o">);</span>
<span class="o">}</span>
<span class="o">}</span>
</code></pre></div> </div>
<div class="bs-callout bs-callout-primary"><strong>Pro Tip</strong>: Yes, keep looking at Go!</div>
<p><strong>You are almost there!</strong></p>
</li>
<li>
<p>Please dont forget to add some test, you can again.. look at Go implementation ;)</p>
<p>If you read this far, Im keen to think you would also love to support some extra CPD configuration (ignore imports or crazy things like that) <br />
If thats your case , you came to the right place!</p>
</li>
<li>
<p>You can add your custom properties using a Token filter</p>
<ul>
<li>
<p>For Antlr grammars all you need to do is implement your own <a href="https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/cpd/token/AntlrTokenFilter.java">AntlrTokenFilter</a></p>
<p>And by now, I know where you are going to look…</p>
<p><strong>WRONG</strong></p>
<p>Why do you want GO to solve all your problems?</p>
<p>You should take a look to <a href="https://github.com/pmd/pmd/blob/master/pmd-kotlin/src/main/java/net/sourceforge/pmd/cpd/KotlinTokenizer.java">Kotlin token filter implementation</a></p>
</li>
<li>
<p>For non-Antlr grammars you can use <a href="https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/cpd/token/internal/BaseTokenFilter.java">BaseTokenFilter</a> directly or take a peek to <a href="https://github.com/pmd/pmd/blob/master/pmd-java/src/main/java/net/sourceforge/pmd/cpd/JavaTokenizer.java">Javas token filter</a></p>
</li>
</ul>
</li>
</ol>
<div class="tags">
@ -1325,7 +1381,7 @@ $('#toc').toc({ minimumHeaders: 0, listType: 'ul', showSpeed: 0, headers: 'h2,h3
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
<span>Page last updated:</span> July 3, 2016<br/> Site last generated: Mar 15, 2019 <br />
<span>Page last updated:</span> March 18, 2019 (6.13.0)<br/> Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1430,7 +1430,7 @@ This will load all rulesets and verify, that all required attributes are provide
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
<span>Page last updated:</span> July 3, 2016<br/> Site last generated: Mar 15, 2019 <br />
<span>Page last updated:</span> July 3, 2016<br/> Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1413,7 +1413,7 @@ build a <code class="highlighter-rouge">Signature&lt;N&gt;</code> from a <code c
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
<span>Page last updated:</span> December 2017<br/> Site last generated: Mar 15, 2019 <br />
<span>Page last updated:</span> December 2017<br/> Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1319,7 +1319,7 @@ Regression difference reports are commented back to the PR for the reviewers
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
Site last generated: Mar 15, 2019 <br />
Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1440,7 +1440,7 @@ This should be configurable on per Rule basis similar to TR and SymbolTable.</p>
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
Site last generated: Mar 15, 2019 <br />
Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1556,7 +1556,7 @@ by specifying <code class="highlighter-rouge">-Dpmd.doc.checkExternalLinks=true<
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
Site last generated: Mar 15, 2019 <br />
Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1610,7 +1610,7 @@ In Proceedings ACM Symposium on Software Reusability, 1995.</p>
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
<span>Page last updated:</span> July 20, 2017<br/> Site last generated: Mar 15, 2019 <br />
<span>Page last updated:</span> July 20, 2017<br/> Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1350,7 +1350,7 @@ contains only “.java” files, JSP files obviously will not be checked.</p>
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
Site last generated: Mar 15, 2019 <br />
Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1785,7 +1785,7 @@ will be removed with PMD 7.0.0. The rule is replaced by the more general
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
Site last generated: Mar 15, 2019 <br />
Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1468,7 +1468,7 @@ integrated (e.g. gitk and github show the branches, from which the specific comm
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
<span>Page last updated:</span> August 2017<br/> Site last generated: Mar 15, 2019 <br />
<span>Page last updated:</span> August 2017<br/> Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1500,7 +1500,7 @@ and <code class="highlighter-rouge">mvn versions:set -DnewVersion=5.7.0-SNAPSHOT
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
Site last generated: Mar 15, 2019 <br />
Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1811,7 +1811,7 @@ PMD scoreboard formulas, pmd-dcpd optimizations</li>
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
Site last generated: Mar 15, 2019 <br />
Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1344,7 +1344,7 @@ You must take this into account for certain rules.</p>
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
Site last generated: Mar 15, 2019 <br />
Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1313,7 +1313,7 @@ really know. We just think the letters sound good together.</p>
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
Site last generated: Mar 15, 2019 <br />
Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1400,7 +1400,7 @@ interview with Ole-Martin and Tom</p>
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
Site last generated: Mar 15, 2019 <br />
Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1360,7 +1360,7 @@ to catch web app security problems. Thanks to Joseph Hemler for the props!</p>
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
Site last generated: Mar 15, 2019 <br />
Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1368,7 +1368,7 @@ only for maven project.</li>
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
Site last generated: Mar 15, 2019 <br />
Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

View File

@ -1360,6 +1360,7 @@ quickstart ruleset <code class="highlighter-rouge">rulesets/apex/quickstart.xml<
<h3 id="external-contributions">External Contributions</h3>
<ul>
<li><a href="https://github.com/pmd/pmd/pull/1697">#1697</a>: [doc] Update CPD documentation - <a href="https://github.com/matifraga">Matías Fraga</a></li>
<li><a href="https://github.com/pmd/pmd/pull/1704">#1704</a>: [java] Added AvoidUncheckedExceptionsInSignatures Rule - <a href="https://github.com/pamidi99">Bhanu Prakash Pamidi</a></li>
<li><a href="https://github.com/pmd/pmd/pull/1706">#1706</a>: [java] Add DetachedTestCase rule - <a href="https://github.com/davidburstromspotify">David Burström</a></li>
<li><a href="https://github.com/pmd/pmd/pull/1709">#1709</a>: [java] Detect while loops with literal booleans conditions - <a href="https://github.com/davidburstromspotify">David Burström</a></li>
@ -1383,7 +1384,7 @@ quickstart ruleset <code class="highlighter-rouge">rulesets/apex/quickstart.xml<
<div class="row">
<div class="col-lg-12 footer">
&copy;2019 PMD Open Source Project. All rights reserved. <br />
Site last generated: Mar 15, 2019 <br />
Site last generated: Mar 18, 2019 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>

Some files were not shown because too many files have changed in this diff Show More