Skip to content

Commit

Permalink
Make IgnoredPureGetter a warning in OSS
Browse files Browse the repository at this point in the history
bazelbuild/bazel#16996

PiperOrigin-RevId: 494747567
  • Loading branch information
cushon authored and Error Prone Team committed Dec 12, 2022
1 parent df033f0 commit b839df7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.google.errorprone.bugpatterns;

import static com.google.errorprone.BugPattern.SeverityLevel.ERROR;
import static com.google.errorprone.BugPattern.SeverityLevel.WARNING;
import static com.google.errorprone.util.ASTHelpers.getReceiver;
import static com.google.errorprone.util.ASTHelpers.getSymbol;
import static com.google.errorprone.util.ASTHelpers.hasAnnotation;
Expand All @@ -43,7 +43,7 @@

/** Flags ignored return values from pure getters. */
@BugPattern(
severity = ERROR,
severity = WARNING,
summary =
"Getters on AutoValues, AutoBuilders, and Protobuf Messages are side-effect free, so there"
+ " is no point in calling them if the return value is ignored. While there are no"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,6 @@ public static ScannerSupplier errorChecks() {
HashtableContains.class,
IdentityBinaryExpression.class,
IdentityHashMapBoxing.class,
IgnoredPureGetter.class,
ImmutableChecker.class,
ImpossibleNullComparison.class,
Incomparable.class,
Expand Down Expand Up @@ -862,6 +861,7 @@ public static ScannerSupplier errorChecks() {
GetClassOnEnum.class,
HidingField.class,
IdentityHashMapUsage.class,
IgnoredPureGetter.class,
ImmutableAnnotationChecker.class,
ImmutableEnumChecker.class,
InconsistentCapitalization.class,
Expand Down

0 comments on commit b839df7

Please sign in to comment.