All Versions
17
Latest Version
Avg Release Cycle
34 days
Latest Release
613 days ago

Changelog History
Page 2

  • v6.20.0 Changes

    November 29, 2019

    29-November-2019 - 6.20.0

    The PMD team is pleased to announce PMD 6.20.0.

    πŸš€ This is a minor release.

    Table Of Contents

    πŸ›  Fixed Issues

    • apex
      • #2092: [apex] ApexLexer logs visible when Apex is the selected language upon starting the designer
      • #2136: [apex] Provide access to underlying query of SoqlExpression
    • core
      • #2002: [doc] Issue with http://pmdapplied.com/ linking to a gambling Web site
      • #2062: [core] Shortnames parameter does not work with Ant
      • #2090: [ci] Release notes and draft releases
      • #2096: [core] Referencing category errorprone.xml produces deprecation warnings for InvalidSlf4jMessageFormat
    • java
      • #1861: [java] Be more lenient with version numbers
      • #2105: [java] Wrong name for inner classes in violations
    • java-bestpractices
      • #2016: [java] UnusedImports: False positive if wildcard is used and only static methods
    • πŸ’… java-codestyle
      • #1362: [java] LinguisticNaming flags Predicates with boolean-style names
      • #2029: [java] UnnecessaryFullyQualifiedName false-positive for non-static nested classes
      • #2098: [java] UnnecessaryFullyQualifiedName: regression / false positive
    • java-design
      • #2075: [java] ImmutableField false positive with inner class
      • #2125: [java] ImmutableField: False positive when variable is updated in conditional loop
    • java-errorprone
      • #2102: [java] False positive MissingStaticMethodInNonInstantiatableClass when inheritors are instantiable

    External Contributions

  • v6.19.0 Changes

    October 31, 2019

    31-October-2019 - 6.19.0

    The PMD team is pleased to announce PMD 6.19.0.

    πŸš€ This is a minor release.

    Table Of Contents

    πŸ†• New and noteworthy

    ⚑️ Updated PMD Designer

    πŸš€ This PMD release ships a new version of the pmd-designer.
    πŸš€ For the changes, see PMD Designer Changelog.

    Java Metrics

    Modified Rules

    The Java rules InvalidLogMessageFormat and MoreThanOneLogger
    🌲 (java-errorprone) now both support Log4j2. Note that the
    rule "InvalidSlf4jMessageFormat" has been renamed to "InvalidLogMessageFormat" to reflect the fact, that it now
    πŸ‘Œ supports more than slf4j.

    The Java rule LawOfDemeter (java-design) ignores now also Builders, that are
    not assigned to a local variable, but just directly used within a method call chain. The method, that creates
    πŸ— the builder needs to end with "Builder", e.g. newBuilder() or initBuilder() works. This change
    πŸ›  fixes a couple of false positives.

    The Java rule DataflowAnomalyAnalysis (java-errorprone) doesn't check for
    UR anomalies (undefined and then referenced) anymore. These checks were all false-positives, since actual
    UR occurrences would lead to compile errors.

    The java rule DoNotUseThreads (java-multithreading) has been changed
    to not report usages of java.lang.Runnable anymore. Just using Runnable does not automatically create
    🚚 a new thread. While the check for Runnable has been removed, the rule now additionally checks for
    usages of Executors and ExecutorService. Both create new threads, which are not managed by a J2EE
    server.

    πŸ“‡ Renamed Rules

    πŸ›  Fixed Issues

    • core
      • #1978: [core] PMD fails on excluding unknown rules
      • #2014: [core] Making add(SourceCode sourceCode) public for alternative file systems
      • #2020: [core] Wrong deprecation warnings for unused XPath attributes
      • #2036: [core] Wrong include/exclude patterns are silently ignored
      • #2048: [core] Enable type resolution by default for XPath rules
      • #2067: [core] Build issue on Windows
      • #2068: [core] Rule loader should use the same resources loader for the ruleset
      • #2071: [ci] Add travis build on windows
      • #2072: [test][core] Not enough info in "test setup error" when numbers of lines do not match
      • #2082: [core] Incorrect logging of deprecated/renamed rules
    • java
      • #2042: [java] PMD crashes with ClassFormatError: Absent Code attribute...
    • java-bestpractices
      • #1531: [java] UnusedPrivateMethod false-positive with method result
      • #2025: [java] UnusedImports when @see / @link pattern includes a FQCN
    • πŸ’… java-codestyle
      • #2017: [java] UnnecessaryFullyQualifiedName triggered for inner class
    • java-design
      • #1912: [java] Metrics not computed correctly with annotations
    • java-errorprone
      • #336: [java] InvalidSlf4jMessageFormat applies to log4j2
      • #1636: [java] Stop checking UR anomalies for DataflowAnomalyAnalysis
    • java-multithreading
      • #1627: [java] DoNotUseThreads should not warn on Runnable
    • doc
      • #2058: [doc] CLI reference for -norulesetcompatibility shows a boolean default value

    API Changes

    πŸ—„ Deprecated APIs

    For removal
    Internal APIs

    External Contributions

  • v6.18.0 Changes

    September 15, 2019

    15-September-2019 - 6.18.0

    The PMD team is pleased to announce PMD 6.18.0.

    πŸš€ This is a minor release.

    Table Of Contents

    πŸ†• New and noteworthy

    πŸ‘ Java 13 Support

    πŸš€ This release of PMD brings support for Java 13. PMD can parse Switch Expressions
    with the new yield statement and resolve the type of such an expression.

    πŸ“œ PMD also parses Text Blocks as String literals.

    Note: The Switch Expressions and Text Blocks are a preview language feature of OpenJDK 13
    0️⃣ and are not enabled by default. In order to
    analyze a project with PMD that uses these language features, you'll need to enable it via the environment
    variable PMD_JAVA_OPTS and select the new language version 13-preview:

    export PMD_JAVA_OPTS=--enable-preview
    ./run.sh pmd -language java -version 13-preview ...
    

    πŸ‘ Note: Support for the extended break statement introduced in Java 12 as a preview language feature
    🚚 will be removed with the next PMD version 6.19.0.

    πŸ‘ Full support for Scala

    πŸ‘ Thanks to Chris Smith PMD now fully supports Scala. Now rules for analyzing Scala
    code can be developed in addition to the Copy-Paste-Detection (CPD) functionality. There are no rules yet, so
    contributions are welcome.

    βž• Additionally Scala support has been upgraded from 2.12.4 to 2.13.

    πŸ†• New rule designer documentation

    πŸ“š The documentation for the rule designer is now available on the main PMD documentation page:
    πŸš€ Rule Designer Reference. Check it out to learn
    about the usage and features of the rule designer.

    πŸ†• New rules

    The Java rule AvoidMessageDigestField (java-bestpractices) detects fields
    πŸ”’ of the type java.security.MessageDigest. Using a message digest instance as a field would need to be
    πŸ”€ synchronized, as it can easily be used by multiple threads. Without synchronization the calculated hash could
    πŸ”€ be entirely wrong. Instead of declaring this as a field and synchronize access to use it from multiple threads,
    a new instance should be created when needed. This rule is also active when using java's quickstart ruleset.

    The Apex rule DebugsShouldUseLoggingLevel (apex-bestpractices) detects
    🌲 usages of System.debug() method calls that are used without specifying the log level. Having the log
    🌲 level specified provides a cleaner log, and improves readability of it.

    Modified Rules

    • The Java rule CloseResource (java-errorprone) now ignores by default instances
      of java.util.stream.Stream. These streams are AutoCloseable, but most streams are backed by collections,
      arrays, or generating functions, which require no special resource management. However, there are some exceptions:
      The stream returned by Files::lines(Path) is backed by a actual file and needs to be closed. These instances
      0️⃣ won't be found by default by the rule anymore.

    πŸ›  Fixed Issues

    • all
      • #1465: [core] Stylesheet pmd-report.xslt fails to display filepath if 'java' in path
      • #1923: [core] Incremental analysis does not work with shortnames
      • #1983: [core] Avoid crashes with analysis cache when classpath references non-existing directories
      • #1990: [core] Incremental analysis mixes XPath rule violations
    • apex
      • #1901: [apex] Expose super type name of UserClass
      • #1942: [apex] Add best practice rule for debug statements in Apex
    • java
      • #1930: [java] Add Java 13 support
    • java-bestpractices
      • #1227: [java] UnusedFormalParameter should explain checkAll better
      • #1862: [java] New rule for MessageDigest.getInstance
      • #1952: [java] UnusedPrivateField not triggering if @value annotation present
    • πŸ’… java-codestyle
      • #1951: [java] UnnecessaryFullyQualifiedName rule triggered when variable name clashes with package name
    • java-errorprone
      • #1922: [java] CloseResource possible false positive with Streams
      • #1966: [java] CloseResource false positive if Stream is passed as method parameter
      • #1967: [java] CloseResource false positive with late assignment of variable
    • plsql
      • #1933: [plsql] ParseException with cursor declared in anonymous block
      • #1935: [plsql] ParseException with SELECT INTO record defined as global variable
      • #1936: [plslq] ParseException with cursor inside procedure declaration
      • #1946: [plsql] ParseException with using TRIM inside IF statements condition
      • #1947: [plsql] ParseError - SELECT with FOR UPDATE OF
      • #1948: [plsql] ParseException with INSERT INTO using package global variables
      • #1950: [plsql] ParseException with UPDATE and package record variable
      • #1953: [plsql] ParseException with WITH in CURSOR

    API Changes

    πŸ”„ Changes to Renderer

    Each renderer has now a new method Renderer#setUseShortNames which
    is used for implementing the "shortnames" CLI option. The method is automatically called by PMD, if this
    CLI option is in use. When rendering filenames to the report, the new helper method
    AbstractRenderer#determineFileName should be used. This will change
    the filename to a short name, if the CLI option "shortnames" is used.

    Not adjusting custom renderers will make them render always the full file names and not honoring the
    CLI option "shortnames".

    πŸ—„ Deprecated APIs

    For removal
    Internal APIs

    🚚 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.

    External Contributions

  • v6.17.0 Changes

    July 28, 2019

    28-July-2019 - 6.17.0

    The PMD team is pleased to announce PMD 6.17.0.

    πŸš€ This is a minor release.

    Table Of Contents

    πŸ†• New and noteworthy

    ⚑️ Updated PMD Designer

    πŸš€ This PMD release ships a new version of the pmd-designer.
    πŸš€ For the changes, see PMD Designer Changelog.
    βœ… It contains a new feature to edit test cases directly within the designer. Any feedback is highly appreciated.

    πŸ‘ Lua support

    πŸ‘ Thanks to the contribution from Maikel Steneker, and built on top of the ongoing efforts to fully support Antlr-based languages,
    πŸ‘ PMD now has CPD support for Lua.

    Being based on a proper Antlr grammar, CPD can:

    Modified Rules

    The Java rule CloseResource (java-errorprone) ignores now by default
    java.io.ByteArrayInputStream and java.io.CharArrayWriter. Such streams/writers do not need to be closed.

    The Java rule MissingStaticMethodInNonInstantiatableClass (java-errorprone) has now
    the new property annotations.
    When one of the private constructors is annotated with one of the annotations, then the class is not considered
    0️⃣ non-instantiatable anymore and no violation will be reported. By default, Spring's @Autowired and
    Java EE's @Inject annotations are recognized.

    πŸ›  Fixed Issues

    • core
      • #1913: [core] "-help" CLI option ends with status code != 0
    • doc
      • #1896: [doc] Error in changelog 6.16.0 due to not properly closed rule tag
      • #1898: [doc] Incorrect code example for DoubleBraceInitialization in documentation on website
      • #1906: [doc] Broken link for adding own CPD languages
      • #1909: [doc] Sample usage example refers to deprecated ruleset "basic.xml" instead of "quickstart.xml"
    • java
      • #1910: [java] ATFD calculation problem
    • java-errorprone
      • #1749: [java] DD False Positive in DataflowAnomalyAnalysis
      • #1832: [java] False positives for MissingStaticMethodInNonInstantiatableClass when DI is used
      • #1921: [java] CloseResource false positive with ByteArrayInputStream
    • java-multithreading
      • #1903: [java] UnsynchronizedStaticFormatter doesn't allow block-level synchronization when using allowMethodLevelSynchronization=true
    • plsql
      • #1902: [pslql] ParseException when parsing (+)
    • xml
      • #1666: [xml] wrong cdata rule description and examples

    External Contributions

    • #1869: [xml] fix #1666 wrong cdata rule description and examples - Artem
    • πŸ‘ #1892: [lua] [cpd] Added CPD support for Lua - Maikel Steneker
    • #1905: [java] DataflowAnomalyAnalysis Rule in right order - YoonhoChoi96
    • ⚑️ #1908: [doc] Update ruleset filename from deprecated basic.xml to quickstart.xml - crunsk
    • #1916: [java] Exclude Autowired and Inject for MissingStaticMethodInNonInstantiatableClass - AnthonyKot
    • #1917: [core] Add 'no error' return option, and assign it to the cli when the help command is invoked - Renato Oliveira
  • v6.16.0 Changes

    June 30, 2019

    30-June-2019 - 6.16.0

    The PMD team is pleased to announce PMD 6.16.0.

    πŸš€ This is a minor release.

    Table Of Contents

    πŸ†• New and noteworthy

    ⚑️ Updated PMD Designer

    πŸš€ This PMD release ships a new version of the pmd-designer.
    πŸš€ For the changes, see PMD Designer Changelog.

    ⚑️ PLSQL Grammar Updates

    ⚑️ The grammar has been updated to support inline constraints in CREATE TABLE statements. Additionally, the
    CREATE TABLE statement may now be followed by physical properties and table properties. However, these
    πŸ“œ properties are skipped over during parsing.

    πŸ‘ The CREATE VIEW statement now supports subquery views.

    πŸ“œ The EXTRACT function can now be parsed correctly. It is used to extract values from a specified
    πŸ“œ datetime field. Also date time literals are parsed now correctly.

    The CASE expression can now be properly used within SELECT statements.

    πŸ‘ Table aliases are now supported when specifying columns in INSERT INTO clauses.

    πŸ†• New Rules

    The Java rule DoubleBraceInitialization (java-bestpractices)
    detects non static initializers in anonymous classes also known as "double brace initialization".
    This can be problematic, since a new class file is generated and object holds a strong reference
    to the surrounding class.

    Note: This rule is also part of the Java quickstart ruleset (rulesets/java/quickstart.xml).

    Modified Rules

    The Java rule UnusedPrivateField (java-bestpractices) now ignores by
    0️⃣ default fields, that are annotated with the Lombok experimental annotation @Delegate. This can be
    customized with the property ignoredAnnotations.

    The Java rule SingularField (java-design) now ignores by
    0️⃣ default fields, that are annotated with the Lombok experimental annotation @Delegate. This can be
    customized with the property ignoredAnnotations.

    The Java rules UnsynchronizedStaticFormatter and
    UnsynchronizedStaticDateFormatter (java-multithreading)
    πŸ”€ now prefer synchronized blocks by default. They will raise a violation, if the synchronization is implemented
    on the method level. To allow the old behavior, the new property allowMethodLevelSynchronization can
    be enabled.

    The Java rule UseUtilityClass (java-design) has a new property ignoredAnnotations.
    0️⃣ By default, classes that are annotated with Lombok's @UtilityClass are ignored now.

    The Java rule NonStaticInitializer (java-errorprone) does not report
    non static initializers in anonymous classes anymore. For this use case, there is a new rule now:
    DoubleBraceInitialization (java-bestpractices).

    The Java rule CommentDefaultAccessModifier (java-codestyle) was enhanced
    0️⃣ in the last version 6.15.0 to check also top-level types by default. This created many new violations.
    πŸš‘ Missing the access modifier for top-level types is not so critical, since it only decreases the visibility
    of the type.

    βͺ The default behaviour has been restored. If you want to enable the check for top-level types, you can
    πŸ‘‰ use the new property checkTopLevelTypes.

    The Java rule CloseResource (java-errorprone) now by default searches
    for any unclosed java.lang.AutoCloseable resource. This includes now the standard java.io.*Stream classes.
    πŸ”§ Previously only SQL-related resources were considered by this rule. The types can still be configured
    via the types property. Some resources do not need to be closed (e.g. ByteArrayOutputStream). These
    πŸ”§ exceptions can be configured via the new property allowedResourceTypes.
    βͺ In order to restore the old behaviour, just remove the type java.lang.AutoCloseable from the types
    property and keep the remaining SQL-related classes.

    πŸ—„ Deprecated Rules

    • The Java rule AvoidFinalLocalVariable (java-codestyle) has been deprecated
      🚚 and will be removed with PMD 7.0.0. The rule is controversial and also contradicts other existing
      rules such as LocalVariableCouldBeFinal. If the goal is to avoid defining
      constants in a scope smaller than the class, then the rule AvoidDuplicateLiterals
      should be used instead.

    πŸ›  Fixed Issues

    • apex
      • #1664: [apex] False positive ApexSharingViolationsRule, unsupported Apex feature
    • java
      • #1848: [java] Local classes should preserve their modifiers
    • java-bestpractices
      • #1703: [java] UnusedPrivateField on member annotated with lombok @DeleGate
      • #1845: [java] Regression in MethodReturnsInternalArray not handling enums
      • #1854: [java] Rule to check for double brace initialisation
    • πŸ’… java-codestyle
      • #1612: [java] Deprecate AvoidFinalLocalVariable
      • #1880: [java] CommentDefaultAccessModifier should be configurable for top-level classes
    • java-design
      • #1094: [java] UseUtilityClass should be LombokAware
    • java-errorprone
      • #1000: [java] The rule CloseResource should deal with IO stream as default
      • #1853: [java] False positive for NonStaticInitializer in anonymous class
    • java-multithreading
      • #1814: [java] UnsynchronizedStaticFormatter documentation and implementation wrong
      • #1815: [java] False negative in UnsynchronizedStaticFormatter
    • plsql
      • #1828: [plsql] Parentheses stopped working
      • #1850: [plsql] Parsing errors with INSERT using returning or records and TRIM expression
      • #1873: [plsql] Expression list not working
      • #1878: [pslql] ParseException when parsing USING
      • #1879: [pslql] ParseException when parsing LEFT JOIN

    API Changes

    πŸ—„ Deprecated APIs

    🚚 > Reminder: Please don't use members marked with the annotation InternalApi, as they will likely be removed, hidden, or otherwise intentionally broken with 7.0.0.

    In ASTs

    As part of the changes we'd like to do to AST classes for 7.0.0, we would like to
    hide some methods and constructors that rule writers should not have access to.
    The following usages are now deprecated in the Java AST (with other languages to come):

    • πŸ—„ Manual instantiation of nodes. Constructors of node classes are deprecated and marked InternalApi. Nodes should only be obtained from the parser, which for rules, means that never need to instantiate node themselves. Those constructors will be made package private with 7.0.0.
    • Subclassing of abstract node classes, or usage of their type. Version 7.0.0 will bring a new set of abstractions that will be public API, but the base classes are and will stay internal. You should not couple your code to them.
      • In the meantime you should use interfaces like JavaNode or Node, or the other published interfaces in this package, to refer to nodes generically.
      • Concrete node classes will be made final with 7.0.0.
    • Setters found in any node class or interface. Rules should consider the AST immutable. We will make those setters package private with 7.0.0.

    πŸ“¦ Please look at net.sourceforge.pmd.lang.java.ast to find out the full list
    πŸ—„ of deprecations.

    External Contributions

  • v6.15.0 Changes

    May 26, 2019

    26-May-2019 - 6.15.0

    The PMD team is pleased to announce PMD 6.15.0.

    πŸš€ This is a minor release.

    Table Of Contents

    πŸ†• New and noteworthy

    ✨ Enhanced Matlab support

    Thanks to the contributions from Maikel Steneker CPD for Matlab can
    πŸ“œ now parse Matlab programs which use the question mark operator to specify access to
    class members:

    classdef Class1
    properties (SetAccess = ?Class2)
    

    πŸ‘ CPD also understands now double quoted strings, which are supported since version R2017a of Matlab:

    str = "This is a string"
    

    ✨ Enhanced C++ support

    πŸ‘ CPD now supports digit separators in C++ (language module "cpp"). This is a C++14 feature.

    Example: auto integer_literal = 1'000'000;

    The single quotes can be used to add some structure to large numbers.

    πŸ‘€ CPD also parses raw string literals now correctly (see #1784).

    πŸ†• New Rules

    The new Apex rule FieldNamingConventions (apex-codestyle) checks the naming
    0️⃣ conventions for field declarations. By default this rule uses the standard Apex naming convention (Camel case),
    πŸ”§ but it can be configured through properties.

    The new Apex rule FormalParameterNamingConventions (apex-codestyle) checks the
    0️⃣ naming conventions for formal parameters of methods. By default this rule uses the standard Apex naming
    πŸ”§ convention (Camel case), but it can be configured through properties.

    The new Apex rule LocalVariableNamingConventions (apex-codestyle) checks the
    0️⃣ naming conventions for local variable declarations. By default this rule uses the standard Apex naming
    πŸ”§ convention (Camel case), but it can be configured through properties.

    The new Apex rule PropertyNamingConventions (apex-codestyle) checks the naming
    0️⃣ conventions for property declarations. By default this rule uses the standard Apex naming convention (Camel case),
    πŸ”§ but it can be configured through properties.

    The new Java rule UseShortArrayInitializer (java-codestyle) searches for
    array initialization expressions, which can be written shorter.

    Modified Rules

    The Apex rule ClassNamingConventions (apex-codestyle) can now be configured
    using various properties for the specific kind of type declarations (e.g. class, interface, enum).
    0️⃣ As before, this rule uses by default the standard Apex naming convention (Pascal case).

    The Apex rule MethodNamingConventions (apex-codestyle) can now be configured
    βœ… using various properties to differenciate e.g. static methods and test methods.
    0️⃣ As before, this rule uses by default the standard Apex naming convention (Camel case).

    The Java rule FieldNamingConventions (java-codestyle) now by default ignores
    the field serialPersistentFields. Since this is a field which needs to have this special name, no
    field naming conventions can be applied here. It is excluded the same way like serialVersionUID via the
    property exclusions.

    The Java rule CommentRequired (java-documentation) has a new property
    0️⃣ serialPersistentFieldsCommentRequired with the default value "Ignored". This means that from now
    on comments for the field serialPersistentFields are not required anymore. You can change the property
    βͺ to restore the old behavior.

    The Java rule ProperLogger (java-errorprone) has two new properties
    πŸ”§ to configure the logger class (e.g. "org.slf4j.Logger") and the logger name of the special case,
    πŸ”§ when the logger is not static. The name of the static logger variable was already configurable.
    🌲 The new property "loggerClass" allows to use this rule for different logging frameworks.
    This rule covers all the cases of the now deprecated rule LoggerIsNotStaticFinal.

    The Java rule CommentDefaultAccessModifier (java-codestyle) now reports also
    πŸ“¦ missing comments for top-level classes and annotations, that are package-private.

    πŸ—„ Deprecated Rules

    The Apex rule VariableNamingConventions (apex-codestyle) has been deprecated and
    🚚 will be removed with PMD 7.0.0. The rule is replaced by the more general rules
    FieldNamingConventions,
    FormalParameterNamingConventions,
    LocalVariableNamingConventions, and
    PropertyNamingConventions.

    The Java rule LoggerIsNotStaticFinal (java-errorprone) has been deprecated
    and will be removed with PMD 7.0.0. The rule is replaced by ProperLogger.

    πŸ›  Fixed Issues

    • apex
      • #1321: [apex] Should VariableNamingConventions require properties to start with a lowercase letter?
      • #1783: [apex] comments on constructor not recognized when the Class has inner class
    • cpp
      • #1784: [cpp] Improve support for raw string literals
    • dart
      • #1809: [dart] [cpd] Parse error with escape sequences
    • java
      • #1842: [java] Annotated module declarations cause parse error
    • java-bestpractices
      • #1738: [java] MethodReturnsInternalArray does not work in inner classes
    • πŸ’… java-codestyle
      • #1495: [java] Rule to detect overly verbose array initializiation
      • #1684: [java] Properly whitelist serialPersistentFields
      • #1804: [java] NPE in UnnecessaryLocalBeforeReturnRule
    • python
      • #1810: [python] [cpd] Parse error when using Python 2 backticks
    • matlab
      • #1830: [matlab] [cpd] Parse error with comments
      • #1793: [java] CommentDefaultAccessModifier not working for classes

    API Changes

    πŸ—„ Deprecated APIs

    For removal

    External Contributions

  • v6.14.0 Changes

    April 28, 2019

    28-April-2019 - 6.14.0

    The PMD team is pleased to announce PMD 6.14.0.

    πŸš€ This is a minor release.

    Table Of Contents

    πŸ†• New and noteworthy

    πŸ‘ Dart support

    πŸ‘ Thanks to the contribution from Maikel Steneker, and built on top of the ongoing efforts to fully support Antlr-based languages,
    πŸ‘ PMD now has CPD support for Dart.

    Being based on a proper Antlr grammar, CPD can:

    ⚑️ Updated PMD Designer

    πŸš€ This PMD release ships a new version of the pmd-designer.
    πŸ‘€ For the changes, see PMD Designer Changelog.

    Modified Rules

    The Java rule AssignmentToNonFinalStatic (java-errorprone) will now report on each
    assignment made within a constructor rather than on the field declaration. This makes it easier for developers to
    find the offending statements.

    The Java rule NoPackage (java-codestyle) will now report additionally enums
    πŸ“¦ and annotations that do not have a package declaration.

    πŸ›  Fixed Issues

    • all
      • #1515: [core] Module pmd-lang-test is missing javadoc artifact
      • #1788: [cpd] [core] Use better ClassLoader for ServiceLoader in LanguageFactory
      • #1794: [core] Ruleset Compatibility fails with excluding rules
    • go
      • #1751: [go] Parsing errors encountered with escaped backslash
    • java
      • #1532: [java] NPE with incomplete auxclasspath
      • #1691: [java] Possible Data Race in JavaTypeDefinitionSimple.getGenericType
      • #1729: [java] JavaRuleViolation loses information in className field when class has package-private access level
    • java-bestpractices
      • #1190: [java] UnusedLocalVariable/UnusedPrivateField false-positive
      • #1720: [java] UnusedImports false positive for Javadoc link with array type
    • πŸ’… java-codestyle
      • #1755: [java] False negative in UnnecessaryLocalBeforeReturn when splitting statements across multiple lines
      • #1782: [java] NoPackage: False Negative for enums
    • java-design
      • #1760: [java] UseObjectForClearerAPI flags private methods

    API Changes

    No changes.

    External Contributions