Skip to content

[cpp] Ignore literals and ignore identifiers capability to C++ CPD#5040

Merged
adangel merged 2 commits intopmd:mainfrom
jdupak:master
Oct 24, 2024
Merged

[cpp] Ignore literals and ignore identifiers capability to C++ CPD#5040
adangel merged 2 commits intopmd:mainfrom
jdupak:master

Conversation

@jdupak
Copy link
Copy Markdown
Contributor

@jdupak jdupak commented May 24, 2024

Describe the PR

Adds ignore literals and ignore identifiers capability to c++ cpd.

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)

@oowekyala oowekyala added an:enhancement An improvement on existing features / rules in:cpd Affects the copy-paste detector labels May 24, 2024
@ghost
Copy link
Copy Markdown

ghost commented May 24, 2024

1 Message
📖 No regression tested rules have been changed.

Generated by 🚫 Danger

@jsotuyod
Copy link
Copy Markdown
Member

@jdupak thanks! Happy to see you were able to manage this!

Overall this looks very neat! This covers all pointers I gave you.

The one thing missing for sure are tests. You can once again get inspiration from how Java test these.

https://github.com/pmd/pmd/blob/master/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/cpd/JavaCpdLexerTest.java#L85-L103

@adangel adangel added this to the 7.3.0 milestone May 31, 2024
@oowekyala oowekyala changed the title Ignore literals and ignore identifiers capability to c++ cpd. [c++] Ignore literals and ignore identifiers capability to c++ cpd. Jun 5, 2024
@oowekyala oowekyala marked this pull request as draft June 5, 2024 09:10
@adangel adangel modified the milestones: 7.3.0, 7.4.0 Jun 27, 2024
@adangel adangel modified the milestones: 7.4.0, 7.5.0 Jul 18, 2024
@adangel adangel modified the milestones: 7.5.0, 7.6.0 Aug 29, 2024
@adangel adangel modified the milestones: 7.6.0, 7.7.0 Sep 26, 2024
@adangel adangel changed the base branch from master to main September 26, 2024 14:32
@adangel
Copy link
Copy Markdown
Member

adangel commented Oct 13, 2024

Hi @jdupak , thanks for the PR! Is there a chance you can look into creating a unit test for this new feature?

@jdupak
Copy link
Copy Markdown
Contributor Author

jdupak commented Oct 17, 2024 via email

@jdupak jdupak marked this pull request as ready for review October 20, 2024 20:03
@adangel adangel changed the title [c++] Ignore literals and ignore identifiers capability to c++ cpd. [c++] Ignore literals and ignore identifiers capability to C++ CPD Oct 24, 2024
Copy link
Copy Markdown
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.

Awesome, thanks!

@adangel adangel changed the title [c++] Ignore literals and ignore identifiers capability to C++ CPD [cpp] Ignore literals and ignore identifiers capability to C++ CPD Oct 24, 2024
adangel added a commit that referenced this pull request Oct 24, 2024
adangel added a commit that referenced this pull request Oct 24, 2024
@adangel adangel merged commit 7ad4e0f into pmd:main Oct 24, 2024
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.

4 participants