Skip to content

Commit

Permalink
Remove uses of @BugPattern.category
Browse files Browse the repository at this point in the history
(String reflowing courtesy of google-java-format!)

RELNOTES: N/A

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=234701484
  • Loading branch information
cushon committed Feb 22, 2019
1 parent 5b5684f commit 42911a2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import static com.google.common.base.MoreObjects.firstNonNull;
import static com.google.common.collect.Iterables.getLast;
import static com.google.errorprone.BugPattern.Category.JDK;
import static com.google.errorprone.BugPattern.SeverityLevel.WARNING;
import static com.google.errorprone.BugPattern.StandardTags.LIKELY_ERROR;
import static com.google.errorprone.matchers.Description.NO_MATCH;
Expand Down Expand Up @@ -65,8 +64,7 @@
+ " try block.",
// TODO(cushon): promote this to an error and turn down TryFailThrowable
severity = WARNING,
tags = LIKELY_ERROR,
category = JDK)
tags = LIKELY_ERROR)
public class AssertionFailureIgnored extends BugChecker implements MethodInvocationTreeMatcher {

private static final Matcher<ExpressionTree> ASSERTION =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.errorprone.bugpatterns;

import static com.google.errorprone.BugPattern.Category.JDK;
import static com.google.errorprone.BugPattern.SeverityLevel.ERROR;
import static com.google.errorprone.matchers.Description.NO_MATCH;

Expand All @@ -34,8 +33,7 @@
summary =
"This conditional expression may evaluate to null, which will result in an NPE when the"
+ " result is unboxed.",
severity = ERROR,
category = JDK)
severity = ERROR)
public class NullTernary extends BugChecker implements ConditionalExpressionTreeMatcher {

@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.Strings.isNullOrEmpty;
import static com.google.common.collect.ImmutableSet.toImmutableSet;
import static com.google.errorprone.BugPattern.Category.JDK;
import static com.google.errorprone.BugPattern.SeverityLevel.ERROR;

import com.google.common.base.Joiner;
Expand Down Expand Up @@ -49,8 +48,7 @@
@BugPattern(
name = "CompatibleWithAnnotationMisuse",
summary = "@CompatibleWith's value is not a type argument.",
severity = ERROR,
category = JDK)
severity = ERROR)
public class CompatibleWithMisuse extends BugChecker implements AnnotationTreeMatcher {

private static final Matcher<AnnotationTree> IS_COMPATIBLE_WITH_ANNOTATION =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth.assertWithMessage;
import static com.google.errorprone.BugPattern.Category.ONE_OFF;
import static com.google.errorprone.BugPattern.SeverityLevel.ERROR;
import static com.google.errorprone.DiagnosticTestHelper.diagnosticMessage;
import static com.google.errorprone.matchers.Description.NO_MATCH;
Expand Down Expand Up @@ -179,7 +178,7 @@ public void fileWithMultipleTopLevelClassesExtendsWithError() {
assertThat(diagnosticHelper.getDiagnostics()).hasSize(4);
}

@BugPattern(name = "", explanation = "", summary = "", severity = ERROR, category = ONE_OFF)
@BugPattern(name = "", explanation = "", summary = "", severity = ERROR)
public static class Throwing extends BugChecker implements ExpressionStatementTreeMatcher {
@Override
public Description matchExpressionStatement(ExpressionStatementTree tree, VisitorState state) {
Expand Down Expand Up @@ -502,12 +501,7 @@ public void cannotSuppressGeneratedError() {
assertThat(outputStream.toString(), exitCode, is(Result.ERROR));
}

@BugPattern(
name = "CrashOnReturn",
explanation = "",
summary = "",
severity = ERROR,
category = ONE_OFF)
@BugPattern(name = "CrashOnReturn", explanation = "", summary = "", severity = ERROR)
public static class CrashOnReturn extends BugChecker implements ReturnTreeMatcher {
@Override
public Description matchReturn(ReturnTree tree, VisitorState state) {
Expand Down

0 comments on commit 42911a2

Please sign in to comment.