diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJBigDecimalRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJBigDecimalRules.java index 272b3ab194..576e8bde2b 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJBigDecimalRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJBigDecimalRules.java @@ -9,6 +9,7 @@ import java.math.BigDecimal; import org.assertj.core.api.AbstractBigDecimalAssert; import org.assertj.core.api.BigDecimalAssert; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** * Refaster rules related to AssertJ assertions over {@link BigDecimal}s. @@ -20,6 +21,7 @@ * instances, but also their scale. As a result various seemingly straightforward transformations * would actually subtly change the assertion's semantics. */ +@OnlineDocumentation final class AssertJBigDecimalRules { private AssertJBigDecimalRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJBigIntegerRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJBigIntegerRules.java index 7b3ad736ca..3f9ca69b4c 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJBigIntegerRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJBigIntegerRules.java @@ -8,9 +8,11 @@ import com.google.errorprone.refaster.annotation.BeforeTemplate; import java.math.BigInteger; import org.assertj.core.api.AbstractBigIntegerAssert; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; // XXX: If we add a rule that drops unnecessary `L` suffixes from literal longs, then the `0L`/`1L` // cases below can go. +@OnlineDocumentation final class AssertJBigIntegerRules { private AssertJBigIntegerRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJBooleanRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJBooleanRules.java index 9c28353c63..cc582f1a1a 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJBooleanRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJBooleanRules.java @@ -8,7 +8,9 @@ import com.google.errorprone.refaster.annotation.BeforeTemplate; import com.google.errorprone.refaster.annotation.UseImportPolicy; import org.assertj.core.api.AbstractBooleanAssert; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; +@OnlineDocumentation final class AssertJBooleanRules { private AssertJBooleanRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJByteRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJByteRules.java index 1c1134c387..7f4d2d5150 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJByteRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJByteRules.java @@ -7,7 +7,9 @@ import com.google.errorprone.refaster.annotation.AfterTemplate; import com.google.errorprone.refaster.annotation.BeforeTemplate; import org.assertj.core.api.AbstractByteAssert; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; +@OnlineDocumentation final class AssertJByteRules { private AssertJByteRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJCharSequenceRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJCharSequenceRules.java index 545b7fec08..573f9efa02 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJCharSequenceRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJCharSequenceRules.java @@ -8,7 +8,9 @@ import com.google.errorprone.refaster.annotation.BeforeTemplate; import com.google.errorprone.refaster.annotation.UseImportPolicy; import org.assertj.core.api.AbstractAssert; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; +@OnlineDocumentation final class AssertJCharSequenceRules { private AssertJCharSequenceRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJComparableRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJComparableRules.java index ea92d58fb6..cd76d5d8ff 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJComparableRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJComparableRules.java @@ -8,7 +8,9 @@ import com.google.errorprone.refaster.annotation.UseImportPolicy; import org.assertj.core.api.AbstractComparableAssert; import org.assertj.core.api.AbstractIntegerAssert; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; +@OnlineDocumentation final class AssertJComparableRules { private AssertJComparableRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJDoubleRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJDoubleRules.java index 624018ffd9..8d640235b9 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJDoubleRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJDoubleRules.java @@ -8,7 +8,9 @@ import com.google.errorprone.refaster.annotation.BeforeTemplate; import org.assertj.core.api.AbstractDoubleAssert; import org.assertj.core.data.Offset; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; +@OnlineDocumentation final class AssertJDoubleRules { private AssertJDoubleRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJEnumerableRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJEnumerableRules.java index a891bfbc06..bc19fd72dc 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJEnumerableRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJEnumerableRules.java @@ -6,7 +6,9 @@ import com.google.errorprone.refaster.annotation.BeforeTemplate; import java.util.Collection; import org.assertj.core.api.EnumerableAssert; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; +@OnlineDocumentation final class AssertJEnumerableRules { private AssertJEnumerableRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJFloatRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJFloatRules.java index 8952ca4f2b..0d7d92e436 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJFloatRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJFloatRules.java @@ -8,7 +8,9 @@ import com.google.errorprone.refaster.annotation.BeforeTemplate; import org.assertj.core.api.AbstractFloatAssert; import org.assertj.core.data.Offset; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; +@OnlineDocumentation final class AssertJFloatRules { private AssertJFloatRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJIntegerRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJIntegerRules.java index d134bfe6c8..6495f8bb3e 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJIntegerRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJIntegerRules.java @@ -7,7 +7,9 @@ import com.google.errorprone.refaster.annotation.AfterTemplate; import com.google.errorprone.refaster.annotation.BeforeTemplate; import org.assertj.core.api.AbstractIntegerAssert; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; +@OnlineDocumentation final class AssertJIntegerRules { private AssertJIntegerRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJLongRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJLongRules.java index 3ac9275fc2..35c16db3da 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJLongRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJLongRules.java @@ -7,7 +7,9 @@ import com.google.errorprone.refaster.annotation.AfterTemplate; import com.google.errorprone.refaster.annotation.BeforeTemplate; import org.assertj.core.api.AbstractLongAssert; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; +@OnlineDocumentation final class AssertJLongRules { private AssertJLongRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJMapRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJMapRules.java index dfbd303ea3..59f99e9504 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJMapRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJMapRules.java @@ -5,7 +5,9 @@ import com.google.errorprone.refaster.annotation.BeforeTemplate; import java.util.Map; import org.assertj.core.api.AbstractMapAssert; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; +@OnlineDocumentation final class AssertJMapRules { private AssertJMapRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJNumberRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJNumberRules.java index fac67d6068..43453d3031 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJNumberRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJNumberRules.java @@ -19,8 +19,10 @@ import org.assertj.core.api.AbstractLongAssert; import org.assertj.core.api.AbstractShortAssert; import org.assertj.core.api.NumberAssert; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; import tech.picnic.errorprone.refaster.matchers.IsCharacter; +@OnlineDocumentation final class AssertJNumberRules { private AssertJNumberRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJObjectRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJObjectRules.java index b5122b7296..41b1a51c61 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJObjectRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJObjectRules.java @@ -10,7 +10,9 @@ import org.assertj.core.api.AbstractBooleanAssert; import org.assertj.core.api.AbstractStringAssert; import org.assertj.core.api.ObjectAssert; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; +@OnlineDocumentation final class AssertJObjectRules { private AssertJObjectRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJOptionalRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJOptionalRules.java index f14bef43ad..2cab238072 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJOptionalRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJOptionalRules.java @@ -14,7 +14,9 @@ import org.assertj.core.api.AbstractOptionalAssert; import org.assertj.core.api.ObjectAssert; import org.assertj.core.api.OptionalAssert; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; +@OnlineDocumentation final class AssertJOptionalRules { private AssertJOptionalRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJPrimitiveRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJPrimitiveRules.java index 7635e37037..e3285067ab 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJPrimitiveRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJPrimitiveRules.java @@ -9,7 +9,9 @@ import com.google.errorprone.refaster.annotation.UseImportPolicy; import org.assertj.core.api.AbstractBooleanAssert; import org.assertj.core.api.AbstractDoubleAssert; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; +@OnlineDocumentation final class AssertJPrimitiveRules { private AssertJPrimitiveRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJRules.java index 4da5ba9c92..8ee7396d9a 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJRules.java @@ -53,6 +53,7 @@ import org.assertj.core.api.OptionalDoubleAssert; import org.assertj.core.api.OptionalIntAssert; import org.assertj.core.api.OptionalLongAssert; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; import tech.picnic.errorprone.refaster.matchers.IsArray; /** Refaster rules related to AssertJ expressions and statements. */ @@ -118,8 +119,9 @@ // XXX: `assertThat(ImmutableList.sortedCopyOf(cmp, values)).somethingExactOrder` -> just compare // "in any order". // XXX: Turns out a lot of this is also covered by https://github.com/palantir/assertj-automation. -// See how we can combine these things. Do note that (at present) their Refaster rules don't show up -// as Error Prone checks. So we'd have to build an integration for that. +// See how we can combine these things. Do note that (at present) their Refaster rules don't +// show up as Error Prone checks. So we'd have to build an integration for that. +@OnlineDocumentation final class AssertJRules { private AssertJRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJShortRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJShortRules.java index a09e34ca2b..4818920357 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJShortRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJShortRules.java @@ -7,7 +7,9 @@ import com.google.errorprone.refaster.annotation.AfterTemplate; import com.google.errorprone.refaster.annotation.BeforeTemplate; import org.assertj.core.api.AbstractShortAssert; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; +@OnlineDocumentation final class AssertJShortRules { private AssertJShortRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJStringRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJStringRules.java index d149d3b1ff..0f3fee47ba 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJStringRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJStringRules.java @@ -8,7 +8,9 @@ import com.google.errorprone.refaster.annotation.UseImportPolicy; import org.assertj.core.api.AbstractAssert; import org.assertj.core.api.AbstractStringAssert; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; +@OnlineDocumentation final class AssertJStringRules { private AssertJStringRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJThrowingCallableRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJThrowingCallableRules.java index f221f66425..3bfb7502ee 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJThrowingCallableRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssertJThrowingCallableRules.java @@ -16,6 +16,7 @@ import org.assertj.core.api.AbstractObjectAssert; import org.assertj.core.api.AbstractThrowableAssert; import org.assertj.core.api.ThrowableAssert.ThrowingCallable; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** * Refaster rules related to AssertJ assertions over expressions that may throw a {@link Throwable} @@ -26,6 +27,7 @@ * types. Note that only the most common assertion expressions are rewritten here; covering all * cases would require the implementation of an Error Prone check instead. */ +@OnlineDocumentation final class AssertJThrowingCallableRules { private AssertJThrowingCallableRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssortedRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssortedRules.java index 872f9eced8..1d5523736f 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssortedRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/AssortedRules.java @@ -28,11 +28,13 @@ import java.util.Set; import java.util.stream.Stream; import javax.annotation.Nullable; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** * Assorted Refaster rules that do not (yet) belong in one of the other classes with more topical * Refaster rules. */ +@OnlineDocumentation final class AssortedRules { private AssortedRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/BigDecimalRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/BigDecimalRules.java index 7f27917660..b23406170b 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/BigDecimalRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/BigDecimalRules.java @@ -4,8 +4,10 @@ import com.google.errorprone.refaster.annotation.AfterTemplate; import com.google.errorprone.refaster.annotation.BeforeTemplate; import java.math.BigDecimal; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link BigDecimal}s. */ +@OnlineDocumentation final class BigDecimalRules { private BigDecimalRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/CollectionRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/CollectionRules.java index e02c12c2a2..19df9107db 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/CollectionRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/CollectionRules.java @@ -19,10 +19,12 @@ import java.util.SortedSet; import java.util.function.IntFunction; import java.util.stream.Stream; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with (arbitrary) collections. */ // XXX: There are other Guava `Iterables` methods that should not be called if the input is known to // be a `Collection`. Add those here. +@OnlineDocumentation final class CollectionRules { private CollectionRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ComparatorRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ComparatorRules.java index 3a1e94d32b..83ea4c7378 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ComparatorRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ComparatorRules.java @@ -24,8 +24,10 @@ import java.util.function.ToDoubleFunction; import java.util.function.ToIntFunction; import java.util.function.ToLongFunction; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link Comparator}s. */ +@OnlineDocumentation final class ComparatorRules { private ComparatorRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/DoubleStreamRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/DoubleStreamRules.java index 7e8e007b19..ca64f929d8 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/DoubleStreamRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/DoubleStreamRules.java @@ -12,8 +12,10 @@ import java.util.function.DoubleUnaryOperator; import java.util.stream.DoubleStream; import java.util.stream.Stream; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link DoubleStream}s. */ +@OnlineDocumentation final class DoubleStreamRules { private DoubleStreamRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/EqualityRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/EqualityRules.java index 6aaccd1d4d..244a9eceec 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/EqualityRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/EqualityRules.java @@ -6,8 +6,10 @@ import com.google.errorprone.refaster.annotation.BeforeTemplate; import java.util.Objects; import java.util.function.Predicate; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with (in)equalities. */ +@OnlineDocumentation final class EqualityRules { private EqualityRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableListMultimapRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableListMultimapRules.java index 87fc03db95..b68a7a1601 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableListMultimapRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableListMultimapRules.java @@ -24,8 +24,10 @@ import java.util.Map; import java.util.function.Function; import java.util.stream.Stream; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link ImmutableListMultimap}s. */ +@OnlineDocumentation final class ImmutableListMultimapRules { private ImmutableListMultimapRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableListRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableListRules.java index de9aca4deb..1848c268b9 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableListRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableListRules.java @@ -20,8 +20,10 @@ import java.util.Iterator; import java.util.List; import java.util.stream.Stream; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link ImmutableList}s. */ +@OnlineDocumentation final class ImmutableListRules { private ImmutableListRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableMapRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableMapRules.java index 2d1906983f..aa68506b83 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableMapRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableMapRules.java @@ -21,8 +21,10 @@ import java.util.Set; import java.util.function.Function; import java.util.stream.Stream; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link ImmutableMap}s. */ +@OnlineDocumentation final class ImmutableMapRules { private ImmutableMapRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableMultisetRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableMultisetRules.java index 07802c7741..fee76fd89d 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableMultisetRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableMultisetRules.java @@ -13,8 +13,10 @@ import java.util.Collection; import java.util.Iterator; import java.util.stream.Stream; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link ImmutableMultiset}s. */ +@OnlineDocumentation final class ImmutableMultisetRules { private ImmutableMultisetRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSetMultimapRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSetMultimapRules.java index 8272c05b57..1c704943fc 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSetMultimapRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSetMultimapRules.java @@ -21,8 +21,10 @@ import java.util.Map; import java.util.function.Function; import java.util.stream.Stream; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link ImmutableSetMultimap}s. */ +@OnlineDocumentation final class ImmutableSetMultimapRules { private ImmutableSetMultimapRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSetRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSetRules.java index b7159b886a..f4d5ba78b7 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSetRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSetRules.java @@ -17,8 +17,10 @@ import java.util.Iterator; import java.util.Set; import java.util.stream.Stream; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link ImmutableSet}s. */ +@OnlineDocumentation final class ImmutableSetRules { private ImmutableSetRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSortedMapRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSortedMapRules.java index ff03163cad..36975c7025 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSortedMapRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSortedMapRules.java @@ -13,8 +13,10 @@ import java.util.Comparator; import java.util.Map; import java.util.stream.Stream; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link ImmutableSortedMap}s. */ +@OnlineDocumentation final class ImmutableSortedMapRules { private ImmutableSortedMapRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSortedMultisetRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSortedMultisetRules.java index 0e8a252223..c66f86e7d1 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSortedMultisetRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSortedMultisetRules.java @@ -15,8 +15,10 @@ import java.util.Comparator; import java.util.Iterator; import java.util.stream.Stream; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link ImmutableSortedMultiset}s. */ +@OnlineDocumentation final class ImmutableSortedMultisetRules { private ImmutableSortedMultisetRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSortedSetRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSortedSetRules.java index 627fdf7c0f..7117818569 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSortedSetRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ImmutableSortedSetRules.java @@ -15,8 +15,10 @@ import java.util.Comparator; import java.util.Iterator; import java.util.stream.Stream; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link ImmutableSortedSet}s. */ +@OnlineDocumentation final class ImmutableSortedSetRules { private ImmutableSortedSetRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/IntStreamRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/IntStreamRules.java index 382f5d332b..2c43fc3cc1 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/IntStreamRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/IntStreamRules.java @@ -12,8 +12,10 @@ import java.util.function.IntUnaryOperator; import java.util.stream.IntStream; import java.util.stream.Stream; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link IntStream}s. */ +@OnlineDocumentation final class IntStreamRules { private IntStreamRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/JUnitRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/JUnitRules.java index b2c5942856..218213ab9a 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/JUnitRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/JUnitRules.java @@ -8,8 +8,10 @@ import com.google.errorprone.refaster.annotation.Repeated; import com.google.errorprone.refaster.annotation.UseImportPolicy; import org.junit.jupiter.params.provider.Arguments; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to JUnit expressions and statements. */ +@OnlineDocumentation final class JUnitRules { private JUnitRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/LongStreamRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/LongStreamRules.java index 45b4c0da30..363157c55f 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/LongStreamRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/LongStreamRules.java @@ -12,8 +12,10 @@ import java.util.function.LongUnaryOperator; import java.util.stream.LongStream; import java.util.stream.Stream; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link LongStream}s. */ +@OnlineDocumentation final class LongStreamRules { private LongStreamRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/MapEntryRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/MapEntryRules.java index 27d3af80c3..22c2cfe67f 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/MapEntryRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/MapEntryRules.java @@ -14,8 +14,10 @@ import java.util.AbstractMap; import java.util.Comparator; import java.util.Map; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link Map.Entry} instances. */ +@OnlineDocumentation final class MapEntryRules { private MapEntryRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/MockitoRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/MockitoRules.java index b17af9b514..dbb7b16770 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/MockitoRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/MockitoRules.java @@ -10,8 +10,10 @@ import com.google.errorprone.refaster.annotation.UseImportPolicy; import org.mockito.Mockito; import org.mockito.verification.VerificationMode; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to Mockito expressions and statements. */ +@OnlineDocumentation final class MockitoRules { private MockitoRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/MultimapRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/MultimapRules.java index ff64ad784c..576508d745 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/MultimapRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/MultimapRules.java @@ -8,8 +8,10 @@ import java.util.Collection; import java.util.Set; import javax.annotation.Nullable; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link Multimap}s. */ +@OnlineDocumentation final class MultimapRules { private MultimapRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/NullRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/NullRules.java index 770843886c..0182547ef9 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/NullRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/NullRules.java @@ -10,8 +10,10 @@ import java.util.Objects; import java.util.function.Predicate; import javax.annotation.Nullable; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with (possibly) null values. */ +@OnlineDocumentation final class NullRules { private NullRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/OptionalRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/OptionalRules.java index 7c990060a5..6a1ec4d951 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/OptionalRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/OptionalRules.java @@ -17,8 +17,10 @@ import java.util.function.Supplier; import java.util.stream.Stream; import javax.annotation.Nullable; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link Optional}s. */ +@OnlineDocumentation final class OptionalRules { private OptionalRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/PrimitiveRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/PrimitiveRules.java index 041abec002..b0c6c138d2 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/PrimitiveRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/PrimitiveRules.java @@ -3,8 +3,10 @@ import com.google.common.primitives.Ints; import com.google.errorprone.refaster.annotation.AfterTemplate; import com.google.errorprone.refaster.annotation.BeforeTemplate; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with primitives. */ +@OnlineDocumentation final class PrimitiveRules { private PrimitiveRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ReactorRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ReactorRules.java index e03b521533..500bd40e34 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ReactorRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/ReactorRules.java @@ -25,9 +25,11 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import reactor.test.publisher.PublisherProbe; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; import tech.picnic.errorprone.refaster.matchers.ThrowsCheckedException; /** Refaster rules related to Reactor expressions and statements. */ +@OnlineDocumentation final class ReactorRules { private ReactorRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/RxJava2AdapterRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/RxJava2AdapterRules.java index b03245c7b1..ad75d06fc5 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/RxJava2AdapterRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/RxJava2AdapterRules.java @@ -13,8 +13,10 @@ import reactor.adapter.rxjava.RxJava2Adapter; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link RxJava2Adapter}. */ +@OnlineDocumentation final class RxJava2AdapterRules { private RxJava2AdapterRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/StreamRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/StreamRules.java index 336393e151..17abcf97c3 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/StreamRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/StreamRules.java @@ -22,8 +22,10 @@ import java.util.stream.Collector; import java.util.stream.Collectors; import java.util.stream.Stream; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link Stream}s. */ +@OnlineDocumentation final class StreamRules { private StreamRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/StringRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/StringRules.java index 3e01463f68..a18b289565 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/StringRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/StringRules.java @@ -17,9 +17,11 @@ import java.util.Optional; import java.util.function.Function; import javax.annotation.Nullable; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with {@link String}s. */ // XXX: Should we prefer `s -> !s.isEmpty()` or `not(String::isEmpty)`? +@OnlineDocumentation final class StringRules { private StringRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/TestNGToAssertJRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/TestNGToAssertJRules.java index e49014fb0f..8c9521ca3a 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/TestNGToAssertJRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/TestNGToAssertJRules.java @@ -28,6 +28,7 @@ import org.assertj.core.api.ThrowableAssert.ThrowingCallable; import org.testng.Assert; import org.testng.Assert.ThrowingRunnable; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** * Refaster rules that replace TestNG assertions with equivalent AssertJ assertions. @@ -72,6 +73,7 @@ // XXX: As-is these rules do not result in a complete migration: // - Expressions containing comments are skipped due to a limitation of Refaster. // - Assertions inside lambda expressions are also skipped. Unclear why. +@OnlineDocumentation final class TestNGToAssertJRules { private TestNGToAssertJRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/TimeRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/TimeRules.java index 6b33428dc6..5ff77ff8fa 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/TimeRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/TimeRules.java @@ -21,8 +21,10 @@ import java.time.chrono.ChronoZonedDateTime; import java.time.temporal.ChronoUnit; import java.time.temporal.TemporalUnit; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** Refaster rules related to expressions dealing with time. */ +@OnlineDocumentation final class TimeRules { private TimeRules() {} diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/WebClientRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/WebClientRules.java index 8452f00d17..62e43e7050 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/WebClientRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/WebClientRules.java @@ -20,11 +20,13 @@ import org.springframework.web.reactive.function.client.WebClient.RequestBodyUriSpec; import org.springframework.web.reactive.function.client.WebClient.RequestHeadersSpec; import org.springframework.web.reactive.function.client.WebClient.RequestHeadersUriSpec; +import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation; /** * Refaster rules related to expressions dealing with {@link * org.springframework.web.reactive.function.client.WebClient} and related types. */ +@OnlineDocumentation final class WebClientRules { private WebClientRules() {}