[pmd-devel] [ANNOUNCE] PMD 6.30.0 Released
A source code analyzer
Brought to you by:
adangel,
juansotuyo
|
From: Andreas D. <and...@pm...> - 2020-12-12 11:17:57
|
* Downloads:
https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.30.0
<https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.30.0>
* Documentation: https://pmd.github.io/pmd-6.30.0/
<https://pmd.github.io/pmd-6.30.0/>
12-December-2020 - 6.30.0
The PMD team is pleased to announce PMD 6.30.0.
This is a minor release.
Table Of Contents
* New and noteworthy
<https://sourceforge.net/p/pmd/news/2020/12/pmd-6300-released/#new-and-noteworthy>
o CPD
<https://sourceforge.net/p/pmd/news/2020/12/pmd-6300-released/#cpd>
o Type information for VisualForce
<https://sourceforge.net/p/pmd/news/2020/12/pmd-6300-released/#type-information-for-visualforce>
* Fixed Issues
<https://sourceforge.net/p/pmd/news/2020/12/pmd-6300-released/#fixed-issues>
* API Changes
<https://sourceforge.net/p/pmd/news/2020/12/pmd-6300-released/#api-changes>
o Deprecated API
<https://sourceforge.net/p/pmd/news/2020/12/pmd-6300-released/#deprecated-api>
+ Around RuleSet parsing
<https://sourceforge.net/p/pmd/news/2020/12/pmd-6300-released/#around-ruleset-parsing>
+ Around the |PMD| class
<https://sourceforge.net/p/pmd/news/2020/12/pmd-6300-released/#around-the-pmd-class>
+ Miscellaneous
<https://sourceforge.net/p/pmd/news/2020/12/pmd-6300-released/#miscellaneous>
o Internal API
<https://sourceforge.net/p/pmd/news/2020/12/pmd-6300-released/#internal-api>
* External Contributions
<https://sourceforge.net/p/pmd/news/2020/12/pmd-6300-released/#external-contributions>
* Stats
<https://sourceforge.net/p/pmd/news/2020/12/pmd-6300-released/#stats>
New and noteworthy
CPD
*
The C# module now supports the new option
|--ignore-literal-sequences|
<https://pmd.github.io/latest/pmd_userdocs_cpd.html#-ignore-literal-sequences>,
which can be used to avoid detection of some uninteresting clones.
Support for other languages may be added in the future. See #2945
<https://github.com/pmd/pmd/pull/2945>
*
The Scala module now supports suppression
<https://pmd.github.io/latest/pmd_userdocs_cpd.html#suppression>
through |CPD-ON|/|CPD-OFF| comment pairs. See #2929
<https://github.com/pmd/pmd/pull/2929>
Type information for VisualForce
The Visualforce AST now can resolve the data type of Visualforce
expressions that reference Apex Controller properties and Custom Object
fields. This feature improves the precision of existing rules, like
|VfUnescapeEl|
<https://pmd.github.io/pmd-6.30.0/pmd_rules_vf_security.html#vfunescapeel>.
This can be configured using two environment variables:
/|PMD_VF_APEXDIRECTORIES|: Comma separated list of directories for Apex
classes. Absolute or relative to the Visualforce directory. Default is
|../classes|. Specifying an empty string will disable data type
resolution for Apex Controller properties.
/ |PMD_VF_OBJECTSDIRECTORIES|: Comma separated list of directories for
Custom Objects. Absolute or relative to the Visualforce directory.
Default is |../objects|. Specifying an empty string will disable data
type resolution for Custom Object fields.
This feature is experimental, in particular, expect changes to the way
the configuration is specified. We'll probably extend the CLI instead of
relying on environment variables in a future version.
Thanks to Jeff Bartolotta and Roopa Mohan for contributing this!
Fixed Issues
* core
o #1939 <https://github.com/pmd/pmd/issues/1939>: [core] XPath
expressions return handling
o #1961 <https://github.com/pmd/pmd/issues/1961>: [core] Text
renderer should include name of violated rule
o #2874 <https://github.com/pmd/pmd/pull/2874>: [core] Fix
XMLRenderer with UTF-16
* cs
o #2938 <https://github.com/pmd/pmd/pull/2938>: [cs] CPD: ignoring
using directives could not be disabled
* java
o #2911 <https://github.com/pmd/pmd/issues/2911>: [java]
|ClassTypeResolver#searchNodeNameForClass| leaks memory
o #2934 <https://github.com/pmd/pmd/pull/2934>: [java]
CompareObjectsWithEquals / UseEqualsToCompareStrings - False
negatives with fields
o #2940 <https://github.com/pmd/pmd/pull/2940>: [java] Catch
additional TypeNotPresentExceptions / LinkageErrors
* scala
o #2480 <https://github.com/pmd/pmd/issues/2480>: [scala] Support
CPD suppressions
API Changes
Deprecated API
Around RuleSet parsing
* |RuleSetFactory|
<https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RuleSetFactory.html#>
and |RulesetsFactoryUtils|
<https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RulesetsFactoryUtils.html#>
have been deprecated in favor of |RuleSetLoader|
<https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RuleSetLoader.html#>.
This is easier to configure, and more maintainable than the multiple
overloads of |RuleSetFactoryUtils|.
* Some static creation methods have been added to |RuleSet|
<https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RuleSet.html#>
for simple cases, eg |forSingleRule|
<https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RuleSet.html#forSingleRule(net.sourceforge.pmd.Rule)>.
These replace some counterparts in |RuleSetFactory|
<https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RuleSetFactory.html#>
* Since |RuleSets|
<https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RuleSets.html#>
is also deprecated, many APIs that require a RuleSets instance now
are deprecated, and have a counterpart that expects a |List<RuleSet>|.
* |RuleSetReferenceId|
<https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RuleSetReferenceId.html#>,
|RuleSetReference|
<https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RuleSetReference.html#>,
|RuleSetFactoryCompatibility|
<https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/RuleSetFactoryCompatibility.html#>
are deprecated. They are most likely not relevant outside of the
implementation of pmd-core.
Around the |PMD| class
Many classes around PMD's entry point (|PMD|
<https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/PMD.html#>)
have been deprecated as internal, including:
/The contents of the packages |net.sourceforge.pmd.cli|
<https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/cli/package-summary.html#>,
|net.sourceforge.pmd.processor|
<https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/processor/package-summary.html#>
/ |SourceCodeProcessor|
<https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/SourceCodeProcessor.html#>
* The constructors of |PMD|
<https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/PMD.html#>
(the class will be made a utility class)
Miscellaneous
* |ASTPackageDeclaration#getPackageNameImage|
<https://docs.pmd-code.org/apidocs/pmd-java/6.30.0/net/sourceforge/pmd/lang/java/ast/ASTPackageDeclaration.html#getPackageNameImage()>,
|ASTTypeParameter#getParameterName|
<https://docs.pmd-code.org/apidocs/pmd-java/6.30.0/net/sourceforge/pmd/lang/java/ast/ASTTypeParameter.html#getParameterName()>
and the corresponding XPath attributes. In both cases they're
replaced with a new method |getName|,
the attribute is |@Name|.
* |ASTClassOrInterfaceBody#isAnonymousInnerClass|
<https://docs.pmd-code.org/apidocs/pmd-java/6.30.0/net/sourceforge/pmd/lang/java/ast/ASTClassOrInterfaceBody.html#isAnonymousInnerClass()>,
and |ASTClassOrInterfaceBody#isEnumChild|
<https://docs.pmd-code.org/apidocs/pmd-java/6.30.0/net/sourceforge/pmd/lang/java/ast/ASTClassOrInterfaceBody.html#isEnumChild()>,
refs #905 <https://github.com/pmd/pmd/issues/905>
Internal API
Those APIs are not intended to be used by clients, and will be hidden or
removed with PMD 7.0.0.
You can identify them with the |@InternalApi| annotation. You'll also
get a deprecation warning.
* |net.sourceforge.pmd.lang.ecmascript.Ecmascript3Handler|
<https://docs.pmd-code.org/apidocs/pmd-javascript/6.30.0/net/sourceforge/pmd/lang/ecmascript/Ecmascript3Handler.html#>
* |net.sourceforge.pmd.lang.ecmascript.Ecmascript3Parser|
<https://docs.pmd-code.org/apidocs/pmd-javascript/6.30.0/net/sourceforge/pmd/lang/ecmascript/Ecmascript3Parser.html#>
* |EcmascriptParser#parserOptions|
<https://docs.pmd-code.org/apidocs/pmd-javascript/6.30.0/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParser.html#parserOptions>
* |EcmascriptParser#getSuppressMap|
<https://docs.pmd-code.org/apidocs/pmd-javascript/6.30.0/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParser.html#getSuppressMap()>
* |net.sourceforge.pmd.lang.rule.ParametricRuleViolation|
<https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/lang/rule/ParametricRuleViolation.html#>
* |ParserOptions#suppressMarker|
<https://docs.pmd-code.org/apidocs/pmd-core/6.30.0/net/sourceforge/pmd/lang/ParserOptions.html#suppressMarker>
* |net.sourceforge.pmd.lang.modelica.rule.ModelicaRuleViolationFactory|
<https://docs.pmd-code.org/apidocs/pmd-modelica/6.30.0/net/sourceforge/pmd/lang/modelica/rule/ModelicaRuleViolationFactory.html#>
External Contributions
* #2864 <https://github.com/pmd/pmd/pull/2864>: [vf] Provide
expression type information to Visualforce rules to avoid false
positives - Jeff Bartolotta <https://github.com/jbartolotta-sfdc>
* #2914 <https://github.com/pmd/pmd/pull/2914>: [core] Include rule
name in text renderer - Gunther Schrijvers
<https://github.com/GuntherSchrijvers>
* #2925 <https://github.com/pmd/pmd/pull/2925>: Cleanup: Correct
annotation array initializer indents from checkstyle #8083 -
Abhishek Kumar <https://github.com/Abhishek-kumar09>
* #2929 <https://github.com/pmd/pmd/pull/2929>: [scala] Add support
for CPD-ON and CPD-OFF special comments - Andy Robinson
<https://github.com/andyrobinson>
* #2936 <https://github.com/pmd/pmd/pull/2936>: [java] (doc) Fix typo:
"an accessor" not "a" - Igor Moreno <https://github.com/igormoreno>
* #2938 <https://github.com/pmd/pmd/pull/2938>: [cs] CPD: fix issue
where ignoring using directives could not be disabled - Maikel
Steneker <https://github.com/maikelsteneker>
* #2945 <https://github.com/pmd/pmd/pull/2945>: [cs] Add option to
ignore sequences of literals - Maikel Steneker
<https://github.com/maikelsteneker>
* #2962 <https://github.com/pmd/pmd/pull/2962>: [cpp] Add support for
C++ 14 binary literals - Maikel Steneker
<https://github.com/maikelsteneker>
Stats
* 190 commits
* 25 closed tickets & PRs
* Days since last release: 49
|