diff --git a/do-release.sh b/do-release.sh index 1e5946f846..1f2f123e46 100755 --- a/do-release.sh +++ b/do-release.sh @@ -77,7 +77,7 @@ echo " pmd-core/src/main/resources/rulesets/releases/${RELEASE_VERSION}.xml f echo echo "* Update **../pmd.github.io/_config.yml** to mention the new release" echo -echo "* Add **../pmd.github.io/_posts/$(date -u +%d-%m-%Y)-PMD-${RELEASE_VERSION}.md" +echo "* Add **../pmd.github.io/_posts/$(date -u +%Y-%m-%d)-PMD-${RELEASE_VERSION}.md" echo echo "Press enter to continue..." read diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 23bc342655..7040cd7cbd 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -4,7 +4,7 @@ permalink: pmd_release_notes.html keywords: changelog, release notes --- -## ????? - 6.3.0-SNAPSHOT +## 29-April-2018 - 6.3.0 The PMD team is pleased to announce PMD 6.3.0. @@ -12,17 +12,16 @@ This is a minor release. ### Table Of Contents -* [New and noteworthy](#new-and-noteworthy) +* [New and noteworthy](#new-and-noteworthy) * [Tree Traversal Revision](#tree-traversal-revision) * [Naming Rules Enhancements](#naming-rules-enhancements) * [CPD Suppression](#cpd-suppression) * [Swift 4.1 Support](#swift-41-support) * [New Rules](#new-rules) * [Modified Rules](#modified-rules) -* [Fixed Issues](#fixed-issues) -* [API Changes](#api-changes) * [Deprecated Rules](#deprecated-rules) -* [External Contributions](#external-contributions) +* [Fixed Issues](#fixed-issues) +* [External Contributions](#external-contributions) ### New and noteworthy @@ -34,20 +33,22 @@ not all of them honoring find boundaries; that is, nodes that define a self-cont (think of lambdas, nested classes, anonymous classes, etc.). We have modified these methods to ensure all of them honor find boundaries. -This change implies several false positives / unexpected results (ie: `ASTBlockStatement` falsely returning `true` to `isAllocation()`) -have been fixed; and lots of searches are now restricted to smaller search areas, which improves performance (depending on the project, -we have measured up to 10% improvements during Type Resolution, Symbol Table analysis, and some rules' application). +This change implies several false positives / unexpected results +(ie: `ASTBlockStatement` falsely returning `true` to `isAllocation()`) +have been fixed; and lots of searches are now restricted to smaller search areas, which improves performance +(depending on the project, we have measured up to 10% improvements during Type Resolution, Symbol Table analysis, +and some rules' application). #### Naming Rules Enhancements - * [`ClassNamingConventions`](pmd_rules_java_codestyle.html#classnamingconventions) - has been enhanced to allow granular configuration of naming - conventions for different kinds of type declarations (eg enum or abstract - class). Each kind of declaration can use its own naming convention - using a regex property. See the rule's documentation for more info about - configuration and default conventions. +* [ClassNamingConventions](pmd_rules_java_codestyle.html#classnamingconventions) (`java-codestyle`) + has been enhanced to allow granular configuration of naming + conventions for different kinds of type declarations (eg enum or abstract + class). Each kind of declaration can use its own naming convention + using a regex property. See the rule's documentation for more info about + configuration and default conventions. - * [`MethodNamingConventions`](pmd_rules_java_codestyle.html#methodnamingconventions) +* [MethodNamingConventions](pmd_rules_java_codestyle.html#methodnamingconventions) (`java-codestyle`) has been enhanced in the same way. #### CPD Suppression @@ -57,7 +58,7 @@ including `CPD-OFF` (to start ignoring code), or `CPD-ON` (to resume analysis) d This has proved to be much more flexible and versatile than the old annotation-based approach, and has since been the preferred way to suppress CPD warnings. -On this ocassion, we are extending support for comment-based suppressions to many other languages: +On this occasion, we are extending support for comment-based suppressions to many other languages: * C/C++ * Ecmascript / Javascript @@ -92,39 +93,46 @@ Other languages are equivalent. #### Swift 4.1 Support -Thanks to major contributions from [kenji21](https://github.com/kenji21) the Swift grammar has been updated to support Swift 4.1. -This is a major update, since the old grammar was quite dated, and we are sure all iOS developers will enjoy it. +Thanks to major contributions from [kenji21](https://github.com/kenji21) the Swift grammar has been updated to +support Swift 4.1. This is a major update, since the old grammar was quite dated, and we are sure all iOS +developers will enjoy it. Unfortunately, this change is not compatible. The grammar elements that have been removed (ie: the keywords `__FILE__`, -`__LINE__`, `__COLUMN__` and `__FUNCTION__`) are no longer supported. We don't usually introduce such drastic / breaking -changes in minor releases, however, given that the whole Swift ecosystem pushes hard towards always using the latest -versions, and that Swift needs all code and libraries to be currently compiling against the same Swift version, -we felt strongly this change was both safe and necessary to be shipped as soon as possible. We had great feedback -from the comunity during the processm but if you have a legitimate use case for older Swift versions, please let us know -[on our Issue Tracke](https://github.com/pmd/pmd/issues). +`__LINE__`, `__COLUMN__` and `__FUNCTION__`) are no longer supported. We don't usually introduce such +drastic / breaking changes in minor releases, however, given that the whole Swift ecosystem pushes hard towards +always using the latest versions, and that Swift needs all code and libraries to be currently compiling against +the same Swift version, we felt strongly this change was both safe and necessary to be shipped as soon as possible. +We had great feedback from the community during the process but if you have a legitimate use case for older Swift +versions, please let us know [on our Issue Tracker](https://github.com/pmd/pmd/issues). #### New Rules -* The new Java rule [`InsecureCryptoIv`](pmd_rules_java_security.html#insecurecryptoiv) (`java-security`) +* The new Java rule [InsecureCryptoIv](pmd_rules_java_security.html#insecurecryptoiv) (`java-security`) detects hard coded initialization vectors used in cryptographic operations. It is recommended to use a randomly generated IV. #### Modified Rules -* The Java rule [`UnnecessaryConstructor`](pmd_rules_java_codestyle.html#unnecessaryconstructor) (`java-codestyle`) +* The Java rule [UnnecessaryConstructor](pmd_rules_java_codestyle.html#unnecessaryconstructor) (`java-codestyle`) has been rewritten as a Java rule (previously it was a XPath-based rule). It supports a new property `ignoredAnnotations` and ignores by default empty constructors, that are annotated with `javax.inject.Inject`. Additionally, it detects now also unnecessary private constructors in enums. -* The property `checkNativeMethods` of the Java rule [`MethodNamingConventions`](pmd_rules_java_codestyle.html#methodnamingconventions) +* The property `checkNativeMethods` of the Java rule [MethodNamingConventions](pmd_rules_java_codestyle.html#methodnamingconventions) (`java-codestyle`) is now deprecated, as it is now superseded by `nativePattern`. Support for that property will be maintained until 7.0.0. -* The Java rule [`ControlStatementBraces`](pmd_rules_java_codestyle.html#controlstatementbraces) (`java-codestyle`) +* The Java rule [ControlStatementBraces](pmd_rules_java_codestyle.html#controlstatementbraces) (`java-codestyle`) supports a new boolean property `checkSingleIfStmt`. When unset, the rule won't report `if` statements which lack braces, if the statement is not part of an `if ... else if` chain. This property defaults to true. +#### Deprecated Rules + +* The Java rule [AbstractNaming](pmd_rules_java_codestyle.html#abstractnaming) (`java-codestyle`) is deprecated + in favour of [ClassNamingConventions](pmd_rules_java_codestyle.html#classnamingconventions). + See [Naming rules enhancements](#naming-rules-enhancements). + ### Fixed Issues * all @@ -159,15 +167,7 @@ from the comunity during the processm but if you have a legitimate use case for * java-performance * [#586](https://github.com/pmd/pmd/issues/586): \[java] AvoidUsingShortType erroneously triggered on overrides of 3rd party methods * swift - * [#678](https://github.com/pmd/pmd/issues/678): \[swift][cpd] Exception when running for Swift 4 code (KeyPath) - -### API Changes - -#### Deprecated Rules - - * The Java rule `AbstractNaming` (category `codestyle`) is deprecated - in favour of [`ClassNamingConventions`](pmd_rules_java_codestyle.html#classnamingconventions). - See [Naming rules enhancements](#naming-rules-enhancements). + * [#678](https://github.com/pmd/pmd/issues/678): \[swift]\[cpd] Exception when running for Swift 4 code (KeyPath) ### External Contributions