diff --git a/feed.xml b/feed.xml
index a9dad4ba24..dae9eec822 100644
--- a/feed.xml
+++ b/feed.xml
@@ -5,8 +5,8 @@
PMD now supports a new --use-version
flag, which receives a language-version pair (such as java-8
or apex-54
).
+This supersedes the usage of -language
/ -l
and -version
/ -v
, allowing for multiple versions to be set in a single run.
+PMD 7 will completely remove support for -language
and -version
in favor of this new flag.
Support for -V
is being deprecated in favor of --verbose
in preparation for PMD 7.
+In PMD 7, -v
will enable verbose mode and -V
will show the PMD version for consistency with most Unix/Linux tools.
Support for -min
is being deprecated in favor of --minimum-priority
for consistency with most Unix/Linux tools, where -min
would be equivalent to -m -i -n
.
-d
or --dir
as an alias to --files
, in favor of consistency with PMD.
+PMD 7 will remove support for --files
in favor of these new flags.Using run.sh cpdgui
will now warn about it being deprecated. Use run.sh cpd-gui
instead.
The old designer (run.sh designerold
) is completely deprecated and will be removed in PMD 7. Switch to the new JavaFX designer: run.sh designer
.
The old visual AST viewer (run.sh bgastviewer
) is completely deprecated and will be removed in PMD 7. Switch to the new JavaFX designer: run.sh designer
for a visual tool, or use run.sh ast-dump
for a text-based aleternative.
The following APIs have been marked as deprecated for removal in PMD 7:
+ +PMD
and PMD.StatusCode
- PMD 7 will ship with a revamped CLI split from pmd-core. To programatically launch analysis you can use PmdAnalysis
.PMDConfiguration#getAllInputPaths
- It is now superceded by PMDConfiguration#getInputPathList
PMDConfiguration#setInputPaths
- It is now superceded by PMDConfiguration#setInputPathList
PMDConfiguration#addInputPath
- It is now superceded by PMDConfiguration#addInputPath
PMDConfiguration#getInputFilePath
- It is now superceded by PMDConfiguration#getInputFile
PMDConfiguration#getIgnoreFilePath
- It is now superceded by PMDConfiguration#getIgnoreFile
PMDConfiguration#setInputFilePath
- It is now superceded by PMDConfiguration#setInputFilePath
PMDConfiguration#setIgnoreFilePath
- It is now superceded by PMDConfiguration#setIgnoreFilePath
PMDConfiguration#getInputUri
- It is now superceded by PMDConfiguration#getUri
PMDConfiguration#setInputUri
- It is now superceded by PMDConfiguration#setInputUri
PMDConfiguration#getReportFile
- It is now superceded by PMDConfiguration#getReportFilePath
PMDConfiguration#setReportFile
- It is now superceded by PMDConfiguration#setReportFile
PMDConfiguration#isStressTest
and PMDConfiguration#setStressTest
- Will be removed with no replacement.PMDConfiguration#isBenchmark
and PMDConfiguration#setBenchmark
- Will be removed with no replacement, the CLI will still support it.CPD
and StatusCode
- 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.<lang>
. Parsing errors are ignored and unparsable files
are skipped.
+ Use --use-version
to specify the language version to use, if it is not the default.
This option allows to use the xml language for files, that don't use xml as extension. See example below.
--use-version <lang-version>
Values are in the format of language-version.
+This option can be repeated to configure several languages for the same run.
+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 --force-language
option.
See also Supported Languages.
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, won’t be executed, you need to specify a specific version via the -language
-and -version
parameter.
--use-version
+parameter.
These parameters are irrelevant for languages that don’t support different versions.
Example:
-./run.sh pmd -d src/main/java -f text -R rulesets/java/quickstart.xml -language java -version 8
+./run.sh pmd -d src/main/java -f text -R rulesets/java/quickstart.xml --use-version java-1.8
diff --git a/pmd_userdocs_cpd.html b/pmd_userdocs_cpd.html
index a0bdf7c567..88313e03b7 100644
--- a/pmd_userdocs_cpd.html
+++ b/pmd_userdocs_cpd.html
@@ -1649,7 +1649,7 @@ See how to add it here<
- --files
+ --files
--dir
-d
Required List of files and directories to process
@@ -1715,7 +1715,7 @@ See how to add it here<
- --debug
--verbose
+ --debug
--verbose
-v
-D
Debug mode. Prints more log output.
@@ -1737,7 +1737,7 @@ See how to add it here<
- --encoding
+ --encoding
-e
Character encoding to use when processing files. If not specified, CPD uses the system default encoding.
@@ -2536,7 +2536,7 @@ the CPD task as usual and right after it invoke the Ant XSLT script like this:
For Linux:
-./run.sh cpdgui
+./run.sh cpd-gui
Here’s a screenshot of CPD after running on the JDK 8 java.lang package:
diff --git a/pmd_userdocs_installation.html b/pmd_userdocs_installation.html
index 8aaeef69dc..3abcd22467 100644
--- a/pmd_userdocs_installation.html
+++ b/pmd_userdocs_installation.html
@@ -1573,7 +1573,7 @@ at least Java 8 is required.
- Note: For executing the Designer (./run.sh designer) using OpenJDK or Java 11, you need additionally OpenJFX. Download it, extract it and set the environment variable JAVAFX_HOME.
+ Note: For executing the Designer (./run.sh designer) using OpenJDK or Java 11, you need additionally JavaFX. Download it, extract it and set the environment variable JAVAFX_HOME pointing at that directory.
Installation