All Classes and Interfaces

Class
Description
Check for usage of Set<T> or Map<T, E>.
An abstract class that detects use of the unsafe APIs.
Extracts the necessary information from a MethodInvocationTree to check whether calls to a method are using incompatible types and to emit a helpful error message.
Encapsulates the result of matching a Collection.contains(java.lang.Object)-like call, including the source and target types.
Helper for enforcing Annotations that disallow mocking.
A policy for determining what classes should not be mocked.
An explanation of what type should not be mocked, and the reason why.
AbstractMockChecker.TypeExtractor<T extends com.sun.source.tree.Tree>
An extension of Matcher to return, not just a boolean `matches`, but also extract some type information about the Tree of interest.
An abstract check for resources that must be closed; used by StreamResourceLeak and MustBeClosedChecker.
Error Prone's fix application logic doesn't like it when a fix suggests multiple identical insertions at the same position.
Finds calls to regex-accepting methods with literal strings.
Abstract implementation of a BugPattern that detects the use of reference equality to compare classes with value semantics.
An abstract base class to match API usages in which the return value is not used.
An abstract matcher for implicit and explicit calls to Object.toString(), for use on types that do not have a human-readable toString() implementation.
Helper for refactoring from if-else chains to switches.
A BugChecker; see the associated BugPattern annotation for details.
Desired "after" version of a refactoring.
Annotation on a Refaster rule to allow code between every pair of consecutive top-level statements in @BeforeTemplates that do not refer to variables Refaster knows about and do not break or return, and moves that code to the beginning of the @AfterTemplate.
Flags comments which appear to be intended to be Javadoc, but are not started with an extra *.
Bugpattern to find conditions which are checked more than once.
Indicates that Refaster should, additionally, refactor the negation of this rule and its corresponding before templates.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
 
Checks for uses of classes, fields, or methods that are not compatible with legacy Android devices.
Detects occurrences of pairs of parameters being passed straight through to String.format(java.lang.String, java.lang.Object...) from a method not annotated with FormatMethod.
Specifies information about a type which may be a container specified by generic type arguments, e.g.
A BugChecker; see the associated BugPattern annotation for details.
Checks annotation positioning, and orphaned Javadocs.
A BugChecker; see the associated BugPattern annotation for details.
Represents a Java method or constructor.
The difference between two APIs.
A per class unique identifier for a field or method.
A base Error Prone check implementation to enforce compliance with a given API diff.
 
Protobuf type devtools.staticanalysis.errorprone.apidiff.ClassDiff
Protobuf type devtools.staticanalysis.errorprone.apidiff.ClassDiff
 
 
Protobuf type devtools.staticanalysis.errorprone.apidiff.ClassMember
Protobuf type devtools.staticanalysis.errorprone.apidiff.ClassMember
 
Protobuf type devtools.staticanalysis.errorprone.apidiff.Diff
Protobuf type devtools.staticanalysis.errorprone.apidiff.Diff
 
Protobuf type devtools.staticanalysis.errorprone.apidiff.EverythingDiff
Protobuf type devtools.staticanalysis.errorprone.apidiff.EverythingDiff
 
Protobuf type devtools.staticanalysis.errorprone.apidiff.MemberDiff
Protobuf type devtools.staticanalysis.errorprone.apidiff.MemberDiff
 
Utility method to produce Api objects from javac Symbol.MethodSymbol.
Checks the lexical distance between method parameter names and the argument names at call sites.
Warns that users should not have an array as a key to a Set or Map
 
Checks when Arrays.fill(Object[], Object) is called with object types that are guaranteed to result in an ArrayStoreException.
 
 
 
Checker to make sure that assertEquals-like methods are called with the arguments expected and actual the right way round.
 
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Utility methods for refactoring try-fail pattern to assertThrows, which is preferred.
 
 
This checker matches iff *both* of the following conditions are true: 1) The class is assisted: a) If there is a constructor that is annotated with @Inject and that constructor has at least one parameter that is annotated with @Assisted.
 
A BugPattern; see the summary
Checks that AsyncCallable implementations do not directly return null.
Checks that AsyncFunction implementations do not directly return null.
A BugPattern; see the summary.
 
See summary for details.
Checker to make sure that constructors for AutoValue types are invoked with arguments in the correct order.
Checks the toString(), hashCode() and equals() methods are final in AutoValue classes.
Flags mutable collections in AutoValue.
Rules for @AutoValue, @AutoValue.Builder, and @AutoBuilder types.
Matches AutoValue_ uses outside the containing file.
A BugChecker; see the associated BugPattern annotation for details.
Checker that ensures implementations of Annotation override equals and hashCode.
 
 
Matches instanceof checks where the expression is a subtype of the checked type.
 
A BugChecker that detects use of the unsafe JNDI API system.
A BugChecker that detects use of the unsafe JNDI API system.
A BugChecker that detects use of the unsafe Serializable API.
A BugChecker; see the associated BugPattern for details.
Desired "before" version of a refactoring.
Matches use of BigDecimal#equals, which compares scale as well (which is not likely to be intended).
Matches usages of new BigDecimal(double) which lose precision.
 
A type-safe map from objects of type Bindings.Key<V>, which consist of a String key and a Bindings.Key subclass, to values of type V.
A key type for a Binding.
 
Template representing a sequence of consecutive statements.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
See the summary.
Discourages builder instance methods that do not return 'this'.
Static helper class that provides ScannerSuppliers and BugCheckers for the built-in Error Prone checks, as opposed to plugin checks or checks used in tests.
 
Checks when ByteBuffer.array() is used without calling .arrayOffset() to know the offset of the array, or when the buffer wasn't initialized using ByteBuffer.wrap() or ByteBuffer.allocate().
A BugChecker; see the associated BugPattern annotation for details.
Analyzes trees for references to their enclosing instance.
Stores the result of a can-be-static query.
Checker that recommends annotating a method with @CanIgnoreReturnValue if the method returns this, returns an effectively final input param, or if it looks like a builder method (that is likely to return this).
Bug pattern to recognize attempts to mock final types.
A BugPattern; see the summary
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Flags code which catches RuntimeExceptions under the guise of catching Exception.
Identifies calls to assertThat and similar methods inside the implementation of a Subject assertion method.
Checks, if two constructors in a class both accept Foo foo and one calls the other, that the caller passes foo as a parameter.
Checks for use of Character.getNumericValue and UCharacter.getNumericValue
Flags checked exceptions which are claimed to be thrown, but are not.
Checks for the same variable being checked against null twice in a method.
 
A representation of a choice with zero or more options, which may be evaluated lazily or strictly.
 
A BugChecker; see the associated BugPattern annotation for details.
 
A BugChecker; see the associated BugPattern annotation for details.
 
A BugChecker; see the associated BugPattern annotation for details.
Checker for calling Object-accepting methods with types that don't match the type arguments of their container types.
 
Highlights use of Collection#contains (and others) with types that do not have well-defined equals.
 
 
 
Suggests comparing the result of compareTo to only 0.
Check for expressions containing this != null or this == null
 
A BugChecker; see the associated BugPattern annotation for details.
 
A Bugpattern; see the accompanying Markdown documentation.
 
 
Helper for establishing whether expressions correspond to a constant expression.
Represents a binary equals call on two constant expressions.
Represents a constant expression.
The kind of a constant expression.
Visitor for scanning over the components of a constant expression.
Represents both a constant method call or a constant field/local access, depending on the actual type of symbol.
Represents sets of things known to be true and false if a boolean statement evaluated true.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Flags variables initialized with Pattern.compile(String) calls that could be constants.
Matchers for methods which express containment, like Collection.contains(java.lang.Object).
Analyzes a series of statements to determine whether they don't, sometimes, or never return.
The state of whether a sequence of statements may return, break out of the visited statements, or neither.
Exception thrown when a class symbol could not be resolved by the compiler.
A utility class for static analysis having to do with Dagger annotations.
Rules for methods on Dagger Component.Builder and Subcomponent.Builder types.
A BugChecker; see the associated BugPattern annotation for details.
Warns against suspect looking calls to Date APIs.
A BugChecker; see the associated BugPattern annotation for details.
 
A BugChecker; see the associated BugPattern annotation for details.
A checker that suggests deduplicating literals with existing constant variables.
A BugChecker; see the associated BugPattern annotation for details.
Java classes shouldn't use default package.
Matches the behaviour of the javac dep-ann Xlint warning.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Discourages using multiple names to refer to the same type within a file (e.g.
A bugpattern; see the description.
A BugChecker; see the associated BugPattern annotation for details.
ErrorProne checker to generate warning when method expecting distinct varargs is invoked with same variable argument.
A BugChecker; see the associated BugPattern annotation for details.
If a method always throws an exception, consider annotating it with @DoNotCall to prevent calls at compile-time instead failing at runtime.
A BugChecker; see the associated BugPattern annotation for details.
Suggests not mocking AutoValue classes.
Points out if a Mockito or EasyMock mock is mocking an object that would be better off being tested using an alternative instance.
Identifies RuleChain class fields and proposes refactoring to ordered @Rule(order = n).
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Flag DateFormats which use the same field more than once.
Flags duplicate keys used in ImmutableMap construction.
Bans calls to Duration.from(temporalAmount) where temporalAmount is a Period.
Bans calls to Duration.get(temporalUnit) where temporalUnit is not SECONDS or NANOS.
Bans calls to Duration APIs where the TemporalUnit is not ChronoUnit.DAYS or it has an estimated duration (which is guaranteed to throw an DateTimeException).
Reports an error when a Duration or Instant is incorrectly decomposed in order to call an API which accepts a <long, TimeUnit> pair.
Predicates for Element objects related to dependency injection.
Matches block tags (@param, @return, @throws, @deprecated) with an empty description.
A BugChecker; see the associated BugPattern annotation for details.
This checker finds and fixes empty statements after an if, with no else part.
 
A BugChecker; see the associated BugPattern annotation for details.
Discourages the use of Enum.ordinal() and other ways to access enum values by index.
BugChecker adds a null check to equals() method implementations which don't satisfy the null contract of Object.equals(java.lang.Object) i.e.
Discourages the use of Object.getClass() when implementing Object.equals(Object) for non-final classes.
Classes that override Object.equals(java.lang.Object) should also override Object.hashCode().
 
A BugChecker; see the associated BugPattern annotation for details.
 
A BugChecker; see the associated BugPattern annotation for details.
 
Checks for equals implementations making unsafe casts.
Discourages implementing equals using hashCode.
Checks for equals implementations comparing non-corresponding fields.
A BugPattern; see the summary.
ErrorProne checker to generate warning whenever ThreadPoolExecutor is constructed with different corePoolSize and maximumPoolSize using an unbounded workQueue
Error messages used by CheckReturnValue.
An Error Prone compiler that implements JavaCompiler.
A javac Plugin that runs Error Prone.
Finds unescaped entities in Javadocs.
A BugChecker; see the associated BugPattern annotation for details.
Implementation of a template to match and replace an expression anywhere in an AST.
 
Makes sure that you are not extending a class that has @AutoValue as an annotation.
A bugpattern: see the summary.
External source of information about @CanIgnoreReturnValue-equivalent API's.
A BugChecker; see the associated BugPattern annotation for details.
 
Flags fields which can be replaced with local variables.
Finds fields which can be safely made static.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Matches the behaviour of javac's finally Xlint warning.
A BugChecker; see the associated BugPattern annotation for details.
Detects usages of Float,DoubleSubject.isWithin(TOLERANCE).of(EXPECTED) where there are no other floating point values other than EXPECTED with satisfy the assertion, but TOLERANCE is not zero.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
 
Detects invocations of LoggingApi.log(String) for which the argument is not a compile-time constant and provides suggested alternatives.
 
Flags cases where there is an exception available that could be set as the cause in a log message.
 
 
Ensures that class-level FluentLogger objects are private static final.
Bugpattern to prevent splitting flogger log invocations into multiple statements.
A BugChecker; see the associated BugPattern annotation for details.
Flogger's withCause(Throwable) method checks
Detects Flogger log statements that pass Exceptions to the log method instead of using withCause.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
BugChecker to assert validity of methods calls with FormatString annotations.
Format string utilities.
Utilities for validating format strings.
Description of an incorrect format method call.
Verifies that methods marked ForOverride are only called from the defining class.
 
 
Bans calls to javaTimeType.from(temporalAmount) where the call is guaranteed to either: throw a DateTimeException at runtime (e.g., LocalDate.from(month)) return the same parameter (e.g., Instant.from(instant))
A BugChecker; see the associated BugPattern annotation for details.
 
See BugPattern annotation.
Checks for calls to Guava's Futures.getChecked method that will always fail because they pass an incompatible exception type.
 
A BugChecker; see the associated BugPattern annotation for details.
 
A BugChecker; see the associated BugPattern annotation for details.
A binder from @GuardedBy annotations to GuardedByExpressions.
A context containing the information necessary to resolve a Symbol from an AST node.
A BugChecker; see the associated BugPattern annotation for details.
The lock expression of an @GuardedBy annotation.
A 'class' literal: ClassName.class
A guarded by expression that could not be resolved.
A local variable (or parameter), resolved as part of a lock access expression.
The member access expression for a field or method.
A simple 'this literal.
The base expression for a static member select on a class literal (e.g.
Flags that control the behavior of threadsafety utils to facilitate rolling out new functionality.
A symbol resolver used while binding guardedby expressions from string literals.
 
 
A BugChecker; see the associated BugPattern annotation for details.
A method body analyzer.
Utility for discovering the lock expressions that needs to be held when accessing specific guarded members.
Listener interface for accesses to guarded members.
 
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Flags ignored return values from pure getters.
An error that occurred during the parsing or binding of a GuardedBy expression.
Analyzes types for deep immutability.
Accepts violations that are found during the analysis.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Common utility functions for immutable collections.
A BugChecker; see the associated BugPattern annotation for details.
Refactoring to suggest Immutable types for member collection that are not mutated.
A BugChecker; see the associated BugPattern annotation for details.
Refactoring to suggest using private static final ImmutableSet over ImmutableList when using only contains, containsAll and isEmpty.
Migrates Truth subjects from a manual "test and fail" approach to one using Subject.check(...).
Policy specifying when and how to import classes when inlining types.
Matches comparison of proto fields to null.
A BugChecker; see the associated BugPattern annotation for details.
 
 
Checker for variables under the same scope that only differ in capitalization.
Looks for hashCode implementations which are inconsistent with equals.
A BugChecker that detects inconsistently overloaded methods in Java classes.
Bugpattern for incorrect overloads of main.
 
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Matches invalid usage of @inheritDoc.
Bugpattern to encourage initializing effectively final variables inline with their declaration, if possible.
A checker for injected constructors with @Inject(optional=true) or binding annotations.
A BugPattern; see the summary.
 
 
Checks if class constructor and members are both annotated as @Inject.
A BugChecker; see the associated BugPattern annotation for details.
Checker that performs the inlining at call-sites (where the invoked APIs are annotated as @InlineMe).
A context representing all the dependencies necessary to reconstruct a pretty-printable source tree from a UTree based on a set of substitutions.
A BugChecker; see the associated BugPattern annotation for details.
Checks that InputStreams should override int read(byte[], int, int);
 
 
Bans calls to Instant APIs where the TemporalUnit is not one of: NANOS, MICROS, MILLIS, SECONDS, MINUTES, HOURS, HALF_DAYS, or DAYS.
Bugpattern to detect interfaces used only to store static fields/methods.
Checks for cases where an InterruptedException is caught as part of a catch block catching a supertype, and not specially handled.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Matches invalid Javadoc tags, and tries to suggest fixes.
Matches invalid Javadoc tags, and tries to suggest fixes.
This checker errors on calls to java.time methods using values that are guaranteed to throw a DateTimeException.
Finds some common errors in @link tags.
Matches incorrect Javadoc @param tags.
 
 
Matches errors in Javadoc @throws tags.
Matches misuse of link tags within throws tags.
 
Validates ZoneId.
 
A BugChecker; see the associated BugPattern annotation for details.
 
 
A BugChecker; see the associated BugPattern annotation for details.
Checks for uses of classes, fields, or methods that are not compatible with JDK 7
Checks for uses of classes, fields, or methods that are not compatible with JDK 8
This checker warns about calls to duration.getNano() without a corresponding "nearby" call to duration.getSeconds().
Check for calls to duration.withNanos(int).
Check for calls to duration.withSeconds(long).
This checker warns about calls to instant.getNano() without a corresponding "nearby" call to instant.getEpochSecond().
A BugChecker; see the associated BugPattern annotation for details.
This checker warns about calls to LocalDateTime.getNano() without a corresponding "nearby" call to LocalDateTime.getSecond().
This checker warns about calls to LocalTime.getNano() without a corresponding "nearby" call to LocalTime.getSecond().
This checker warns about calls to period.getDays() without a corresponding "nearby" call to period.getYears(), period.getMonths(), or period.getTotalMonths().
Check for calls to java.time APIs that silently use the default system time-zone.
A BugChecker; see the associated BugPattern annotation for details.
 
 
A BugChecker; see the associated BugPattern annotation for details.
Check for calls to bad JodaTime constructors.
Checks for usages of dangerous DateTimeConstants constants.
Check for calls to duration.withMillis(long).
Check for calls to instant.withMillis(long).
Match possibly incorrect use of Period to obtain a number of (e.g.) days between two dates.
Check for calls to JodaTime's type.plus(long) and type.minus(long) where <type> = {Duration,Instant,DateTime,DateMidnight}.
Ban usage of Joda's ConverterManager.
Check for calls to Joda-Time's foo.toFoo() and new Foo(foo).
Check for calls to JodaTime's type.withDurationAdded(long, int) where <type> = {Duration,Instant,DateTime}.
Detects floating-point assertEquals() calls that will not work in JUnit 4.
A bugpattern; see the associated summary.
@BeforeClass or @AfterClass should be applied to static methods.
 
Checks for the existence of a JUnit3 style setUp() method in a JUnit4 test class or methods annotated with a non-JUnit4 @Before annotation.
Checks for the existence of a JUnit3 style tearDown() method in a JUnit4 test class or methods annotated with a non-JUnit4 @After annotation.
 
Finds tests that won't run due to the enclosing runner.
 
Points out if an object is tested for reference equality to itself using JUnit library.
A BugChecker; see the associated BugPattern annotation for details.
Checks if the methods specified in junitparams.Parameters annotation to provide parameters exists.
A BugPattern; see the summary.
 
A BugPattern; see the summary.
 
Points out if #valueOf() is called on a Protocol Buffer Enum.
Flags calls to toString on lite protos.
Bans calls to LocalDate.plus(TemporalAmount) and LocalDate.minus(TemporalAmount) where the TemporalAmount is a non-zero Duration.
Binding for a local variable in a template.
Suggests that calls to Lock.lock must be immediately followed by a try-finally that calls Lock.unlock.
Detects locks on boxed primitives.
Bug checker to detect the usage of lock on the class other than the enclosing class of the code block.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Matcher for a long literal with a lower-case ell for a suffix (e.g.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Checker to prevent usages of comparison methods where both the operands undergo lossy widening.
Finds malformed inline tags where @{tag is used instead of {@tag.
Specify an error-prone Matcher to further restrict what expressions are matched by the annotated parameter.
 
Check for calls to Math's Math.round(float) with an integer or long parameter.
Indicates that a parameter to a placeholder method is not required to be used in the placeholder's implementation.
Flags a few ways in which member names may violate the style guide.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Replacement of misleading android.R.string constants with more intuitive ones.
Bug checker for when a scope annotation is used at injection site, which does not have any effect on the injected values.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
 
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Matches Javadocs which are missing a required summary line.
 
Matches test helpers which require a terminating method to be called.
Base class for checks which find common errors in date format patterns.
Ban use of D (day-of-year) in a date format pattern that also contains M (month-of-year).
Ban use of YYYY in a SimpleDateFormat pattern, unless it is being used for a week date.
A BugChecker; see the associated BugPattern annotation for details.
Checks for calls to Descriptor#findFieldByNumber with field numbers from a different proto.
Flags methods which return mutable collections from some code paths, but immutable ones from others.
A BugChecker; see the associated BugPattern annotation for details.
A BugPattern; see the summary.
Matches creation of new collections/proto builders which are modified but never used.
 
 
Identify the backing collection source of a stream and reports if the source is mutated during the stream operations.
Matches classes that have two or more constructors annotated with @Inject.
 
This checker matches if a class has more than one annotation that is a scope annotation(that is, the annotation is either annotated with Guice's @ScopeAnnotation or Javax's @Scope).
A BugPattern; see the summary.
A BugChecker; see the associated BugPattern annotation for details.
 
A BugChecker; see the associated BugPattern annotation for details.
 
A BugChecker; see the associated BugPattern annotation for details.
Checks if a constructor or method annotated with MustBeClosed is called within the resource variable initializer of a try-with-resources statement.
A BugChecker; see the associated BugPattern annotation for details.
Check for public static final declaration of Arrays.
Warns on classes or methods being named similarly to contextual keywords, or invoking such methods.
Helper methods for checking if a commented argument matches a formal parameter and for generating comments in the right format.
A BugPattern; see the summary.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Utility class to find calls "nearby" other calls.
A BugChecker; see the associated BugPattern annotation for details.
 
A BugChecker; see the associated BugPattern annotation for details.
Checks methods annotated with @NoAllocation to ensure they really do not allocate.
Indicates that a Refaster rule should not allow autoboxing when it is typechecking a match.
Checker that "pushes" the @CanIgnoreReturnValue annotation down from classes to methods.
Flags instances of non-API types from being accepted or returned in APIs.
Detects non-atomic updates to volatile variables.
Types shouldn't be statically by their non-canonical name.
Members shouldn't be statically imported by their non-canonical name.
Flags types being referred to by their non-canonical name.
Enforce that @CompileTimeConstant parameters are final or effectively final.
A BugPattern; see the summary.
Bug checker for equals methods that don't actually override equals.
 
A BugPattern; see the summary.
Specify an error-prone Matcher to further restrict what expressions are matched by the annotated parameter.
A BugChecker; see the associated BugPattern annotation for details.
A bugpattern; see the summary.
A Checker that catches Optional/Optional with Nullable annotation.
 
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Flags passing literal null to Optional-accepting APIs.
A BugChecker; see the associated BugPattern annotation for details.
Check for usage of Objects.equal on primitive types.
Check for calls to Objects' Objects.hashCode(java.lang.Object) with a primitive parameter.
Warns against calling toString() on Objects which don't have toString() method overridden and won't produce meaningful output.
Annotation to specify what tree kinds are allowed or disallowed to match a given expression.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Matches Optional#map mapping to another Optional.
Replaces Optional.map with Optional.ifPresent if the value is unused.
 
Checks if Optional#of is chained with a redundant method.
A BugChecker; see the associated BugPattern annotation for details.
Check for the a11y antipattern of setting CSS outline attributes to none or 0.
 
Matches the behaviour of javac's overrides Xlint warning.
This checker matches methods that 1) are not themselves annotated with @Inject (neither javax.inject.Inject nor com.google.inject.Inject) 2) descend from a method that is annotated with @com.google.inject.Inject
This checker matches methods that 1) are not themselves annotated with @Inject 2) descend from a method that is annotated with @javax.inject.Inject 3) do not descent from a method that is annotated with @com.google.inject.Inject
Warns against overriding toString() in a Throwable class and suggests getMessage()
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
A rule that enables checking for methods belonging to a set of packages or any of their subpackages.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Flags uses of parameters in non-parameterized tests.
BugPattern to detect classes which implement android.os.Parcelable but don't have public static CREATOR.
Bans calls to Period.from(temporalAmount) where temporalAmount is a Duration.
Bans calls to Period.get(temporalUnit) where temporalUnit is not YEARS, MONTHS, or DAYS.
Bans calls to Period#plus/minus(TemporalAmount) where the argument is a Duration.
Annotation to indicate a placeholder method.
Checks that Precondition.checkNotNull is not invoked with same arg twice.
 
This check suggests the use of java.time-based APIs, when available.
Tightens types which refer to an Iterable, Map, Multimap, etc.
 
Discourages inadvertently using reference equality on boxed primitives in AtomicReference.
 
 
Check for disallowed access to private_do_not_access_or_else proto fields.
Flags protected members in final classes.
Highlights cases where a proto's build method has its return value ignored.
Points out if #ordinal() is called on a Protocol Buffer Enum.
This checker warns about accessing the underlying nanosecond-adjustment field of a duration without a "nearby" access of the underlying seconds field.
Rules for methods on proto messages and builders.
 
This checker warns about accessing the underlying nanosecond-adjustment field of a protobuf timestamp without a "nearby" access of the underlying seconds field.
Checks that ProtoTruth's ignoringFields is passed field numbers from the correct proto.
 
Bug checker for null-returning methods annotated with @Provides but not @Nullable.
Checks if public APIs named "stream" returns a type whose name ends with Stream.
 
 
A BugChecker; see the associated BugPattern annotation for details.
 
A BugChecker; see the associated BugPattern annotation for details.
 
Removes overrides which purely pass through to the method in the super class.
A BugPattern; see the summary.
A BugChecker; see the associated BugPattern annotation for details.
Static utilities to indicate special handling in Refaster templates.
A representation of an entire Refaster rule, corresponding to a class with @BeforeTemplates and @AfterTemplates.
Scanner implementation to extract a single Refaster rule from a ClassTree.
A BugChecker; see the associated BugPattern annotation for details.
Checks that the only code that refers to Dagger generated code is other Dagger generated code.
 
An annotation for repeated Refaster template variables.
Utility methods to find replacement variables with similar names.
Indicates that an annotation requires the presence of another annotation.
Enforces @RequiredAnnotation as an annotation processor.
 
Check for non-allowlisted callers to RestrictedApiChecker.
Policy for use of a method or constructor's result.
An object that can report on the behavior of a CRV-related check for analysis purposes.
Evaluates methods and their enclosing classes and packages to determine a ResultUsePolicy for the methods.
Delegate to return information about a method symbol.
What kind a method symbol is, and what scopes apply to it.
A rule for determining ResultUsePolicy for methods and/or constructors.
An evaluation that a rule makes.
A global rule that is evaluated when none of the more specific rules determine a ResultUsePolicy for a method.
A rule that evaluates methods and constructors to determine a ResultUsePolicy for them.
Scope to which a rule may apply.
A rule that evaluates symbols of any kind to determine a ResultUsePolicy to associate with them.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Finds common Javadoc errors, and tries to suggest useful fixes.
A BugChecker; see the associated BugPattern annotation for details.
Flags methods with collection return types which return null in some cases but don't annotate the method as @Nullable.
A checker which produces an error when a return value is accidentally discarded.
A BugChecker; see the summary.
Factories for common kinds of ResultUseRules.
A BugChecker; see the associated BugPattern for details.
Looks for types being shadowed by other types in a way that may be confusing.
 
Migrate users who use JSR 330 scopes on Dagger modules.
 
A BugChecker; see the associated BugPattern annotation for details.
TODO(eaftan): Consider cases where the parent is not a statement or there is no parent?
Points out if an object is compared to itself.
 
List of banned methods for BanSerializableRead.
 
Replaces the operators when visiting the binary nodes
Checks that variable argument methods have even number of arguments.
Finds instances where one uses Collection#size() >= 0 or T[].length > 0.
Checks for statement switches that can be expressed as an equivalent expression switch.
Checks for static fields being assigned within constructors.
Checks for static fields being assigned with Throwable.
A BugChecker; see the associated BugPattern annotation for details.
Logic for inspecting static imports used by NonCanonicalStaticImport, NonCanonicalStaticMemberImport, and UnnecessaryStaticImport.
Information about a static import.
A BugChecker; see the associated BugPattern annotation for details.
 
 
A BugChecker; see the associated BugPattern annotation for details.
Discourage stream::iterator to create Iterables.
A BugChecker; see the associated BugPattern annotation for details.
Format string validation utility that fails on more cases than FormatStringValidation to enforce strict format string checking.
 
A BugChecker that flags calls to String.toLowerCase() and String.toUpperCase(), as these methods implicitly rely on the environment's default locale.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
A simple wrapper to view a String as a Name.
A BugChecker; see the associated BugPattern annotation for details.
Helper for strongly typing fields.
Builder for StronglyType
Flags fields which would be better expressed as ByteStrings rather than primitive byte arrays.
Flags fields which would be better expressed as time types rather than primitive integers.
Check for calls to String's foo.substring(0).
Checker that recommends using @InlineMe on single-statement deprecated APIs.
A BugChecker; see the associated BugPattern annotation for details.
Find uses of SuppressWarnings with "deprecated".
Finds occurrences of @SuppressWarnings where there is definitely no explanation for why it is safe.
 
A BugChecker; see the associated BugPattern annotation for details.
Flags com.sun.tools.javac.code.Symbol#toString usage in BugCheckers.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Check for calls to System.exit() outside of a main method.
A BugChecker; see the associated BugPattern annotation for details.
Abstract superclass for templates that can be used to search and replace in a Java syntax tree.
Abstract type representing a match against a Template.
Bans calls to TemporalAccessor.get(ChronoField) where the implementation is guaranteed to throw an UnsupportedTemporalTypeException.
A BugChecker; see the associated BugPattern annotation for details.
Flags uses of parameters in non-parameterized tests.
Flags uses of @Theory (and others) in non-Theories-run tests.
 
A BugChecker; see the associated BugPattern annotation for details.
Bug checker to detect usage of Thread.stop(), Thread.yield(), and changing thread priorities.
Analyzes types for deep thread safety.
A BugChecker; see the associated BugPattern annotation for details.
A class which gives information about the annotation of types; if a type isn't annotated, ThreadSafety.Violation gives information as to why it is not.
Information about known types and whether they're known to be safe or unsafe.
Helper for building maps of classes to AnnotationInfo.
The ThreadSafety utility class can be used by either the bug checker that enforces immutability or by the bug checker that enforces thread-safety.
A human-friendly explanation of a thread safety violations.
 
Catches no-op calls to Throwables.throwIfUnchecked.
A BugChecker; see the associated BugPattern annotation for details.
Bugpattern to discourage throwing base exception classes.
Suggests to remove the unchecked throws clause.
Check for problematic or suspicious TimeUnit conversion calls.
Checker that detects likely time-unit mismatches by looking at identifier names.
A BugChecker; see the associated BugPattern annotation for details.
ToString should not return null.
Warns against use of both static and transient modifiers on field declarations.
Flags com.sun.source.tree.Tree#toString usage in BugCheckers.
Detects usages of Truth assertions with the expected and actual values reversed.
Points out if Truth Library assert is called on a constant.
A BugChecker; see the associated BugPattern annotation for details.
Flags ambiguous usages of Map#getOrDefault within Truth#assertThat.
A BugChecker; see the associated BugPattern annotation for details.
A BugPattern; see the summary.
A BugChecker; see the associated BugPattern annotation for details.
A bug checker for the following code pattern:
A BugChecker; see the associated BugPattern annotation for details.
Methods to answer the question: are these two types "compatible" with each other, in the context of an equality check?
 
Flags com.sun.tools.javac.code.Type#equals usage.
Warns when a type parameter shadows another type name in scope.
Enforces type parameters match the google style guide.
An enum that classifies a String name into different types, based on the Google Java Style Guide's rules for Type Parameters.
A BugChecker; see the associated BugPattern annotation for details.
 
 
Enumerates types which have poorly-defined behaviour for equals.
Flags com.sun.tools.javac.code.Type#toString usage in BugCheckers.
UExpression allowing a match against any of a list of expressions.
A representation of a type with optional generic parameters.
UTree version of ExpressionTree.
UType version of Type.ForAll.
Free identifier that can be bound to any expression of the appropriate type.
UType representation of an IntersectionClassType.
UTree version of LiteralTree.
UTree version of MemberSelectTree.
UTree version of MethodInvocationTree.
A UType representation of a Type.MethodType.
Flags types which do not have well-defined equals behavior.
Finds unescaped entities in Javadocs.
 
Bans, without the possibility of suppression, the use of direction-changing Unicode escapes.
Replaces printable ASCII unicode escapes with the literal version.
Bans using non-ASCII Unicode characters outside string literals and comments.
A serializable representation of a template that can be matched against a target of type T.
A mutable representation of an attempt to match a template source tree against a target source tree.
Flags uses of fully qualified names which are not ambiguous if imported.
Checker that warns when capturing the result of an ignorable API into an unused variable.
Suggests restricting the visibility of methods which should only be called by a framework.
A BugChecker; see the associated BugPattern annotation for details.
Discourage manual initialization or assignment to fields annotated with framework annotations.
A BugPattern; see the summary.
Finds and fixes unnecessarily boxed return expressions.
Finds and fixes unnecessarily boxed variables.
Checks for unnecessarily performing null checks on expressions which can't be null.
A BugChecker; see the associated BugPattern annotation for details.
Removes final from non-field variables.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
Matchers.methodInvocation(Matcher) is not exactly deprecated, but it is legacy, and in particular is not needed when the argument is a MethodMatcher, since MethodMatcher already does the unwrapping that methodInvocation does.
Matches unnecessary uses of method references.
A refactoring to replace Optional.get() with lambda arg in expressions passed as arg to member functions of Optionals.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
See the summary.
A BugChecker; see the associated BugPattern annotation for details.
Flags tags which haven't been recognised by the Javadoc parser.
A BugChecker; see the associated BugPattern annotation for details.
Flags unsafe usages of the Locale constructor and class methods.
Checks unsafe instance creation via reflection.
Check to detect unsafe upcasts of null values to wildcard types.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
 
Bugpattern for catch blocks which catch an exception but throw another one without wrapping the original.
A BugPattern; see the summary.
Bugpattern to detect unused declarations.
Bugpattern to detect unused nested classes.
A BugPattern; see the summary.
Bugpattern to detect unused declarations.
UTree representation of an invocation of a placeholder method.
 
UTree representation of a ReturnTree.
Points out on creation of Set and HashMap of type java.net.URL.
Discourages using URLs in @see tags.
 
 
A BugChecker; see the associated BugPattern annotation for details.
Annotation to indicate which import policy to use.
Checker that recommends using ErrorProne's version of @CheckReturnValue over the version in JSR305 (which is defunct).
UTree representation of a StatementTree.
Tuple of a Unifier and a list of statements that are still waiting to be matched.
Identifier representing a static member (field, method, etc.) on a class.
Converts a type-checked syntax tree to a portable UTree template.
UTree<T extends com.sun.tools.javac.tree.JCTree>
A serializable representation of a template syntax tree which can be unified with a target AST and inlined based on a set of substitutions.
A serializable representation of a type template, used for enforcing type constraints on target ASTs.
UType version of Type.TypeVar.
Bindings key linked to a UTypeVar.
Tuple of an expression with an associated type.
A UTree representation of a local variable declaration.
Checker that ensures the @InlineMe annotation is used correctly.
A BugChecker; see the associated BugPattern annotation for details.
Check for variables and types with the same name
Converts some local variables to use var.
A BugChecker; see the associated BugPattern annotation for details.
A BugChecker; see the associated BugPattern annotation for details.
 
 
A collection of types with known mutability.
A collection of types with known thread safety.
A BugChecker; see the associated BugPattern annotation for details.
MethodMatchers.MethodClassMatcher.withSignature(String) is discouraged: most usages should use .named and/or .withParameters instead.
Matches always-default expressions in oneof switches.
A BugChecker; see the associated BugPattern annotation for details.
See the summary.
This checker bans calls to ZoneId.of("Z") in favor of ZoneOffset.UTC.