Skip to content

[java] Update rule OneDeclarationPerLine#3178

Merged
adangel merged 3 commits into
pmd:pmd/7.0.xfrom
oowekyala:update-OneDeclarationPerLine
Apr 6, 2021
Merged

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

Conversation

@oowekyala

Copy link
Copy Markdown
Member

Describe the PR

This is just to check the diff report.

I do think the "strict" mode is not strict enough though. It would be nice to be able to enforce "one variable declaration per statement", even if they're split across lines. One of the arguments against declaring several variables in the same statement is that the declarations are harder to refactor, because they have to be extracted and their type copied before you can move them around. Even if you declare them one per line, that problem is still here (and it's also ugly).

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 Mar 28, 2021
@ghost

ghost commented Mar 28, 2021

Copy link
Copy Markdown
2 Messages
📖 Compared to pmd/7.0.x:
This changeset changes 0 violations,
introduces 7622 new violations, 605 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
Full report
📖 Compared to master:
This changeset changes 1129 violations,
introduces 10517 new violations, 601 new errors and 0 new configuration errors,
removes 239482 violations, 5 errors and 2 configuration errors.
Full report
No java rules are changed!

Generated by 🚫 Danger

adangel added 2 commits April 1, 2021 11:38
This is necessary so that the regression tester picks up
a change and creates a new diff report.
@adangel adangel self-assigned this Apr 6, 2021
@adangel adangel merged commit ea43f41 into pmd:pmd/7.0.x Apr 6, 2021
@oowekyala oowekyala deleted the update-OneDeclarationPerLine branch April 6, 2021 10:44
@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