Skip to content

[java] Update rule PrematureDeclaration#3199

Merged
adangel merged 12 commits into
pmd:pmd/7.0.xfrom
oowekyala:update-PrematureDeclaration
Apr 16, 2021
Merged

[java] Update rule PrematureDeclaration#3199
adangel merged 12 commits into
pmd:pmd/7.0.xfrom
oowekyala:update-PrematureDeclaration

Conversation

@oowekyala

@oowekyala oowekyala commented Apr 5, 2021

Copy link
Copy Markdown
Member

Describe the PR

One huge difference, as seen in the diff report, is that we don't report variables that are not used at all. Those are left to UnusedVariable.

Related issues

The middle two means we now try to detect side-effects with some simple heuristics.

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 Apr 5, 2021
@ghost

ghost commented Apr 5, 2021

Copy link
Copy Markdown
2 Messages
📖 Compared to pmd/7.0.x:
This changeset changes 0 violations,
introduces 27 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 9217 violations,
introduces 8329 new violations, 1 new errors and 0 new configuration errors,
removes 15871 violations, 10 errors and 2 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 0 violations,
introduces 27 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 2941 violations,
introduces 8105 new violations, 1 new errors and 0 new configuration errors,
removes 15862 violations, 10 errors and 2 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 0 violations,
introduces 30 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 2947 violations,
introduces 8105 new violations, 1 new errors and 0 new configuration errors,
removes 15856 violations, 10 errors and 2 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 0 violations,
introduces 6 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 2925 violations,
introduces 8103 new violations, 1 new errors and 0 new configuration errors,
removes 15878 violations, 10 errors and 2 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 0 violations,
introduces 0 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 2919 violations,
introduces 8103 new violations, 1 new errors and 0 new configuration errors,
removes 15645 violations, 10 errors and 2 configuration errors.
Full report

Generated by 🚫 Danger

@adangel adangel linked an issue Apr 16, 2021 that may be closed by this pull request

@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.

Looks good, thanks!

One huge difference, as seen in the diff report, is that we don't report variables that are not used at all. Those are left to UnusedVariable.

This change makes total sense. I've created #3221 so that we can list this in the changelog.

Comment thread pmd-java/src/main/resources/category/java/codestyle.xml
@adangel adangel self-assigned this Apr 16, 2021
adangel added a commit that referenced this pull request Apr 16, 2021
@adangel adangel merged commit 6817b04 into pmd:pmd/7.0.x Apr 16, 2021
@oowekyala oowekyala deleted the update-PrematureDeclaration branch April 16, 2021 09:46
@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