Skip to content

Commit

Permalink
Add util with base URL
Browse files Browse the repository at this point in the history
  • Loading branch information
rickie committed Sep 28, 2022
1 parent 07a0034 commit b68ba62
Show file tree
Hide file tree
Showing 32 changed files with 71 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import static com.google.errorprone.BugPattern.SeverityLevel.WARNING;
import static com.google.errorprone.BugPattern.StandardTags.LIKELY_ERROR;
import static com.google.errorprone.matchers.Matchers.isType;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.errorprone.BugPattern;
Expand All @@ -26,7 +27,7 @@
@AutoService(BugChecker.class)
@BugPattern(
summary = "`JsonCreator.Mode` should be set for single-argument creators",
link = "https://error-prone.picnic.tech/bugpatterns/AmbiguousJsonCreator",
link = BASE_URL_BUGPATTERNS + "AmbiguousJsonCreator",
linkType = CUSTOM,
severity = WARNING,
tags = LIKELY_ERROR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import static com.google.errorprone.matchers.Matchers.argumentCount;
import static com.google.errorprone.matchers.Matchers.instanceMethod;
import static com.google.errorprone.matchers.Matchers.nullLiteral;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.errorprone.BugPattern;
Expand All @@ -31,7 +32,7 @@
@AutoService(BugChecker.class)
@BugPattern(
summary = "Prefer `.isNull()` over `.isEqualTo(null)`",
link = "https://error-prone.picnic.tech/bugpatterns/AssertJIsNull",
link = BASE_URL_BUGPATTERNS + "AssertJIsNull",
linkType = CUSTOM,
severity = SUGGESTION,
tags = SIMPLIFICATION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import static com.google.errorprone.matchers.ChildMultiMatcher.MatchType.AT_LEAST_ONE;
import static com.google.errorprone.matchers.Matchers.annotations;
import static com.google.errorprone.matchers.Matchers.isType;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.common.collect.ImmutableList;
Expand All @@ -28,7 +29,7 @@
@AutoService(BugChecker.class)
@BugPattern(
summary = "Omit `@Autowired` on a class' sole constructor, as it is redundant",
link = "https://error-prone.picnic.tech/bugpatterns/AutowiredConstructor",
link = BASE_URL_BUGPATTERNS + "AutowiredConstructor",
linkType = CUSTOM,
severity = SUGGESTION,
tags = SIMPLIFICATION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static com.google.errorprone.BugPattern.LinkType.CUSTOM;
import static com.google.errorprone.BugPattern.SeverityLevel.SUGGESTION;
import static com.google.errorprone.BugPattern.StandardTags.SIMPLIFICATION;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.common.collect.ImmutableSet;
Expand Down Expand Up @@ -31,7 +32,7 @@
@AutoService(BugChecker.class)
@BugPattern(
summary = "Omit redundant syntax from annotation declarations",
link = "https://error-prone.picnic.tech/bugpatterns/CanonicalAnnotationSyntax",
link = BASE_URL_BUGPATTERNS + "CanonicalAnnotationSyntax",
linkType = CUSTOM,
severity = SUGGESTION,
tags = SIMPLIFICATION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import static com.google.errorprone.BugPattern.SeverityLevel.WARNING;
import static com.google.errorprone.BugPattern.StandardTags.FRAGILE_CODE;
import static com.google.errorprone.matchers.method.MethodMatchers.staticMethod;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.errorprone.BugPattern;
Expand All @@ -29,7 +30,7 @@
@BugPattern(
summary =
"Avoid `Collectors.to{List,Map,Set}` in favour of alternatives that emphasize (im)mutability",
link = "https://error-prone.picnic.tech/bugpatterns/CollectorMutability",
link = BASE_URL_BUGPATTERNS + "CollectorMutability",
linkType = CUSTOM,
severity = WARNING,
tags = FRAGILE_CODE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import static com.google.errorprone.matchers.Matchers.annotations;
import static com.google.errorprone.matchers.Matchers.anyOf;
import static com.google.errorprone.matchers.Matchers.isType;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.errorprone.BugPattern;
Expand All @@ -26,7 +27,7 @@
@AutoService(BugChecker.class)
@BugPattern(
summary = "Empty method can likely be deleted",
link = "https://error-prone.picnic.tech/bugpatterns/EmptyMethod",
link = BASE_URL_BUGPATTERNS + "EmptyMethod",
linkType = CUSTOM,
severity = SUGGESTION,
tags = SIMPLIFICATION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import static com.google.errorprone.matchers.Matchers.anyOf;
import static com.google.errorprone.matchers.Matchers.instanceMethod;
import static java.util.stream.Collectors.joining;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.common.base.Splitter;
Expand Down Expand Up @@ -50,7 +51,7 @@
@AutoService(BugChecker.class)
@BugPattern(
summary = "Test code should follow the Google Java style",
link = "https://error-prone.picnic.tech/bugpatterns/ErrorProneTestHelperSourceFormat",
link = BASE_URL_BUGPATTERNS + "ErrorProneTestHelperSourceFormat",
linkType = CUSTOM,
severity = SUGGESTION,
tags = STYLE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import static com.google.errorprone.BugPattern.StandardTags.FRAGILE_CODE;
import static com.google.errorprone.matchers.method.MethodMatchers.staticMethod;
import static java.util.stream.Collectors.collectingAndThen;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.common.collect.ImmutableSet;
Expand Down Expand Up @@ -36,7 +37,7 @@
@AutoService(BugChecker.class)
@BugPattern(
summary = "Make sure `Ordering#explicit` lists all of an enum's values",
link = "https://error-prone.picnic.tech/bugpatterns/ExplicitEnumOrdering",
link = BASE_URL_BUGPATTERNS + "ExplicitEnumOrdering",
linkType = CUSTOM,
severity = WARNING,
tags = FRAGILE_CODE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import static com.google.errorprone.BugPattern.SeverityLevel.ERROR;
import static com.google.errorprone.BugPattern.StandardTags.LIKELY_ERROR;
import static com.google.errorprone.matchers.method.MethodMatchers.instanceMethod;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.common.collect.Iterables;
Expand Down Expand Up @@ -43,7 +44,7 @@
summary =
"`Flux#flatMap` and `Flux#flatMapSequential` have subtle semantics; "
+ "please use `Flux#concatMap` or explicitly specify the desired amount of concurrency",
link = "https://error-prone.picnic.tech/bugpatterns/FluxFlatMapUsage",
link = BASE_URL_BUGPATTERNS + "FluxFlatMapUsage",
linkType = CUSTOM,
severity = ERROR,
tags = LIKELY_ERROR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import static com.google.errorprone.matchers.Matchers.not;
import static com.google.errorprone.matchers.Matchers.staticMethod;
import static java.util.stream.Collectors.joining;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.errorprone.BugPattern;
Expand Down Expand Up @@ -51,7 +52,7 @@
@AutoService(BugChecker.class)
@BugPattern(
summary = "Defer string concatenation to the invoked method",
link = "https://error-prone.picnic.tech/bugpatterns/FormatStringConcatenation",
link = BASE_URL_BUGPATTERNS + "FormatStringConcatenation",
linkType = CUSTOM,
severity = WARNING,
tags = SIMPLIFICATION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import static com.google.errorprone.matchers.Matchers.anyOf;
import static com.google.errorprone.matchers.Matchers.staticMethod;
import static com.google.errorprone.suppliers.Suppliers.OBJECT_TYPE;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.common.primitives.Primitives;
Expand Down Expand Up @@ -36,7 +37,7 @@
@AutoService(BugChecker.class)
@BugPattern(
summary = "Avoid or clarify identity conversions",
link = "https://error-prone.picnic.tech/bugpatterns/IdentityConversion",
link = BASE_URL_BUGPATTERNS + "IdentityConversion",
linkType = CUSTOM,
severity = WARNING,
tags = SIMPLIFICATION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import static com.google.errorprone.matchers.Matchers.isSubtypeOf;
import static com.google.errorprone.matchers.Matchers.methodReturns;
import static com.google.errorprone.matchers.Matchers.not;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.errorprone.BugPattern;
Expand Down Expand Up @@ -44,7 +45,7 @@
summary =
"`SortedSet` properties of a `@Value.Immutable` or `@Value.Modifiable` type must be "
+ "annotated with `@Value.NaturalOrder` or `@Value.ReverseOrder`",
link = "https://error-prone.picnic.tech/bugpatterns/ImmutablesSortedSetComparator",
link = BASE_URL_BUGPATTERNS + "ImmutablesSortedSetComparator",
linkType = CUSTOM,
severity = ERROR,
tags = LIKELY_ERROR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import static com.google.errorprone.matchers.Matchers.hasModifier;
import static com.google.errorprone.matchers.Matchers.isType;
import static java.util.function.Predicate.not;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;
import static tech.picnic.errorprone.bugpatterns.util.JavaKeywords.isReservedKeyword;

import com.google.auto.service.AutoService;
Expand Down Expand Up @@ -47,7 +48,7 @@
@AutoService(BugChecker.class)
@BugPattern(
summary = "JUnit method declaration can likely be improved",
link = "https://error-prone.picnic.tech/bugpatterns/JUnitMethodDeclaration",
link = BASE_URL_BUGPATTERNS + "JUnitMethodDeclaration",
linkType = CUSTOM,
severity = SUGGESTION,
tags = SIMPLIFICATION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import static java.util.Comparator.comparing;
import static java.util.Comparator.naturalOrder;
import static java.util.stream.Collectors.joining;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.common.collect.Comparators;
Expand Down Expand Up @@ -50,7 +51,7 @@
@AutoService(BugChecker.class)
@BugPattern(
summary = "Where possible, sort annotation array attributes lexicographically",
link = "https://error-prone.picnic.tech/bugpatterns/LexicographicalAnnotationAttributeListing",
link = BASE_URL_BUGPATTERNS + "LexicographicalAnnotationAttributeListing",
linkType = CUSTOM,
severity = SUGGESTION,
tags = STYLE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import static com.google.errorprone.BugPattern.SeverityLevel.SUGGESTION;
import static com.google.errorprone.BugPattern.StandardTags.STYLE;
import static java.util.Comparator.comparing;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.common.collect.ImmutableList;
Expand All @@ -31,7 +32,7 @@
@AutoService(BugChecker.class)
@BugPattern(
summary = "Sort annotations lexicographically where possible",
link = "https://error-prone.picnic.tech/bugpatterns/LexicographicalAnnotationListing",
link = BASE_URL_BUGPATTERNS + "LexicographicalAnnotationListing",
linkType = CUSTOM,
severity = SUGGESTION,
tags = STYLE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import static com.google.errorprone.BugPattern.LinkType.CUSTOM;
import static com.google.errorprone.BugPattern.SeverityLevel.SUGGESTION;
import static com.google.errorprone.BugPattern.StandardTags.STYLE;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.common.base.VerifyException;
Expand Down Expand Up @@ -52,7 +53,7 @@
@AutoService(BugChecker.class)
@BugPattern(
summary = "Prefer method references over lambda expressions",
link = "https://error-prone.picnic.tech/bugpatterns/MethodReferenceUsage",
link = BASE_URL_BUGPATTERNS + "MethodReferenceUsage",
linkType = CUSTOM,
severity = SUGGESTION,
tags = STYLE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import static com.google.errorprone.matchers.Matchers.annotations;
import static com.google.errorprone.matchers.Matchers.anyOf;
import static com.google.errorprone.matchers.Matchers.isType;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.errorprone.BugPattern;
Expand All @@ -25,7 +26,7 @@
@AutoService(BugChecker.class)
@BugPattern(
summary = "The Refaster template contains a method without any Refaster annotations",
link = "https://error-prone.picnic.tech/bugpatterns/MissingRefasterAnnotation",
link = BASE_URL_BUGPATTERNS + "MissingRefasterAnnotation",
linkType = CUSTOM,
severity = WARNING,
tags = LIKELY_ERROR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import static com.google.errorprone.BugPattern.SeverityLevel.SUGGESTION;
import static com.google.errorprone.BugPattern.StandardTags.SIMPLIFICATION;
import static com.google.errorprone.matchers.Matchers.staticMethod;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.common.collect.Iterables;
Expand All @@ -26,7 +27,7 @@
@AutoService(BugChecker.class)
@BugPattern(
summary = "Don't unnecessarily use Mockito's `eq(...)`",
link = "https://error-prone.picnic.tech/bugpatterns/MockitoStubbing",
link = BASE_URL_BUGPATTERNS + "MockitoStubbing",
linkType = CUSTOM,
severity = SUGGESTION,
tags = SIMPLIFICATION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static com.google.errorprone.BugPattern.LinkType.CUSTOM;
import static com.google.errorprone.BugPattern.SeverityLevel.WARNING;
import static com.google.errorprone.BugPattern.StandardTags.FRAGILE_CODE;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.common.collect.Iterables;
Expand All @@ -25,7 +26,7 @@
@BugPattern(
summary =
"Avoid nesting `Optional`s inside `Optional`s; the resultant code is hard to reason about",
link = "https://error-prone.picnic.tech/bugpatterns/NestedOptionals",
link = BASE_URL_BUGPATTERNS + "NestedOptionals",
linkType = CUSTOM,
severity = WARNING,
tags = FRAGILE_CODE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import static com.google.errorprone.BugPattern.StandardTags.SIMPLIFICATION;
import static com.google.errorprone.matchers.Matchers.anyOf;
import static com.google.errorprone.matchers.Matchers.instanceMethod;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.errorprone.BugPattern;
Expand All @@ -28,7 +29,7 @@
@AutoService(BugChecker.class)
@BugPattern(
summary = "Avoid vacuous operations on known non-empty `Mono`s",
link = "https://error-prone.picnic.tech/bugpatterns/NonEmptyMono",
link = BASE_URL_BUGPATTERNS + "NonEmptyMono",
linkType = CUSTOM,
severity = WARNING,
tags = SIMPLIFICATION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import static com.google.errorprone.matchers.method.MethodMatchers.instanceMethod;
import static com.google.errorprone.matchers.method.MethodMatchers.staticMethod;
import static java.util.stream.Collectors.joining;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.common.base.VerifyException;
Expand Down Expand Up @@ -44,7 +45,7 @@
summary =
"Ensure invocations of `Comparator#comparing{,Double,Int,Long}` match the return type"
+ " of the provided function",
link = "https://error-prone.picnic.tech/bugpatterns/PrimitiveComparison",
link = BASE_URL_BUGPATTERNS + "PrimitiveComparison",
linkType = CUSTOM,
severity = WARNING,
tags = PERFORMANCE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import static com.google.errorprone.matchers.Matchers.not;
import static com.google.errorprone.matchers.method.MethodMatchers.instanceMethod;
import static com.google.errorprone.matchers.method.MethodMatchers.staticMethod;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.common.collect.ImmutableList;
Expand Down Expand Up @@ -55,7 +56,7 @@
@AutoService(BugChecker.class)
@BugPattern(
summary = "Avoid redundant string conversions when possible",
link = "https://error-prone.picnic.tech/bugpatterns/RedundantStringConversion",
link = BASE_URL_BUGPATTERNS + "RedundantStringConversion",
linkType = CUSTOM,
severity = SUGGESTION,
tags = SIMPLIFICATION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import static com.google.errorprone.BugPattern.SeverityLevel.SUGGESTION;
import static com.google.errorprone.BugPattern.StandardTags.SIMPLIFICATION;
import static com.google.errorprone.matchers.method.MethodMatchers.staticMethod;
import static tech.picnic.errorprone.bugpatterns.util.Documentation.BASE_URL_BUGPATTERNS;

import com.google.auto.service.AutoService;
import com.google.errorprone.BugPattern;
Expand All @@ -27,7 +28,7 @@
@AutoService(BugChecker.class)
@BugPattern(
summary = "`Refaster#anyOf` should be passed at least two parameters",
link = "https://error-prone.picnic.tech/bugpatterns/RefasterAnyOfUsage",
link = BASE_URL_BUGPATTERNS + "RefasterAnyOfUsage",
linkType = CUSTOM,
severity = SUGGESTION,
tags = SIMPLIFICATION)
Expand Down
Loading

0 comments on commit b68ba62

Please sign in to comment.