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

Introduce IsRefasterAsVarargs matcher for use by Refaster templates #623

Merged
merged 4 commits into from
May 14, 2023

Conversation

mlrprananta
Copy link
Contributor

@mlrprananta mlrprananta commented May 10, 2023

A follow up for the XXX of StreamOfArray encountered in #619

Introduce `IsRefasterAsVarargs` matcher for use by Refaster templates (#623)

@github-actions
Copy link

Looks good. All 2 mutations in this change were killed.

class surviving killed
🎉tech.picnic.errorprone.refaster.matchers.IsRefasterAsVarargs 0 2

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@mlrprananta mlrprananta requested review from Stephan202 and rickie May 10, 2023 08:48
@Stephan202 Stephan202 added this to the 0.11.0 milestone May 11, 2023
Copy link
Member

@Stephan202 Stephan202 left a comment

Choose a reason for hiding this comment

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

Added a small commit and tweaked the suggested commit message. Thanks @mlrprananta!

@github-actions
Copy link

Looks good. All 2 mutations in this change were killed.

class surviving killed
🎉tech.picnic.errorprone.refaster.matchers.IsRefasterAsVarargs 0 2

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@rickie rickie force-pushed the mlrprananta/is-refaster-as-varargs-matcher branch from fdd8bb8 to d36b0af Compare May 14, 2023 09:24
@github-actions
Copy link

Looks good. All 2 mutations in this change were killed.

class surviving killed
🎉tech.picnic.errorprone.refaster.matchers.IsRefasterAsVarargs 0 2

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

Copy link
Member

@rickie rickie left a comment

Choose a reason for hiding this comment

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

Nice that you picked this up @mlrprananta 🚀 !

public final class IsRefasterAsVarargs implements Matcher<ExpressionTree> {
private static final long serialVersionUID = 1L;
private static final Matcher<ExpressionTree> DELEGATE =
staticMethod().onClass(Refaster.class.getName()).namedAnyOf("asVarargs");
Copy link
Member

Choose a reason for hiding this comment

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

When passing only one, we can use #named 😄.

Suggested change
staticMethod().onClass(Refaster.class.getName()).namedAnyOf("asVarargs");
staticMethod().onClass(Refaster.class.getName()).named("asVarargs");

" return Refaster.asVarargs(\"o\");",
" }",
"",
" private static String[] asVarArgs(String s) {",
Copy link
Member

Choose a reason for hiding this comment

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

Added one test case as we sometimes add this variant as well :).

@github-actions
Copy link

Looks good. All 2 mutations in this change were killed.

class surviving killed
🎉tech.picnic.errorprone.refaster.matchers.IsRefasterAsVarargs 0 2

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@Stephan202
Copy link
Member

Added a commit. @rickie feel free to merge once built.

@github-actions
Copy link

Looks good. All 2 mutations in this change were killed.

class surviving killed
🎉tech.picnic.errorprone.refaster.matchers.IsRefasterAsVarargs 0 2

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@Stephan202 Stephan202 merged commit 7cf569c into master May 14, 2023
@Stephan202 Stephan202 deleted the mlrprananta/is-refaster-as-varargs-matcher branch May 14, 2023 14:33
@Stephan202 Stephan202 changed the title Introduce IsRefasterAsVarargs matcher Introduce IsRefasterAsVarargs matcher for use by Refaster templates May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants