Skip to content

[java] Update MissingOverride to pmd 7 grammar#2800

Merged
adangel merged 12 commits into
pmd:pmd/7.0.xfrom
oowekyala:reimplement-missing-override
Oct 16, 2020
Merged

[java] Update MissingOverride to pmd 7 grammar#2800
adangel merged 12 commits into
pmd:pmd/7.0.xfrom
oowekyala:reimplement-missing-override

Conversation

@oowekyala

Copy link
Copy Markdown
Member

Describe the PR

  • title
  • this is a sort of PoC that the TypeOps API is usable in rules
  • there were two different implementations for override equivalence, areOverrideEquivalent and areOverrideEquivalentFast. This is confusing, so I just removed the "fast" one

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 Sep 24, 2020
@ghost

ghost commented Sep 24, 2020

Copy link
Copy Markdown
2 Messages
📖 Compared to pmd/7.0.x:
This changeset introduces 528 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 791 new violations, 6 new errors and 0 new configuration errors,
removes 11 violations, 16 errors and 2 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset introduces 528 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 791 new violations, 6 new errors and 0 new configuration errors,
removes 11 violations, 16 errors and 2 configuration errors.
Full report
No java rules are changed!

Generated by 🚫 Danger

@oowekyala oowekyala linked an issue Oct 3, 2020 that may be closed by this pull request
@adangel

adangel commented Oct 8, 2020

Copy link
Copy Markdown
Member

I think, we need to have a look at the regression tester again.
After we have now a baseline for pmd7 and you have activated this rule (ed01ddf), I expected to see a diff. But the regression tester still claimed "No java rules changed".... Maybe that's due to 5968877, where we changed from categories to individual rules...

That's one point I'd like to fix before merging.

But thinking further: The diff would then show, that we have possibly many new violations now, because we didn't have enabled the rule before. So we compare nothing again something....

I think, more interesting would be, if we compare the results against the latest pmd6 baseline. Then we would probably see more interesting results.... What do you think?

@adangel

adangel commented Oct 8, 2020

Copy link
Copy Markdown
Member

fixes #2797, so we should see more violations

I guess, that's worth listing in the release notes then.... 7_0_0_release_notes.md

pmdtester is used temporarily from branch "filter-ruleset-single-rules"
in order to test it.
Create a report against the PR's base branch
and create a second report against master.
@oowekyala

Copy link
Copy Markdown
Member Author

@adangel Thanks for fixing the regression tester, this works well!

I've not seen false positives in MissingOverride. I found one for UnusedAssignment though: https://chunk.io/pmd/a580110b509440c2b5501fd1616a79be/diff2/checkstyle/index.html#A212 This should be fixed somewhere else.

So when this is merged, the CI will push the new baseline for pmd/7.0.x correctly? Or does this need other changes?

@adangel

adangel commented Oct 16, 2020

Copy link
Copy Markdown
Member

I've not seen false positives in MissingOverride.

Yeah, I only had a quick glance. But compared to master, this rule finds now many more cases. Good work!

I found one for UnusedAssignment though: https://chunk.io/pmd/a580110b509440c2b5501fd1616a79be/diff2/checkstyle/index.html#A212 This should be fixed somewhere else.

So when this is merged, the CI will push the new baseline for pmd/7.0.x correctly? Or does this need other changes?

I plan to merge the PRs for the regression tester and then use the master branch of the tester (currently using the PR-branch). I think, I'll cherry pick the relevant changes from this PR to pmd/7.0.x directly, so that it's available for the other PRs.

I'll double check, that the baseline can be created with the new pmdtester on pmd/7.0.x (I focused till now on the online mode, comparison with a baseline).

After that, I'll merge this PR.

adangel added a commit that referenced this pull request Oct 16, 2020
[java] Update MissingOverride to pmd 7 grammar #2800
@adangel adangel merged commit c512e00 into pmd:pmd/7.0.x Oct 16, 2020
@oowekyala oowekyala deleted the reimplement-missing-override branch October 21, 2020 15:25
oowekyala added a commit to oowekyala/pmd that referenced this pull request Nov 5, 2020
Actually was fixed by pmd#2800
@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.

[java] MissingOverride long-standing issues

2 participants