From 556444428888aff1b9567ce81010747a0b24144a Mon Sep 17 00:00:00 2001 From: Rick Ossendrijver Date: Mon, 26 Feb 2024 11:40:31 +0100 Subject: [PATCH] Exempt `picocli.CommandLine.Option#names` annotation from sorting --- .../LexicographicalAnnotationAttributeListing.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/LexicographicalAnnotationAttributeListing.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/LexicographicalAnnotationAttributeListing.java index c3d7051274f..e4812e171ae 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/LexicographicalAnnotationAttributeListing.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/LexicographicalAnnotationAttributeListing.java @@ -67,14 +67,15 @@ public final class LexicographicalAnnotationAttributeListing extends BugChecker private static final long serialVersionUID = 1L; private static final ImmutableSet BLACKLISTED_ANNOTATIONS = ImmutableSet.of( - // XXX: unless JsonPropertyOrder#alphabetic is true... + // XXX: Unless `JsonPropertyOrder#alphabetic` is true... "com.fasterxml.jackson.annotation.JsonPropertyOrder#value", "io.swagger.annotations.ApiImplicitParams#value", "io.swagger.v3.oas.annotations.Parameters#value", "javax.xml.bind.annotation.XmlType#propOrder", "org.springframework.context.annotation.PropertySource#value", "org.springframework.test.context.TestPropertySource#locations", - "org.springframework.test.context.TestPropertySource#value"); + "org.springframework.test.context.TestPropertySource#value", + "picocli.CommandLine.Option#names"); private static final String FLAG_PREFIX = "LexicographicalAnnotationAttributeListing:"; private static final String INCLUDED_ANNOTATIONS_FLAG = FLAG_PREFIX + "Includes"; private static final String EXCLUDED_ANNOTATIONS_FLAG = FLAG_PREFIX + "Excludes";