Skip to content

[java] Update rule AvoidDuplicateLiterals#3663

Merged
oowekyala merged 3 commits into
pmd:pmd/7.0.xfrom
adangel:pmd7-update-AvoidDuplicateLiterals
Jan 26, 2022
Merged

[java] Update rule AvoidDuplicateLiterals#3663
oowekyala merged 3 commits into
pmd:pmd/7.0.xfrom
adangel:pmd7-update-AvoidDuplicateLiterals

Conversation

@adangel

@adangel adangel commented Nov 30, 2021

Copy link
Copy Markdown
Member

Part of #2701

@adangel adangel added this to the 7.0.0 milestone Nov 30, 2021
@ghost

ghost commented Nov 30, 2021

Copy link
Copy Markdown
2 Messages
📖 Compared to pmd/7.0.x:
This changeset changes 0 violations,
introduces 6751 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
Full report
📖 Compared to master:
This changeset changes 48816 violations,
introduces 26229 new violations, 5 new errors and 0 new configuration errors,
removes 147786 violations, 27 errors and 3 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 81 violations,
introduces 6753 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
Full report
Compared to master:
This changeset changes 45977 violations,
introduces 25675 new violations, 38 new errors and 0 new configuration errors,
removes 175335 violations, 28 errors and 3 configuration errors.
Full report

Generated by 🚫 Danger

@oowekyala

Copy link
Copy Markdown
Member

@adangel

adangel commented Jan 14, 2022

Copy link
Copy Markdown
Member Author

Maybe we should allow dups in annotations?

It turns out, we have already a property to do this: "skipAnnotations". It is by default off, so by default the rule will report duplicated string literals in annotations.
These new violations appeared, because PMD7 can now parse the whole file (PMD6 just failed parsing the file InputSuppressWarningsHolder5.java).

The question remains however: Would it make sense to switch the default of this property?

I don't see any report for this case, so I would argue, we just keep it as-is.
I'll add it for now to https://github.com/pmd/pmd/wiki/PMD-7.0.0-Java#other-quirks-about-current-rules that we can consider this again later.

@oowekyala oowekyala left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm fine wth that solution

@oowekyala oowekyala merged commit 124bf95 into pmd:pmd/7.0.x Jan 26, 2022
@adangel adangel deleted the pmd7-update-AvoidDuplicateLiterals branch January 27, 2022 13:27
@adangel adangel mentioned this pull request Jan 23, 2023
55 tasks
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.

2 participants