Update the PMD code, docs, configuration, and tests for the latest changes.

Review Request #11530 — Created March 16, 2021 and submitted

Information

ReviewBot
release-3.0.x

Reviewers

PMD has been updated to use the renamed BaseTool class and to take
advantage of the new dependency management, to simplify code.

As part of this, configuration has become standardized, allowing the
pmd tool path to be located on the fileystem (if in $PATH) or
configured in the worker's exe_paths setting. This has the additional
small benefit of caching the pmd binary path, so it doesn't have to be
looked up in $PATH at execution time.

The old pmd_path setting has been deprecated. It will be transitioned
over when loading the configuration. Documentation has been updated to
discuss this.

The list of file extensions are now more forgiving. Extra commas, spaces,
and leading . for file extensions are handled correctly.

The documentation has been fleshed out to go over the fields present
during tool configuration.

Unit tests have been added for handle_file(), to give us a base for
future work and to ensure that the cached pmd path is being used.

Unit tests pass.

Tested dependency checking in the worker, with pmd in the $PATH
and with an explicit path provided in exe_paths.

Built the docs. Checked for build errors, spelling errors, and bad links.

Summary ID
Update the PMD code, docs, configuration, and tests for the latest changes.
PMD has been updated to use the renamed `BaseTool` class and to take advantage of the new dependency management, to simplify code. As part of this, configuration has become standardized, allowing the `pmd` tool path to be located on the fileystem (if in `$PATH`) or configured in the worker's `exe_paths` setting. This has the additional small benefit of caching the `pmd` binary path, so it doesn't have to be looked up in `$PATH` at execution time. The documentation has been fleshed out to go over the fields present during tool configuration. Unit tests have been added for `handle_file()`, to give us a base for future work and to ensure that the cached `pmd` path is being used.
eeb5b24cf4fadf0961a3b4b5b513f0f82d3c7cc7
Description From Last Updated

F401 'reviewbot.config.config' imported but unused

reviewbotreviewbot

F811 redefinition of unused 'config' from line 9

reviewbotreviewbot

F811 redefinition of unused 'config' from line 9

reviewbotreviewbot

F841 local variable 'review' is assigned to but never used

reviewbotreviewbot

F841 local variable 'review' is assigned to but never used

reviewbotreviewbot

F811 redefinition of unused 'config' from line 9

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

flake8

chipx86
chipx86
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (23f8c44)