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] Add option to ignore sequences of literals #2963

Merged
merged 5 commits into from Jan 21, 2021

Conversation

maikelsteneker
Copy link
Contributor

Describe the PR

See PR #2945. This pull request implements the same functionality for C++ (in addition to the previously implemented C#).

When implementing this for C#, I could use the getKind() method on the AntlrToken class. However, JavaCC-based languages like C++ did not have such a method available on the GenericToken interface. Since this functionality is common for all languages that are based on Antlr and JavaCC (so everything except for Scala), I think it makes sense to add this to the interface.

Related issues

Ready?

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

@pmd-test
Copy link

pmd-test commented Dec 10, 2020

1 Message
📖 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.
Full report
This changeset changes violations,
introduces new violations, new errors and new configuration errors,
removes violations, errors and configuration errors.
Full report

Generated by 🚫 Danger

@oowekyala oowekyala added this to the 6.31.0 milestone Dec 11, 2020
@adangel adangel added the an:enhancement An improvement on existing features / rules label Dec 11, 2020
@adangel adangel self-assigned this Jan 19, 2021
@adangel adangel added the in:cpd Affects the copy-paste detector label Jan 21, 2021
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, I'll merge this soon.

@maikelsteneker
Copy link
Contributor Author

Good suggestions, thank you!

adangel added a commit that referenced this pull request Jan 21, 2021
- Add documentation for CPD cli
- Add javadoc for the tokenizer options
- GenericToken::getKind is @experimental
adangel added a commit that referenced this pull request Jan 21, 2021
adangel added a commit that referenced this pull request Jan 21, 2021
[cpp] Add option to ignore sequences of literals #2963#
@adangel adangel merged commit 76566b7 into pmd:master Jan 21, 2021
@wener-tiobe wener-tiobe deleted the cpp_ignore_literal_lists branch September 12, 2023 10:38
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

4 participants