Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Rules with the same regex properties should be equal #4466

Merged
merged 3 commits into from
May 26, 2023

Conversation

adangel
Copy link
Member

@adangel adangel commented Apr 11, 2023

Describe the PR

Found this while upgrading PMD Eclipse Plugin to 7.0.0. In the plugin, we often verify that we have the same ruleset active by executing RuleSet#equals(). This doesn't work as soon as a rule uses java.util.regex.Pattern based properties. The reason is, that Pattern doesn't override equals - see also https://stackoverflow.com/questions/52103427/why-these-two-java-util-pattern-are-not-equal

Ready?

  • 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)

@adangel adangel added this to the 7.0.0 milestone Apr 11, 2023
@pmd-test
Copy link

pmd-test commented Apr 11, 2023

1 Message
📖 Compared to master:
This changeset changes 5 violations,
introduces 1 new violations, 0 new errors and 0 new configuration errors,
removes 1 violations, 0 errors and 0 configuration errors.
Full report
Compared to master:
This changeset changes 6 violations,
introduces 1 new violations, 0 new errors and 0 new configuration errors,
removes 1 violations, 0 errors and 0 configuration errors.
Full report

Generated by 🚫 Danger

@adangel adangel self-assigned this Apr 25, 2023
@oowekyala oowekyala merged commit 3c01697 into pmd:master May 26, 2023
@adangel adangel deleted the rule-equals branch May 26, 2023 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants