Repository navigation
[core] Fix #6865: Improve missing rule reference error - #6870
Merged
Merged
Conversation
Contributor
|
Compared to main: (comment created at 2026-07-17 09:58:47+00:00 for d3f43a5) |
DragonFSKY
marked this pull request as ready for review
July 14, 2026 14:13
Signed-off-by: DragonFSKY <[email protected]>
DragonFSKY
force-pushed
the
fix-6865-ruleset-error-version
branch
from
July 17, 2026 09:41
0c37d22 to
d3f43a5
Compare
UncleOwen
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the PR
When a ruleset references a rule that is not available in the running PMD version, the current error only suggests that the rule name may be misspelled. This makes version mismatches difficult to identify, especially when PMD is bundled by another tool.
This change improves the diagnostic by:
RuleSetFactoryMessagesTest;For example, the error now provides enough context to distinguish a typo from a version mismatch:
This does not change ruleset loading behavior. An unresolved rule reference remains a fatal validation error.
Validation
git diff --checkpasses../mvnw -pl pmd-core -Dtest=RuleSetFactoryMessagesTest,RuleSetFactoryTest testpasses (67 tests, 0 failures, 0 errors, 0 skipped)../mvnw clean verifypasses (44 modules, including 31 distribution integration tests;BUILD SUCCESS).Related issues
Ready?
./mvnw clean verifypasses (checked automatically by github actions)