Skip to content

[java] Update UselessParentheses#2900

Merged
adangel merged 4 commits into
pmd:pmd/7.0.xfrom
oowekyala:reimplement-unnecessary-useless-parentheses
Nov 6, 2020
Merged

[java] Update UselessParentheses#2900
adangel merged 4 commits into
pmd:pmd/7.0.xfrom
oowekyala:reimplement-unnecessary-useless-parentheses

Conversation

@oowekyala

@oowekyala oowekyala commented Nov 5, 2020

Copy link
Copy Markdown
Member

Describe the PR

Update UselessParentheses to pmd 7 grammar. I converted the rule to a java rule. The rule is more than 10 times faster than on master (from a quick & dirty run on checkstyle sources). I also included a property to ignore unnecessary parentheses that separate operators of different precedences, which gives a solution to #1918 and #1673 (this is the reason for the removed violations, they're actually fine).

Related issues

Ready?

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

@oowekyala oowekyala added this to the 7.0.0 milestone Nov 5, 2020
@ghost

ghost commented Nov 5, 2020

Copy link
Copy Markdown
2 Messages
📖 Compared to pmd/7.0.x:
This changeset introduces 2919 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 introduces 998 new violations, 11 new errors and 0 new configuration errors,
removes 996 violations, 16 errors and 2 configuration errors.
Full report

Generated by 🚫 Danger

@adangel adangel 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'll update the 7_0_0_release notes and merge....

adangel added a commit that referenced this pull request Nov 6, 2020
[java] Update UselessParentheses #2900
@adangel adangel merged commit f5690e1 into pmd:pmd/7.0.x Nov 6, 2020
@oowekyala oowekyala deleted the reimplement-unnecessary-useless-parentheses branch February 14, 2021 15:06
@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

2 participants