Skip to content

Fix missing violations in diff report - #134

Merged
adangel merged 3 commits into
pmd:mainfrom
adangel:fix-missing-violations
Jul 24, 2025
Merged

adangel merged 3 commits into
pmd:mainfrom
adangel:fix-missing-violations

Conversation

@adangel

@adangel adangel commented Jul 24, 2025

Copy link
Copy Markdown
Member

When base or patch reports contain violations, that are duplicated in terms of eql? (same rule, same line, same message), then these were deduplicated when creating the union of all violations for a file. This resulted in odd numbers in the diff, e.g. less than all violations being removed when no violation were actually being left over.

This problem was found by @UncleOwen in pmd/pmd#5922 (comment)

When base or patch reports contain violations, that are duplicated in
terms of eql? (same rule, same line, same message), then these were
deduplicated when creating the union of all violations for a file.
This resulted in odd numbers in the diff, e.g. less than
all violations being removed when no violation were actually being
left over.
@adangel adangel added this to the next milestone Jul 24, 2025
@adangel adangel added the bug Something isn't working label Jul 24, 2025
@adangel adangel changed the title Fix missing violations Fix missing violations in diff report Jul 24, 2025
@adangel
adangel merged commit c97ab9f into pmd:main Jul 24, 2025
@adangel
adangel deleted the fix-missing-violations branch July 24, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant