PMD CI (pmd-bot)
2022-11-10 15:52:28 +00:00
parent ef141835e5
commit 629d2d8701
5 changed files with 101 additions and 11 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>Thu, 10 Nov 2022 10:41:17 +0000</pubDate>
<lastBuildDate>Thu, 10 Nov 2022 10:41:17 +0000</lastBuildDate>
<pubDate>Thu, 10 Nov 2022 15:50:14 +0000</pubDate>
<lastBuildDate>Thu, 10 Nov 2022 15:50:14 +0000</lastBuildDate>
<generator>Jekyll v3.9.2</generator>
</channel>

View File

@ -1560,6 +1560,66 @@
<h3 id="api-changes">API Changes</h3>
<h4 id="pmd-cli">PMD CLI</h4>
<ul>
<li>
<p>PMD now supports a new <code class="language-plaintext highlighter-rouge">--use-version</code> flag, which receives a language-version pair (such as <code class="language-plaintext highlighter-rouge">java-8</code> or <code class="language-plaintext highlighter-rouge">apex-54</code>).
This supersedes the usage of <code class="language-plaintext highlighter-rouge">-language</code> / <code class="language-plaintext highlighter-rouge">-l</code> and <code class="language-plaintext highlighter-rouge">-version</code> / <code class="language-plaintext highlighter-rouge">-v</code>, allowing for multiple versions to be set in a single run.
PMD 7 will completely remove support for <code class="language-plaintext highlighter-rouge">-language</code> and <code class="language-plaintext highlighter-rouge">-version</code> in favor of this new flag.</p>
</li>
<li>
<p>Support for <code class="language-plaintext highlighter-rouge">-V</code> is being deprecated in favor of <code class="language-plaintext highlighter-rouge">--verbose</code> in preparation for PMD 7.
In PMD 7, <code class="language-plaintext highlighter-rouge">-v</code> will enable verbose mode and <code class="language-plaintext highlighter-rouge">-V</code> will show the PMD version for consistency with most Unix/Linux tools.</p>
</li>
<li>
<p>Support for <code class="language-plaintext highlighter-rouge">-min</code> is being deprecated in favor of <code class="language-plaintext highlighter-rouge">--minimum-priority</code> for consistency with most Unix/Linux tools, where <code class="language-plaintext highlighter-rouge">-min</code> would be equivalent to <code class="language-plaintext highlighter-rouge">-m -i -n</code>.</p>
</li>
</ul>
<h4 id="cpd-cli">CPD CLI</h4>
<ul>
<li>CPD now supports using <code class="language-plaintext highlighter-rouge">-d</code> or <code class="language-plaintext highlighter-rouge">--dir</code> as an alias to <code class="language-plaintext highlighter-rouge">--files</code>, in favor of consistency with PMD.
PMD 7 will remove support for <code class="language-plaintext highlighter-rouge">--files</code> in favor of these new flags.</li>
</ul>
<h4 id="linux-runsh-parameters">Linux run.sh parameters</h4>
<ul>
<li>
<p>Using <code class="language-plaintext highlighter-rouge">run.sh cpdgui</code> will now warn about it being deprecated. Use <code class="language-plaintext highlighter-rouge">run.sh cpd-gui</code> instead.</p>
</li>
<li>
<p>The old designer (<code class="language-plaintext highlighter-rouge">run.sh designerold</code>) is completely deprecated and will be removed in PMD 7. Switch to the new JavaFX designer: <code class="language-plaintext highlighter-rouge">run.sh designer</code>.</p>
</li>
<li>
<p>The old visual AST viewer (<code class="language-plaintext highlighter-rouge">run.sh bgastviewer</code>) is completely deprecated and will be removed in PMD 7. Switch to the new JavaFX designer: <code class="language-plaintext highlighter-rouge">run.sh designer</code> for a visual tool, or use <code class="language-plaintext highlighter-rouge">run.sh ast-dump</code> for a text-based aleternative.</p>
</li>
</ul>
<h4 id="deprecated-api">Deprecated API</h4>
<p>The following APIs have been marked as deprecated for removal in PMD 7:</p>
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMD.html#"><code>PMD</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMD.StatusCode.html#"><code>PMD.StatusCode</code></a> - PMD 7 will ship with a revamped CLI split from pmd-core. To programatically launch analysis you can use <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PmdAnalysis.html#"><code>PmdAnalysis</code></a>.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#getAllInputPaths()"><code>PMDConfiguration#getAllInputPaths</code></a> - It is now superceded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#getInputPathList()"><code>PMDConfiguration#getInputPathList</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#setInputPaths(List)"><code>PMDConfiguration#setInputPaths</code></a> - It is now superceded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#setInputPathList(List)"><code>PMDConfiguration#setInputPathList</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#addInputPath(String)"><code>PMDConfiguration#addInputPath</code></a> - It is now superceded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#addInputPath(Path)"><code>PMDConfiguration#addInputPath</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#getInputFilePath()"><code>PMDConfiguration#getInputFilePath</code></a> - It is now superceded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#getInputFile()"><code>PMDConfiguration#getInputFile</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#getIgnoreFilePath()"><code>PMDConfiguration#getIgnoreFilePath</code></a> - It is now superceded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#getIgnoreFile()"><code>PMDConfiguration#getIgnoreFile</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#setInputFilePath(String)"><code>PMDConfiguration#setInputFilePath</code></a> - It is now superceded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#setInputFilePath(Path)"><code>PMDConfiguration#setInputFilePath</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#setIgnoreFilePath(String)"><code>PMDConfiguration#setIgnoreFilePath</code></a> - It is now superceded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#setIgnoreFilePath(Path)"><code>PMDConfiguration#setIgnoreFilePath</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#getInputUri()"><code>PMDConfiguration#getInputUri</code></a> - It is now superceded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#getUri()"><code>PMDConfiguration#getUri</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#setInputUri(String)"><code>PMDConfiguration#setInputUri</code></a> - It is now superceded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#setInputUri(URI)"><code>PMDConfiguration#setInputUri</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#getReportFile()"><code>PMDConfiguration#getReportFile</code></a> - It is now superceded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#getReportFilePath()"><code>PMDConfiguration#getReportFilePath</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#setReportFile(String)"><code>PMDConfiguration#setReportFile</code></a> - It is now superceded by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#setReportFile(Path)"><code>PMDConfiguration#setReportFile</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#isStressTest()"><code>PMDConfiguration#isStressTest</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#setStressTest(boolean)"><code>PMDConfiguration#setStressTest</code></a> - Will be removed with no replacement.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#isBenchmark()"><code>PMDConfiguration#isBenchmark</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/PMDConfiguration.html#setBenchmark(boolean)"><code>PMDConfiguration#setBenchmark</code></a> - Will be removed with no replacement, the CLI will still support it.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/CPD.html#"><code>CPD</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.52.0-SNAPSHOT/net/sourceforge/pmd/CPD/StatusCode.html#"><code>StatusCode</code></a> - PMD 7 will ship with a revamped CLI split from pmd-core. An alterative to programatically launch CPD analysis will be added in due time.</li>
</ul>
<h3 id="external-contributions">External Contributions</h3>
<ul>
<li><a href="https://github.com/pmd/pmd/pull/4184">#4184</a>: [java][doc] TestClassWithoutTestCases - fix small typo in description - <a href="https://github.com/valfirst">Valery Yatsynovich</a> (@valfirst)</li>

View File

@ -1820,6 +1820,8 @@
the given language <code>&lt;lang&gt;</code>. Parsing errors are ignored and unparsable files
are skipped.
<p>Use <code>--use-version</code> to specify the language version to use, if it is not the default.</p>
<p>This option allows to use the xml language for files, that don't
use xml as extension. See <a href="#analyze-other-xml-formats">example</a> below.</p></td>
<td><code></code></td>
@ -1884,6 +1886,34 @@
<!-- fragment id in the page -->
<tr>
<td><a style="pointer-events: none; cursor: default;" name="-use-version"><code>--use-version&nbsp;&lt;lang-version&gt;</code></a></td>
<td>The specific language version PMD should use when parsing source code for a given language.
<p>Values are in the format of <i>language-version</i>.</p>
<p>This option can be repeated to configure several languages for the same run.</p>
<p>Note that this option does not change how languages are assigned to files.
It only changes something if the project you analyze contains some files that PMD detects as the given language.
Language detection is only influenced by file extensions and the <code>--force-language</code> option.</p>
<p>See also <a href="#supported-languages">Supported Languages</a>.</p></td>
<td><code></code></td>
<td></td>
</tr>
<!-- Row of the CLI reference table, describing an option -->
<!-- Rows can be linked to the name of the option (without leading dash) -->
<!-- Argument summary: -->
<!-- options: comma separated list of aliases for the option.-->
<!-- option_arg: optional name for the argument of the option, eg 'arg', will be formatted eg to '<arg>'-->
<!-- description: description, you can use "some" inline markdown -->
<!-- required: whether the option is required, if specified, whatever the value, it's considered required -->
<!-- languages: languages to which the option applies -->
<!-- default: default value -->
<!-- fragment id in the page -->
@ -2210,15 +2240,15 @@ This behavior has been introduced to ease PMD integration into scripts or hooks,
<p>The language is determined automatically by PMD from the file extensions. Some languages such as “Java”
however support multiple versions. The default version will be used, which is usually the latest supported
version. If you want to use an older version, so that e.g. rules, that suggest usage of language features,
that are not available yet, wont be executed, you need to specify a specific version via the <code class="language-plaintext highlighter-rouge">-language</code>
and <code class="language-plaintext highlighter-rouge">-version</code> parameter.</p>
non-preview version. If you want to use an older version, so that e.g. rules that suggest usage of language features
that are not available yet wont be executed, you need to specify a specific version via the <code class="language-plaintext highlighter-rouge">--use-version</code>
parameter.</p>
<p>These parameters are irrelevant for languages that dont support different versions.</p>
<p>Example:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>./run.sh pmd <span class="nt">-d</span> src/main/java <span class="nt">-f</span> text <span class="nt">-R</span> rulesets/java/quickstart.xml <span class="nt">-language</span> java <span class="nt">-version</span> 8
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>./run.sh pmd <span class="nt">-d</span> src/main/java <span class="nt">-f</span> text <span class="nt">-R</span> rulesets/java/quickstart.xml <span class="nt">--use-version</span> java-1.8
</code></pre></div></div>
<ul>

View File

@ -1649,7 +1649,7 @@ See how to add it <a href="pmd_devdocs_major_adding_new_cpd_language.html">here<
<tr>
<td><a style="pointer-events: none; cursor: default;" name="-files"><code>--files</code></a></td>
<td><a style="pointer-events: none; cursor: default;" name="-files"><code>--files</code><br /><code>--dir</code><br /><code>-d</code></a></td>
<td><span class="label label-primary">Required</span> List of files and directories to process</td>
<td><code></code></td>
<td></td>
@ -1715,7 +1715,7 @@ See how to add it <a href="pmd_devdocs_major_adding_new_cpd_language.html">here<
<tr>
<td><a style="pointer-events: none; cursor: default;" name="-debug"><code>--debug</code><br /><code>--verbose</code></a></td>
<td><a style="pointer-events: none; cursor: default;" name="-debug"><code>--debug</code><br /><code>--verbose</code><br /><code>-v</code><br /><code>-D</code></a></td>
<td>Debug mode. Prints more log output.</td>
<td><code></code></td>
<td></td>
@ -1737,7 +1737,7 @@ See how to add it <a href="pmd_devdocs_major_adding_new_cpd_language.html">here<
<tr>
<td><a style="pointer-events: none; cursor: default;" name="-encoding"><code>--encoding</code></a></td>
<td><a style="pointer-events: none; cursor: default;" name="-encoding"><code>--encoding</code><br /><code>-e</code></a></td>
<td>Character encoding to use when processing files. If not specified, CPD uses the system default encoding.</td>
<td><code></code></td>
<td></td>
@ -2536,7 +2536,7 @@ the CPD task as usual and right after it invoke the Ant XSLT script like this:</
<p>For Linux:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>./run.sh cpdgui
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>./run.sh cpd-gui
</code></pre></div></div>
<p>Heres a screenshot of CPD after running on the JDK 8 java.lang package:</p>

View File

@ -1573,7 +1573,7 @@ at least Java 8 is required.</p>
</li>
</ul>
<div class="alert alert-info" role="alert"><i class="fa fa-info-circle"></i> <b>Note:</b> For executing the Designer (./run.sh designer) using <a href="http://jdk.java.net">OpenJDK</a> or Java 11, you need additionally <a href="https://openjfx.io/">OpenJFX</a>. Download it, extract it and set the environment variable JAVAFX_HOME.</div>
<div class="alert alert-info" role="alert"><i class="fa fa-info-circle"></i> <b>Note:</b> For executing the Designer (./run.sh designer) using <a href="http://jdk.java.net">OpenJDK</a> or Java 11, you need additionally <a href="https://gluonhq.com/products/javafx/">JavaFX</a>. Download it, extract it and set the environment variable JAVAFX_HOME pointing at that directory.</div>
<h3 id="installation">Installation</h3>