Add support for PMD 7.

Review Request #13710 — Created April 5, 2024 and submitted

Information

ReviewBot
release-4.x

Reviewers

PMD just released a big new major version, 7.0.0. This makes a fairly
large change to the basic command-line UI, but is mostly otherwise
compatible.

Some of the output is slightly different for a few of the tests. I've
changed the simulation tests to simulate PMD7, and the integration tests
sometimes need to conditionalize the expected output. We also had one
test (for a config file with no rules) that was obsolete even in PMD
6.55, which treated a file with no active rules as a warning rather than
an error.

Ran unit tests with both PMD 6.55.0 and 7.0.0. Saw that everything
passed.

Summary ID
Add support for PMD 7.
PMD just released a big new major version, 7.0.0. This makes a fairly large change to the basic command-line UI, but is mostly otherwise compatible. Some of the output is slightly different for a few of the tests. I've changed the simulation tests to simulate PMD7, and the integration tests sometimes need to conditionalize the expected output. We also had one test (for a config file with no rules) that was obsolete even in PMD 6.55, which treated a file with no active rules as a warning rather than an error. Testing Done: Ran unit tests with both PMD 6.55.0 and 7.0.0. Saw that everything passed. Reviewed at https://reviews.reviewboard.org/r/13710/
2e2681f5f5f49cf44c94abb26152cafa9c63bd23
Description From Last Updated

'reviewbot.config' imported but unused Column: 1 Error code: F401

reviewbotreviewbot

undefined name 'Any' Column: 44 Error code: F821

reviewbotreviewbot

Can we add the "Instance variables" block here?

chipx86chipx86

This can be removed.

chipx86chipx86

Missing a period.

maubinmaubin

Missing a period and typo "Runnind".

maubinmaubin

Leftover debug code.

maubinmaubin

Missing a period.

maubinmaubin
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

david
chipx86
  1. 
      
  2. bot/reviewbot/tools/pmd.py (Diff revision 2)
     
     
     
    Show all issues

    Can we add the "Instance variables" block here?

  3. bot/reviewbot/tools/tests/test_pmd.py (Diff revision 2)
     
     
     
    Show all issues

    This can be removed.

  4. 
      
david
maubin
  1. 
      
  2. bot/reviewbot/tools/tests/test_pmd.py (Diff revision 3)
     
     
    Show all issues

    Missing a period.

  3. bot/reviewbot/tools/tests/test_pmd.py (Diff revision 3)
     
     
    Show all issues

    Missing a period and typo "Runnind".

  4. bot/reviewbot/tools/tests/test_pmd.py (Diff revision 3)
     
     
     
     
    Show all issues

    Leftover debug code.

  5. bot/reviewbot/tools/tests/test_pmd.py (Diff revision 3)
     
     
    Show all issues

    Missing a period.

  6. 
      
david
maubin
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-4.x (2e2681f)