[pmd-devel] [ANNOUNCE] PMD 6.15.0 Released
A source code analyzer
Brought to you by:
adangel,
juansotuyo
|
From: Andreas D. <and...@pm...> - 2019-05-26 09:54:48
|
* Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F6.15.0 * Documentation: https://pmd.github.io/pmd-6.15.0/ 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 <https://sourceforge.net/p/pmd/news/2019/05/pmd-6150-released/#new-and-noteworthy> o Enhanced Matlab support <https://sourceforge.net/p/pmd/news/2019/05/pmd-6150-released/#enhanced-matlab-support> o Enhanced C++ support <https://sourceforge.net/p/pmd/news/2019/05/pmd-6150-released/#enhanced-c++-support> o New Rules <https://sourceforge.net/p/pmd/news/2019/05/pmd-6150-released/#new-rules> o Modified Rules <https://sourceforge.net/p/pmd/news/2019/05/pmd-6150-released/#modified-rules> o Deprecated Rules <https://sourceforge.net/p/pmd/news/2019/05/pmd-6150-released/#deprecated-rules> * Fixed Issues <https://sourceforge.net/p/pmd/news/2019/05/pmd-6150-released/#fixed-issues> * API Changes <https://sourceforge.net/p/pmd/news/2019/05/pmd-6150-released/#api-changes> o Deprecated APIs <https://sourceforge.net/p/pmd/news/2019/05/pmd-6150-released/#deprecated-apis> + For removal <https://sourceforge.net/p/pmd/news/2019/05/pmd-6150-released/#for-removal> * External Contributions <https://sourceforge.net/p/pmd/news/2019/05/pmd-6150-released/#external-contributions> New and noteworthy Enhanced Matlab support Thanks to the contributions from Maikel Steneker <https://github.com/maikelsteneker> 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 <https://github.com/pmd/pmd/issues/1784>). New Rules * The new Apex rule |FieldNamingConventions| <https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#fieldnamingconventions> (|apex-codestyle|) checks the naming 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| <https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#formalparameternamingconventions> (|apex-codestyle|) checks the 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| <https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#localvariablenamingconventions> (|apex-codestyle|) checks the 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| <https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#propertynamingconventions> (|apex-codestyle|) checks the naming 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| <https://pmd.github.io/pmd-6.15.0/pmd_rules_java_codestyle.html#useshortarrayinitializer> (|java-codestyle|) searches for array initialization expressions, which can be written shorter. Modified Rules * The Apex rule |ClassNamingConventions| <https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#classnamingconventions> (|apex-codestyle|) can now be configured using various properties for the specific kind of type declarations (e.g. class, interface, enum). As before, this rule uses by default the standard Apex naming convention (Pascal case). * The Apex rule |MethodNamingConventions| <https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#methodnamingconventions> (|apex-codestyle|) can now be configured using various properties to differenciate e.g. static methods and test methods. As before, this rule uses by default the standard Apex naming convention (Camel case). * The Java rule |FieldNamingConventions| <https://pmd.github.io/pmd-6.15.0/pmd_rules_java_codestyle.html#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| <https://pmd.github.io/pmd-6.15.0/pmd_rules_java_documentation.html#commentrequired> (|java-documentation|) has a new property |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| <https://pmd.github.io/pmd-6.15.0/pmd_rules_java_errorprone.html#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| <https://pmd.github.io/pmd-6.15.0/pmd_rules_java_errorprone.html#loggerisnotstaticfinal>. * The Java rule |CommentDefaultAccessModifier| <https://pmd.github.io/pmd-6.15.0/pmd_rules_java_codestyle.html#commentdefaultaccessmodifier> (|java-codestyle|) now reports also missing comments for top-level classes and annotations, that are package-private. Deprecated Rules * The Apex rule |VariableNamingConventions| <https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#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| <https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#fieldnamingconventions>, |FormalParameterNamingConventions| <https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#formalparameternamingconventions>, |LocalVariableNamingConventions| <https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#localvariablenamingconventions>, and |PropertyNamingConventions| <https://pmd.github.io/pmd-6.15.0/pmd_rules_apex_codestyle.html#propertynamingconventions>. * The Java rule |LoggerIsNotStaticFinal| <https://pmd.github.io/pmd-6.15.0/pmd_rules_java_errorprone.html#loggerisnotstaticfinal> (|java-errorprone|) has been deprecated and will be removed with PMD 7.0.0. The rule is replaced by |ProperLogger| <https://pmd.github.io/pmd-6.15.0/pmd_rules_java_errorprone.html#properlogger>. Fixed Issues * apex o #1321 <https://github.com/pmd/pmd/issues/1321>: [apex] Should VariableNamingConventions require properties to start with a lowercase letter? o #1783 <https://github.com/pmd/pmd/issues/1783>: [apex] comments on constructor not recognized when the Class has inner class * cpp o #1784 <https://github.com/pmd/pmd/issues/1784>: [cpp] Improve support for raw string literals * dart o #1809 <https://github.com/pmd/pmd/issues/1809>: [dart] [cpd] Parse error with escape sequences * java o #1842 <https://github.com/pmd/pmd/issues/1842>: [java] Annotated module declarations cause parse error * java-bestpractices o #1738 <https://github.com/pmd/pmd/issues/1738>: [java] MethodReturnsInternalArray does not work in inner classes * java-codestyle o #1495 <https://github.com/pmd/pmd/issues/1495>: [java] Rule to detect overly verbose array initializiation o #1684 <https://github.com/pmd/pmd/issues/1684>: [java] Properly whitelist serialPersistentFields o #1804 <https://github.com/pmd/pmd/issues/1804>: [java] NPE in UnnecessaryLocalBeforeReturnRule * python o #1810 <https://github.com/pmd/pmd/issues/1810>: [python] [cpd] Parse error when using Python 2 backticks * matlab o #1830 <https://github.com/pmd/pmd/issues/1830>: [matlab] [cpd] Parse error with comments o #1793 <https://github.com/pmd/pmd/issues/1793>: [java] CommentDefaultAccessModifier not working for classes API Changes Deprecated APIs For removal * The |DumpFacades| in all languages, that could be used to transform a AST into a textual representation, will be removed with PMD 7. The rule designer is a better way to inspect nodes. o |net.sourceforge.pmd.lang.apex.ast.DumpFacade| <https://javadoc.io/page/net.sourceforge.pmd/pmd-apex/6.15.0/net/sourceforge/pmd/lang/apex/ast/DumpFacade.html#> o |net.sourceforge.pmd.lang.java.ast.DumpFacade| <https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.15.0/net/sourceforge/pmd/lang/java/ast/DumpFacade.html#> o |net.sourceforge.pmd.lang.ecmascript.ast.DumpFacade| <https://javadoc.io/page/net.sourceforge.pmd/pmd-javascript/6.15.0/net/sourceforge/pmd/lang/ecmascript/ast/DumpFacade.html#> o |net.sourceforge.pmd.lang.jsp.ast.DumpFacade| <https://javadoc.io/page/net.sourceforge.pmd/pmd-jsp/6.15.0/net/sourceforge/pmd/lang/jsp/ast/DumpFacade.html#> o |net.sourceforge.pmd.lang.plsql.ast.DumpFacade| <https://javadoc.io/page/net.sourceforge.pmd/pmd-plsql/6.15.0/net/sourceforge/pmd/lang/plsql/ast/DumpFacade.html#> o |net.sourceforge.pmd.lang.vf.ast.DumpFacade| <https://javadoc.io/page/net.sourceforge.pmd/pmd-visualforce/6.15.0/net/sourceforge/pmd/lang/vf/ast/DumpFacade.html#> o |net.sourceforge.pmd.lang.vm.ast.AbstractVmNode#dump| <https://javadoc.io/page/net.sourceforge.pmd/pmd-vm/6.15.0/net/sourceforge/pmd/lang/vm/ast/AbstractVmNode.html#dump(String,boolean,Writer)> o |net.sourceforge.pmd.lang.xml.ast.DumpFacade| <https://javadoc.io/page/net.sourceforge.pmd/pmd-xml/6.15.0/net/sourceforge/pmd/lang/xml/ast/DumpFacade.html#> * The method |LanguageVersionHandler#getDumpFacade| <https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.15.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getDumpFacade(Writer,String,boolean)> will be removed as well. It is deprecated, along with all its implementations in the subclasses of |LanguageVersionHandler| <https://javadoc.io/page/net.sourceforge.pmd/pmd-core/6.15.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#>. External Contributions * #1647 <https://github.com/pmd/pmd/pull/1647>: [java] Rule to detect overly verbose array initialization - Victor <https://github.com/IDoCodingStuffs> * #1762 <https://github.com/pmd/pmd/pull/1762>: [java] LoggerIsNotStaticFinal and ProperLogger - make class-name configurable - Ivo Šmíd <https://github.com/bedla> * #1798 <https://github.com/pmd/pmd/pull/1798>: [java] Make CommentDefaultAccessModifier work for top-level classes - Boris Petrov <https://github.com/boris-petrov> * #1799 <https://github.com/pmd/pmd/pull/1799>: [java] MethodReturnsInternalArray does not work in inner classes - Fixed #1738 - Srinivasan Venkatachalam <https://github.com/Srini1993> * #1802 <https://github.com/pmd/pmd/pull/1802>: [python] [cpd] Add support for Python 2 backticks - Maikel Steneker <https://github.com/maikelsteneker> * #1803 <https://github.com/pmd/pmd/pull/1803>: [dart] [cpd] Dart escape sequences - Maikel Steneker <https://github.com/maikelsteneker> * #1807 <https://github.com/pmd/pmd/pull/1807>: [ci] Fix missing local branch issues when executing pmd-regression-tester - BBG <https://github.com/djydewang> * #1813 <https://github.com/pmd/pmd/pull/1813>: [matlab] [cpd] Matlab comments - Maikel Steneker <https://github.com/maikelsteneker> * #1816 <https://github.com/pmd/pmd/pull/1816>: [apex] Fix ApexDoc handling with inner classes - Jeff Hube <https://github.com/jeffhube> * #1817 <https://github.com/pmd/pmd/pull/1817>: [apex] Add configurable naming convention rules - Jeff Hube <https://github.com/jeffhube> * #1819 <https://github.com/pmd/pmd/pull/1819>: [cpp] [cpd] Add support for digit separators - Maikel Steneker <https://github.com/maikelsteneker> * #1820 <https://github.com/pmd/pmd/pull/1820>: [cpp] [cpd] Improve support for raw string literals - Maikel Steneker <https://github.com/maikelsteneker> * #1821 <https://github.com/pmd/pmd/pull/1821>: [matlab] [cpd] Matlab question mark token - Maikel Steneker <https://github.com/maikelsteneker> * #1822 <https://github.com/pmd/pmd/pull/1822>: [matlab] [cpd] Double quoted string - Maikel Steneker <https://github.com/maikelsteneker> * #1837 <https://github.com/pmd/pmd/pull/1837>: [core] Minor performance improvements - Michael Hausegger <https://github.com/TheRealHaui> * #1838 <https://github.com/pmd/pmd/pull/1838>: [dart] [cpd] Improved string tokenization - Maikel Steneker <https://github.com/maikelsteneker> * #1840 <https://github.com/pmd/pmd/pull/1840>: [java] Whitelist serialPersistentFields - Marcel Härle <https://github.com/marcelhaerle> |