Merge branch 'pr-2552'

[doc] Update next major development page for PMD 7 plans #2552
This commit is contained in:
Andreas Dangel
2020-06-12 12:45:39 +02:00
2 changed files with 71 additions and 15 deletions

View File

@ -88,7 +88,7 @@ echo "* Update **pmd-apex/src/main/resources/rulesets/apex/quickstart.xml** an
echo " **pmd-java/src/main/resources/rulesets/java/quickstart.xml** with the new rules."
echo
echo "* Update **docs/pages/next_major_development.md** with the API changes for"
echo " the new release based on the release notes"
echo " the new release based on the release notes. Also add any deprecated rules to the list."
echo
echo "* Update **../pmd.github.io/_config.yml** to mention the new release"
echo

View File

@ -4,17 +4,69 @@ permalink: pmd_next_major_development.html
keywords: changelog, release notes, deprecation, api changes
---
We're excited to bring you the next major version of PMD! Here are the major features and changes we're working on.
We're excited to bring you the next major version of PMD!
Here is a summary of what is planned for PMD 7.
To give us feedback or to suggest a new feature, drop us a line on [Gitter](https://gitter.im/pmd/pmd)!
## New Features
## Summary
TODO
### New Logo
## Java grammar changes
We decided it's time to have a modernized logo and get rid of the gun. This allows to include
the logo in anywhere without offense.
{% include note.html content="Current plans are listed [here](https://github.com/pmd/pmd/labels/in%3Aast) and in particular [here](https://github.com/pmd/pmd/issues/1019)" %}
The current tasks are listed here: [Integrate new PMD logo #1931](https://github.com/pmd/pmd/issues/1931)
### API
The API of PMD has been growing over the years and needs to be cleaned up. The goal is, to
have a clear separation between a well-defined API and the implementation, which is internal.
This should help us in future development. This however entails some incompatibilities and
deprecations, see also the sections [New API support guidelines](#new-api-support-guidelines) and
[Planned API removals](#planned-api-removals] below.
### Full Antlr Support
PMD 6 only supports JavaCC based grammars, but with [Antlr](https://www.antlr.org/) parsers
can be generated as well. PMD 7 adds full support for grammars written in Antlr, which allows
to leverage existing grammars.
The current tasks are listed here: [Support for ANTLR based grammars with Swift as an example language #2499](https://github.com/pmd/pmd/issues/2499)
### Documentation
We have quite some ideas how we want to improve the documentation. The goal is, that the documentation is
up to date and nearly complete. One big task is, how the built-in rules are presented, so that users
can easier see, what exactly is available and decide, which rules are useful for the project at hand.
The current tasks are listed here: [Documentations improvements tracker #1139](https://github.com/pmd/pmd/issues/1139)
### XPath
PMD 6 supports XPath 1.0 via the Jaxen library. This library is old and unmaintained creating some problems
(one of which is duplicated classes in the package `org.w3c.dom` which is a Java API actually).
Therefore XPath 1.0 support will be dropped and we upgrade our XPath 2.0 implementation with Saxon moving
on to Saxon HE. This will eventually add support in PMD for XPath 3.1.
The current tasks are listed here: [XPath Improvements for PMD 7 #2523](https://github.com/pmd/pmd/issues/2523)
### Java
Like the main PMD API, the Java AST has been growing over time and the grammar doesn't support
all edge cases (e.g. annotation are not supported everywhere). The goal is to simplify the AST by reducing
unnecessary nodes and abstractions and fix the parsing issues.
This helps in the end to provide a better type resolution implementation, but changing the AST is a breaking
API change.
Some first results of the Java AST changes are for now documented in the Wiki:
[Java clean changes](https://github.com/pmd/pmd/wiki/Java_clean_changes).
### Miscellaneous
There are also some small improvements, refactoring and internal tasks that are planned for PMD 7.
The current tasks are listed here: [PMD 7 Miscellaneous Tasks #2524](https://github.com/pmd/pmd/issues/2524)
## New API support guidelines
@ -878,14 +930,18 @@ large projects, with many duplications, it was causing `OutOfMemoryError`s (see
and {% rule "java/bestpractices/PositionLiteralsFirstInCaseInsensitiveComparisons" %} (ruleset `java-bestpractices`)
have been deprecated in favor of the new rule {% rule "java/bestpractices/LiteralsFirstInComparisons" %}.
* The Java rule [`AvoidFinalLocalVariable`](https://pmd.github.io/pmd-6.16.0/pmd_rules_java_codestyle.html#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`](https://pmd.github.io/pmd-6.16.0/pmd_rules_java_codestyle.html#localvariablecouldbefinal). If the goal is to avoid defining
constants in a scope smaller than the class, then the rule [`AvoidDuplicateLiterals`](https://pmd.github.io/pmd-6.16.0/pmd_rules_java_errorprone.html#avoidduplicateliterals)
should be used instead.
* 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).