PMD 7.0.0 - pmd/pmd GitHub Wiki

⚠️ This page is outdated. Please refer to PMD 7 Tracking Issue #3898 for the current status.


This page collects features considered for the next major release PMD 7.0.0.

Milestone: https://github.com/pmd/pmd/milestone/19


General Info

Development happens on branch pmd/7.0.x. The goal is, to keep this branch stable and buildable and working.

If a feature/change is bigger than one PR, then an extra branch must be used, which can be broken. E.g. changing the grammar most likely breaks the rule, but fixing the rule immediately does not always make sense, if the grammar changes are not done yet. So, on the branch, the grammar changes would be done in multiple chunks and after that the rules would be fixed. Only then, the extra branch might be merged back to pmd/7.0.x. During that, pmd/7.0.x is open for other unrelated changes.

Designer support: The corresponding development branch for the designer is compat-7.0. The focus of this branch is just to keep up with breaking-API changes made on pmd/7.0.x, not yet to introduce new features.

To try out PMD 7 features in the designer, you can eg do a local install of the PMD 7 modules you want to work with (eg mvn clean install -pl pmd-core,pmd-lang-test,pmd-test,pmd-java), then either (in decreasing order of convenience):

  • run the designer from your IDE (in Intellij there are some pre-made run configurations);
  • run pmd-ui from source: ./mvnw -Prunning,with-javafx exec:java (see more details in readme);
  • install pmd-ui from source locally, then pmd-dist (mvn clean install -pl pmd-dist -Dpmd-designer.version=7.0.0-SNAPSHOT), and use the pmd-bin-7.0.0-SNAPSHOT.zip.

Summary of PMD 7

Main Features

This are the features considered in scope for the first PMD 7 release.

New Logo

Rationale: Modernize the logo, get rid of the gun.

Status:

2020-05-11: New logo has been selected via a call for logo + vote. Now it needs to be implemented at the various places.

2020-05-14: 9 open tasks.

2020-06-20: 2 of 9 tasks done.

Details: PMD 7.0.0 New Logo

API

Rationale: Clear separation between API and Implementation. Should help future development.

Status: unclear

Details: PMD 7.0.0 API

Full Antlr Support

Rationale: Leverage existing grammars written in Antlr, easier support for new languages.

Status: 2020-05-11: basic support for antlr is done, but API clarification is needed. This will lead to additional refactoring and documentation update. Blocked by PMD 7.0.0 API.

Details: PMD 7.0.0 Full Antlr Support

Documentation

Rationale: It's the showpiece of PMD, the first thing that is looked at. Must be up to date and near to complete... e.g. ruleset presentation (tagging, quickstart, ...)

Status:

2020-05-14: first proposal of tasks to be done. 4 done, 31 open.

Details: PMD 7.0.0 Documentation

XPath

Rationale: Modernize.

Status:

2020-05-14: First proposal of tasks done. 1 done, 11 open, 3 optional

2020-07-19: 2 done, 10 open, 3 optional

2020-10-30: 8 done, 7 open, 3 optional

Details: PMD 7.0.0 XPath

Java

Rationale: AST simplification, improved type resolution.

Status:

Details: PMD 7.0.0 Java

Miscellaneous

Rationale: Small improvements, refactorings and internals.

Status:

2020-05-14: first proposal of tasks to be done. 1 done, 8 open.

2020-06-20: 2 of 9 tasks done.

Details: PMD 7.0.0 Miscellaneous


More Ideas

This is just a collection of ideas. The ideas are out of scope for the initial PMD 7 release, but might be considered afterwards.

Even though these features might not be implemented initially, it's still important to know about these, so that we can keep them in mind when designing/adapting any API.

TODO: merge with roadmap / future directions

Other

  • Jenkins integration tests/samples. Maybe part of pmd-examples repo.
  • Groovy (or any other scripting language) rules (@rsoesemann). This means, that you can write a small visitor scriptlet inside the rule set XML file, that allows you to share custom rules more easily. This is more flexible than XPath rules, but less heavy than Java rules.
  • Complete language support for cpd only languages (e.g. go, kotlin, ...)
  • autofixes (see also #693 Autofixes feature development)
  • some kind of universal AST -> rules for more than one language
  • Simple PMD GUI / Web GUI?
  • Multifile analysis
    • Generic ClassCounterRule? Counts the number of classes within the project being analyzed. Some kind of metric?
  • Mixing languages #237 RFC: Analyzing embedded snippets from other languages
    • Java + javadoc
    • Regex (in Pattern.compile(“..”), depends on host language)
    • jsp, html, javascript
    • visualforce + javascript
  • CPD on a single file
  • Implement missing rules (e.g. look at the GSoC proposed project)
  • Maybe rewrite CPD GUI in JavaFX?
  • RuleSet Editor? / Webapp
    • Could be a project on its own...
  • RuleSet Migration Tool
  • Would it be possible to create slim bin archives on demand, e.g. allow the user to select the modules they want to include, and based on that pack an archive, caching it if it was already built? On github pages? On our own web server?
  • PMD AST Webservice: e.g. Spring Boot+PMD+REST+Simple JS frontend. You can enter in the browser some code, and you get a online representation of the AST. You might even run XPath rules on that. Kind of a online version of the designer maybe. But first feature could be, to pretty print a code snippet - so, the online version of the tree dump API.
  • Generate a PDF version of the documentation
⚠️ **GitHub.com Fallback** ⚠️