Updated doc to mention 7.3.0

This commit is contained in:
Andreas Dangel 2024-06-21 19:23:55 +02:00 committed by GitHub
parent 724b3afe95
commit d285082709
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 15 additions and 15 deletions

View File

@ -5,7 +5,7 @@ tags: [userdocs]
keywords: [command, line, options, help, formats, renderers]
permalink: pmd_userdocs_cli_reference.html
author: Tom Copeland <tom@infoether.com>, Xavier Le Vourch <xlv@users.sourceforge.net>, Juan Martín Sotuyo Dodero <juansotuyo@gmail.com>
last_updated: May 2024 (7.2.0)
last_updated: June 2024 (7.3.0)
---
@ -210,7 +210,7 @@ Or you can set the environment variable `CLASSPATH` before starting PMD, e.g.
## Exit Status
Please note that if PMD detects any violations, it will exit with status 4 (since 5.3) or 5 (since 7.2.0).
Please note that if PMD detects any violations, it will exit with status 4 (since 5.3) or 5 (since 7.3.0).
This behavior has been introduced to ease PMD integration into scripts or hooks, such as SVN hooks.
<table>
@ -219,7 +219,7 @@ This behavior has been introduced to ease PMD integration into scripts or hooks,
<tr><td>2</td><td>Usage error. Command-line parameters are invalid or missing.</td></tr>
<tr><td>4</td><td>At least one violation has been detected, unless <code>--no-fail-on-violation</code> is set.<p>Since PMD 5.3.</p></td></tr>
<tr><td>5</td><td>At least one recoverable error has occurred. There might be additionally zero or more violations detected.
To ignore recoverable errors, use <code>--no-fail-on-error</code>.<p>Since PMD 7.2.0.</p></td></tr>
To ignore recoverable errors, use <code>--no-fail-on-error</code>.<p>Since PMD 7.3.0.</p></td></tr>
</table>
{%include note.html content="If PMD exits with 5, then PMD had either trouble parsing one or more files or a rule failed with an exception.

View File

@ -4,7 +4,7 @@ tags: [cpd, userdocs]
summary: "Learn how to use CPD, the copy-paste detector shipped with PMD."
permalink: pmd_userdocs_cpd.html
author: Tom Copeland <tom@infoether.com>
last_updated: May 2024 (7.2.0)
last_updated: June 2024 (7.3.0)
---
## Overview
@ -284,7 +284,7 @@ If you specify a source directory but don't want to scan the sub-directories, yo
### Exit status
Please note that if CPD detects duplicated source code, it will exit with status 4 (since 5.0) or 5 (since 7.2.0).
Please note that if CPD detects duplicated source code, it will exit with status 4 (since 5.0) or 5 (since 7.3.0).
This behavior has been introduced to ease CPD integration into scripts or hooks, such as SVN hooks.
<table>
@ -293,7 +293,7 @@ This behavior has been introduced to ease CPD integration into scripts or hooks,
<tr><td>2</td><td>Usage error. Command-line parameters are invalid or missing.</td></tr>
<tr><td>4</td><td>At least one code duplication has been detected unless <code>--no-fail-on-violation</code> is set.<p>Since PMD 5.0.</p></td></tr>
<tr><td>5</td><td>At least one recoverable error has occurred. There might be additionally zero or more duplications detected.
To ignore recoverable errors, use <code>--no-fail-on-error</code>.<p>Since PMD 7.2.0.</p></td></tr>
To ignore recoverable errors, use <code>--no-fail-on-error</code>.<p>Since PMD 7.3.0.</p></td></tr>
</table>
{%include note.html content="If PMD exits with 5, then PMD had trouble lexing one or more files.
@ -402,7 +402,7 @@ Andy Glover wrote an Ant task for CPD; here's how to use it:
If not specified, CPD uses the system default encoding."
%}
{% include custom/cli_option_row.html options="failOnError"
description="Whether to fail the build if any errors occurred while processing the files. Since PMD 7.2.0."
description="Whether to fail the build if any errors occurred while processing the files. Since PMD 7.3.0."
default="true"
%}
{% include custom/cli_option_row.html options="format"
@ -441,7 +441,7 @@ Andy Glover wrote an Ant task for CPD; here's how to use it:
{% include custom/cli_option_row.html options="skipLexicalErrors"
description="<span class='label label-primary'>Deprecated</span> Skip files which can't be tokenized
due to invalid characters instead of aborting CPD. This parameter is deprecated and
ignored since PMD 7.2.0. It is now by default true. Use `failOnError` instead to fail the build."
ignored since PMD 7.3.0. It is now by default true. Use `failOnError` instead to fail the build."
default="true"
%}
{% include custom/cli_option_row.html options="skipBlocks"

View File

@ -6,7 +6,7 @@ author: >
David Dixon-Peugh <dpeugh@users.sourceforge.net>,
Tom Copeland <tom@infoether.com>,
Xavier Le Vourch <xlv@users.sourceforge.net>
last_updated: May 2024 (7.2.0)
last_updated: June 2024 (7.3.0)
---
## PMD

View File

@ -103,7 +103,7 @@ public class CPDTask extends Task {
config.setSkipDuplicates(skipDuplicateFiles);
if (skipLexicalErrors) {
log("skipLexicalErrors is deprecated since 7.2.0 and the property is ignored. "
log("skipLexicalErrors is deprecated since 7.3.0 and the property is ignored. "
+ "Lexical errors are now skipped by default and the build is failed. "
+ "Use failOnError=\"false\" to not fail the build.", Project.MSG_WARN);
}
@ -277,7 +277,7 @@ public class CPDTask extends Task {
/**
* Whether to fail the build if any recoverable errors occurred while processing the files.
*
* @since 7.2.0
* @since 7.3.0
*/
public void setFailOnError(boolean failOnError) {
this.failOnError = failOnError;

View File

@ -416,13 +416,13 @@ public abstract class AbstractConfiguration {
* Whether PMD should exit with status 5 (the default behavior, true) if
* recoverable errors occurred or just with 0 (to not break the build, e.g.).
*
* <p>Note: If only violations are found, the exist status is 4. See
* <p>Note: If only violations are found, the exit status is 4. See
* {@link #isFailOnViolation()}.
*
* @return failOnError
*
* @see #isFailOnViolation()
* @since 7.2.0
* @since 7.3.0
*/
public boolean isFailOnError() {
return failOnError;
@ -432,13 +432,13 @@ public abstract class AbstractConfiguration {
* Sets whether PMD should exit with status 5 (the default behavior, true)
* if recoverable errors occurred or just with 0 (to not break the build, e.g.).
*
* <p>Note: If only violations are found, the exist status is 4. See
* <p>Note: If only violations are found, the exit status is 4. See
* {@link #isFailOnViolation()}.
*
* @param failOnError whether to exit with 5 and fail the build if recoverable errors occurred.
*
* @see #isFailOnViolation()
* @since 7.2.0
* @since 7.3.0
*/
public void setFailOnError(boolean failOnError) {
this.failOnError = failOnError;