-
Notifications
You must be signed in to change notification settings - Fork 778
Open
Description
The "How to tell Error Prone which methods to check" section doesn't seem to reflect the changes made in #435.
It also would be better to expand the "Ignored contexts" section to fully reflect the following:
error-prone/check_api/src/main/java/com/google/errorprone/matchers/Matchers.java
Lines 1330 to 1353 in b1631fe
| /** | |
| * {@link FunctionalInterface}s that are generally used as a lambda expression for 'a block of | |
| * code that's going to fail', e.g.: | |
| * | |
| * <p>{@code assertThrows(FooException.class, () -> myCodeThatThrowsAnException()); | |
| * errorCollector.checkThrows(FooException.class, () -> myCodeThatThrowsAnException()); } | |
| */ | |
| // TODO(glorioso): Consider a meta-annotation like @LikelyToThrow instead/in addition? | |
| private static final Supplier<ImmutableSet<Type>> CLASSES_CONSIDERED_THROWING = | |
| VisitorState.memoize( | |
| state -> | |
| Stream.of( | |
| "org.junit.function.ThrowingRunnable", | |
| "org.junit.jupiter.api.function.Executable", | |
| "org.assertj.core.api.ThrowableAssert$ThrowingCallable", | |
| "com.google.common.truth.ExpectFailure.AssertionCallback", | |
| "com.google.common.truth.ExpectFailure.DelegatedAssertionCallback", | |
| "com.google.common.truth.ExpectFailure.StandardSubjectBuilderCallback", | |
| "com.google.common.truth.ExpectFailure.SimpleSubjectBuilderCallback", | |
| "com.google.devtools.build.lib.testutil.MoreAsserts$ThrowingRunnable", | |
| "com.google.gerrit.testing.GerritJUnit$ThrowingRunnable") | |
| .map(state::getTypeFromString) | |
| .filter(Objects::nonNull) | |
| .collect(toImmutableSet())); |
Metadata
Metadata
Assignees
Labels
No labels