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 NameContentEquals Refaster rule #1379

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

Stephan202
Copy link
Member

@Stephan202 Stephan202 commented Oct 27, 2024

As also flagged here and here.

Suggested commit message:

Introduce `NameContentEquals` Refaster rule (#1379)

@@ -67,4 +68,22 @@ String after(String value) {
return Constants.format(value);
}
}

/** Prefer {@link Name#contentEquals(CharSequence)} over more verbose alternatives. */
static final class NameContentEquals {
Copy link
Member Author

Choose a reason for hiding this comment

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

We can debate whether BugCheckerRules is the best place for this rule, but it's in line with other rule definitions in this class.

Copy link

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

class surviving killed
🎉tech.picnic.errorprone.bugpatterns.ConstantNaming$1 0 2

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

Copy link
Contributor

@mohamedsamehsalah mohamedsamehsalah left a comment

Choose a reason for hiding this comment

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

🚀 🚀

@rickie rickie force-pushed the sschroevers/name-contentequals-rule branch from 524ad00 to ff999de Compare October 29, 2024 09:35
Copy link

Copy link

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

class surviving killed
🎉tech.picnic.errorprone.bugpatterns.ConstantNaming$1 0 2

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

@Stephan202 Stephan202 merged commit 9940576 into master Oct 29, 2024
16 checks passed
@Stephan202 Stephan202 deleted the sschroevers/name-contentequals-rule branch October 29, 2024 09:55
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