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

[cpp] CPD: Added strings as literal and ignore identifiers in sequences #4470

Merged
merged 1 commit into from
May 19, 2023

Conversation

wener-tiobe
Copy link
Contributor

@wener-tiobe wener-tiobe commented Apr 13, 2023

Describe the PR

For C++, when using array initializers, often macros or constants are used. These represent literals or constants.
Therefore it is valid to ignore identifiers like is done for literals.

In addition, STRING was missing from the allowed tokens and was therefore added among the allowed literals.

Related issues

  • Fixes #

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)

@ghost
Copy link

ghost commented Apr 18, 2023

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

Generated by 🚫 Danger

@adangel adangel changed the title Added strings as literal and ignore identifiers in sequences [cpp] CPD: Added strings as literal and ignore identifiers in sequences Apr 28, 2023
@adangel adangel added in:cpd Affects the copy-paste detector in:cli Affects the PMD Command Line Interface labels Apr 28, 2023
@adangel adangel self-assigned this May 19, 2023
@adangel adangel added this to the 7.0.0 milestone May 19, 2023
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.

adangel added a commit to adangel/pmd that referenced this pull request May 19, 2023
adangel added a commit that referenced this pull request May 19, 2023
[cpp] CPD: Added strings as literal and ignore identifiers in sequences #4470
@adangel adangel merged commit 6b4c6b2 into pmd:master May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in:cli Affects the PMD Command Line Interface in:cpd Affects the copy-paste detector
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants