pmd / pmd/pmd-eclipse-plugin

Relative Path to Subset

Open
#147 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
99
Forks
42
Avg merge
20h 19m
Merged PRs (30d)
19

Description

How do I force the PMD Eclipse plugin to use the latest version of the ruleset? The ruleset is in a file on the local disk. I am not sure if this is a missing feature, lack of documentation or my lack of Google skills.

I configured the PMD Eclipse plugin to use a ruleset in the file system. I opened the ruleset in an Eclipse editor. I added a rule to the file and saved it. In the Package Explorer, I right-clicked on a Java file and in the menu clicked PMD > Check Code. The new rule was not used.

If I run PMD on the command line using the ruleset, PMD flags the problems from the new rule. This suggests to me that the PMD Eclipse plugin is not picking up the latest version of the ruleset.

In the menu bar, I clicked on Project > Clean (which rebuilds the project). The PMD Eclipse plugin did not pick up the latest version of the ruleset.

In the menu bar, I clicked File > Restart. The PMD Eclipse plugin did pick up the latest version of the ruleset. This is very slow and seems to be overkill.

In the project properties > PMD, I changed the properties, clicked Apply & Close, and rebuilt the project. The PMD Eclipse plugin did not pick up the latest version of the ruleset.

Note: PMD rulesets can be a hierarchy of files. If any one of the files changes, then the PMD Eclipse plugin should reload the ruleset.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Eclipse plugin's PMD project-properties configuration and the PMD > Check Code action described in the report. Reproduce the behavior with a local ruleset hierarchy, changing one file without restarting Eclipse. Done means the plugin reloads the ruleset when any file in the hierarchy changes, without requiring an Eclipse restart.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.