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

[core] CPD: Added begin and end token to XML reports #4095

Merged
merged 1 commit into from Aug 30, 2022

Conversation

pacvz
Copy link

@pacvz pacvz commented Aug 17, 2022

Describe the PR

Extends the XML output of CPD by adding the indices of the starting and ending tokens in each code duplication entry, like this:

<file column="29" endcolumn="75" endline="64" line="32" begintoken="2356" endtoken="2594"
  path="/home/pmd/source/pmd-core/src/test/java/net/sourceforge/pmd/RuleReferenceTest.java"/>

This is to further help the use case as described in #4021 (comment)

Related issues

Continuation of the work done in #4021.

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)

@adangel adangel added in:cpd Affects the copy-paste detector an:enhancement An improvement on existing features / rules labels Aug 24, 2022
@adangel adangel self-requested a review August 24, 2022 16:02
@adangel adangel added this to the 6.49.0 milestone Aug 30, 2022
Copy link
Member

@adangel adangel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

adangel added a commit to adangel/pmd that referenced this pull request Aug 30, 2022
adangel added a commit to adangel/pmd that referenced this pull request Aug 30, 2022
[core] CPD: Added begin and end token to XML reports pmd#4095
@adangel adangel merged commit 91fbcc8 into pmd:master Aug 30, 2022
@pmd-test
Copy link

1 Message
📖 Compared to master:
This changeset changes 9 violations,
introduces 15 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
Full report

Generated by 🚫 Danger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
an:enhancement An improvement on existing features / rules in:cpd Affects the copy-paste detector
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants