Skip to content

[test] Split up AbstractRuleSetFactoryTest.testAllPMDBuiltInRulesMeetConventions()#6646

Merged
adangel merged 8 commits into
pmd:mainfrom
UncleOwen:split-up-testAllPMDBuiltInRulesMeetConventions
May 8, 2026
Merged

[test] Split up AbstractRuleSetFactoryTest.testAllPMDBuiltInRulesMeetConventions()#6646
adangel merged 8 commits into
pmd:mainfrom
UncleOwen:split-up-testAllPMDBuiltInRulesMeetConventions

Conversation

@UncleOwen
Copy link
Copy Markdown
Member

Describe the PR

Recently I got the following test failure:

org.opentest4j.AssertionFailedError: All built-in PMD rules need 'since' attribute (0 are missing), a proper ExternalURLInfo (0 are invalid), a class name meeting conventions (0 are invalid), no 'violationSuppressRegex' property (0 are invalid), and no 'violationSuppressXPath' property (0 are invalid) and be alphabetically sorted (1 misplaced)

... and because I didn't scroll right (nor down), I was like "err... what do you want to tell me?"

This PR breaks up the test into six separate tests. This way, you only get the message about what is actually wrong.

testAllPMDBuiltInRuleSetsAreSorted now checks RuleRefs, too.

Ready?

  • [n/a] Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

@pmd-actions-helper
Copy link
Copy Markdown
Contributor

pmd-actions-helper Bot commented May 6, 2026

Documentation Preview

No relevant source code has been changed, pmdtester skipped.

(comment created at 2026-05-08 13:29:03+00:00 for 27bcf21)

@adangel adangel added this to the 7.25.0 milestone May 8, 2026
@adangel adangel added the in:pmd-internals Affects PMD's internals label May 8, 2026
Copy link
Copy Markdown
Member

@adangel adangel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Comment thread pom.xml
@adangel adangel force-pushed the split-up-testAllPMDBuiltInRulesMeetConventions branch from fd3a44b to 27bcf21 Compare May 8, 2026 13:14
@adangel adangel merged commit f0c72a8 into pmd:main May 8, 2026
2 checks passed
@UncleOwen UncleOwen deleted the split-up-testAllPMDBuiltInRulesMeetConventions branch May 8, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in:pmd-internals Affects PMD's internals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants