Skip to content

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

Merged
adangel merged 1 commit into
pmd:masterfrom
pacvz:master
Aug 30, 2022
Merged

adangel merged 1 commit into
pmd:masterfrom
pacvz:master

Conversation

@pacvz

@pacvz pacvz commented Aug 17, 2022

Copy link
Copy Markdown

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

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

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

ghost commented Aug 30, 2022

Copy link
Copy Markdown
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.

2 participants