The PMD team is pleased to announce PMD 6.30.0.
This is a minor release.
The C# module now supports the new option --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
The Scala module now supports suppression through CPD-ON/CPD-OFF comment pairs. See #2929
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.
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!
RuleSetFactory and RulesetsFactoryUtils have been deprecated in favor of RuleSetLoader. This is easier to configure, and more maintainable than the multiple overloads of RuleSetFactoryUtils.RuleSet for simple cases, eg forSingleRule. These replace some counterparts in RuleSetFactoryRuleSets is also deprecated, many APIs that require a RuleSets instance now are deprecated, and have a counterpart that expects a List<RuleSet>.RuleSetReferenceId, RuleSetReference, RuleSetFactoryCompatibility are deprecated. They are most likely not relevant outside of the implementation of pmd-core.PMD classMany classes around PMD's entry point (PMD) have been deprecated as internal, including:
* The contents of the packages net.sourceforge.pmd.cli, net.sourceforge.pmd.processor
* SourceCodeProcessor
* The constructors of PMD (the class will be made a utility class)
ASTPackageDeclaration#getPackageNameImage,ASTTypeParameter#getParameterNamegetName,@Name.ASTClassOrInterfaceBody#isAnonymousInnerClass,ASTClassOrInterfaceBody#isEnumChild,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.Ecmascript3Handlernet.sourceforge.pmd.lang.ecmascript.Ecmascript3ParserEcmascriptParser#parserOptionsEcmascriptParser#getSuppressMapnet.sourceforge.pmd.lang.rule.ParametricRuleViolationParserOptions#suppressMarkernet.sourceforge.pmd.lang.modelica.rule.ModelicaRuleViolationFactory