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] Fix #2996 - CommentSize suppression #4939

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

oowekyala
Copy link
Member

@oowekyala oowekyala commented Apr 6, 2024

Describe the PR

Suppressing violations of comment related rules doesn't work well right now, because they are reported against the compilation unit node. This adds some utilities to be able to report violations on a specific token. The RuleContext finds the closest node to the token and uses that to look for suppression annotations.

See also #2996 (comment)

Draft because probably other comment rules have the same problem.

Related issues

Ready?

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

@pmd-test
Copy link

pmd-test commented Apr 9, 2024

1 Message
📖 Compared to master:
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.
Download full report as build artifact

Generated by 🚫 Danger

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] CommentSize rule violation is not suppressed at method level
4 participants