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

[java] Update rule AvoidDuplicateLiterals #3663

Merged
merged 3 commits into from
Jan 26, 2022

Conversation

adangel
Copy link
Member

@adangel adangel commented Nov 30, 2021

Part of #2701

@adangel adangel added this to the 7.0.0 milestone Nov 30, 2021
@pmd-test
Copy link

pmd-test commented Nov 30, 2021

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

@adangel
Copy link
Member Author

adangel commented Jan 14, 2022

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.

Copy link
Member

@oowekyala oowekyala left a comment

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.

3 participants