Skip to content

Commit

Permalink
Remove use of about-to-be-deprecated @BugPattern.providesFix.
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=305297113
  • Loading branch information
graememorgan authored and nick-someone committed Apr 9, 2020
1 parent 970ba1d commit b3fb67f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import static com.google.common.truth.refactorings.CorrespondenceSubclassToFactoryCall.MemberType.COMPARE_METHOD;
import static com.google.common.truth.refactorings.CorrespondenceSubclassToFactoryCall.MemberType.CONSTRUCTOR;
import static com.google.common.truth.refactorings.CorrespondenceSubclassToFactoryCall.MemberType.TO_STRING_METHOD;
import static com.google.errorprone.BugPattern.ProvidesFix.REQUIRES_HUMAN_ATTENTION;
import static com.google.errorprone.BugPattern.SeverityLevel.SUGGESTION;
import static com.google.errorprone.fixes.SuggestedFixes.compilesWithFix;
import static com.google.errorprone.matchers.Description.NO_MATCH;
Expand Down Expand Up @@ -92,8 +91,7 @@
@BugPattern(
name = "CorrespondenceSubclassToFactoryCall",
summary = "Use the factory methods on Correspondence instead of defining a subclass.",
severity = SUGGESTION,
providesFix = REQUIRES_HUMAN_ATTENTION)
severity = SUGGESTION)
public final class CorrespondenceSubclassToFactoryCall extends BugChecker
implements ClassTreeMatcher {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import static com.google.common.base.CharMatcher.inRange;
import static com.google.common.base.CharMatcher.whitespace;
import static com.google.errorprone.BugPattern.ProvidesFix.REQUIRES_HUMAN_ATTENTION;
import static com.google.errorprone.BugPattern.SeverityLevel.SUGGESTION;
import static com.google.errorprone.matchers.Description.NO_MATCH;
import static com.google.errorprone.matchers.Matchers.instanceMethod;
Expand Down Expand Up @@ -57,8 +56,7 @@
@BugPattern(
name = "FailWithFacts",
summary = "Use the new key-value-style failure API instead of the deprecated one.",
severity = SUGGESTION,
providesFix = REQUIRES_HUMAN_ATTENTION)
severity = SUGGESTION)
public final class FailWithFacts extends BugChecker implements MethodInvocationTreeMatcher {
@Override
public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState state) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import static com.google.common.collect.ImmutableSet.toImmutableSet;
import static com.google.common.collect.Iterables.getOnlyElement;
import static com.google.errorprone.BugPattern.ProvidesFix.REQUIRES_HUMAN_ATTENTION;
import static com.google.errorprone.BugPattern.SeverityLevel.SUGGESTION;
import static com.google.errorprone.matchers.Description.NO_MATCH;
import static com.google.errorprone.matchers.Matchers.anyOf;
Expand Down Expand Up @@ -62,8 +61,7 @@
@BugPattern(
name = "NamedToWithMessage",
summary = "Use assertWithMessage(...)/withMessage(...) instead of the deprecated named(...).",
severity = SUGGESTION,
providesFix = REQUIRES_HUMAN_ATTENTION)
severity = SUGGESTION)
public final class NamedToWithMessage extends BugChecker implements MethodInvocationTreeMatcher {
@Override
public Description matchMethodInvocation(MethodInvocationTree namedCall, VisitorState state) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import static com.google.common.collect.ImmutableSet.toImmutableSet;
import static com.google.common.collect.Iterables.getOnlyElement;
import static com.google.errorprone.BugPattern.ProvidesFix.REQUIRES_HUMAN_ATTENTION;
import static com.google.errorprone.BugPattern.SeverityLevel.SUGGESTION;
import static com.google.errorprone.fixes.SuggestedFix.replace;
import static com.google.errorprone.matchers.Description.NO_MATCH;
Expand Down Expand Up @@ -73,8 +72,7 @@
name = "StoreActualValueInField",
summary =
"Store the actual value locally instead of using the deprecated actual() and getSubject().",
severity = SUGGESTION,
providesFix = REQUIRES_HUMAN_ATTENTION)
severity = SUGGESTION)
public final class StoreActualValueInField extends BugChecker
implements MethodInvocationTreeMatcher {
@Override
Expand Down

0 comments on commit b3fb67f

Please sign in to comment.