From 32afee0f2b4901229b8980c940396211d52be9ec Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Tue, 23 Apr 2024 09:12:53 +0000 Subject: [PATCH] refactor: Prefix RSPEC identifiers with capital S Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.text.FindAndReplace?organizationId=T3BlblJld3JpdGU%3D Co-authored-by: Moderne --- .../staticanalysis/AddSerialVersionUidToSerializable.java | 2 +- .../staticanalysis/AtomicPrimitiveEqualsUsesGet.java | 2 +- .../staticanalysis/AvoidBoxedBooleanExpressions.java | 2 +- .../staticanalysis/BigDecimalDoubleConstructor.java | 2 +- .../staticanalysis/BigDecimalRoundingConstantsToEnums.java | 2 +- .../staticanalysis/BooleanChecksNotInverted.java | 2 +- .../CaseInsensitiveComparisonsDoNotChangeCase.java | 2 +- .../openrewrite/staticanalysis/CatchClauseOnlyRethrows.java | 2 +- .../staticanalysis/CombineSemanticallyEqualCatchBlocks.java | 2 +- .../staticanalysis/CompareEnumsWithEqualityOperator.java | 2 +- .../openrewrite/staticanalysis/ControlFlowIndentation.java | 2 +- .../org/openrewrite/staticanalysis/CovariantEquals.java | 2 +- .../org/openrewrite/staticanalysis/DefaultComesLast.java | 2 +- .../java/org/openrewrite/staticanalysis/EmptyBlock.java | 2 +- .../org/openrewrite/staticanalysis/EqualsAvoidsNull.java | 2 +- .../openrewrite/staticanalysis/ExplicitInitialization.java | 2 +- .../staticanalysis/ExplicitLambdaArgumentTypes.java | 2 +- .../staticanalysis/ExternalizableHasNoArgsConstructor.java | 2 +- .../java/org/openrewrite/staticanalysis/FallThrough.java | 2 +- .../java/org/openrewrite/staticanalysis/FinalClass.java | 2 +- .../staticanalysis/FixStringFormatExpressions.java | 2 +- .../staticanalysis/ForLoopIncrementInUpdate.java | 2 +- .../java/org/openrewrite/staticanalysis/HiddenField.java | 2 +- .../staticanalysis/HideUtilityClassConstructor.java | 2 +- .../IndexOfChecksShouldUseAStartPosition.java | 2 +- .../staticanalysis/IndexOfReplaceableByContains.java | 2 +- .../IndexOfShouldNotCompareGreaterThanZero.java | 2 +- .../java/org/openrewrite/staticanalysis/InlineVariable.java | 2 +- .../staticanalysis/IsEmptyCallOnCollections.java | 2 +- .../org/openrewrite/staticanalysis/LowercasePackage.java | 2 +- .../org/openrewrite/staticanalysis/MethodNameCasing.java | 2 +- .../org/openrewrite/staticanalysis/MinimumSwitchCases.java | 2 +- .../staticanalysis/MissingOverrideAnnotation.java | 2 +- .../java/org/openrewrite/staticanalysis/ModifierOrder.java | 2 +- .../staticanalysis/MultipleVariableDeclarations.java | 2 +- .../java/org/openrewrite/staticanalysis/NeedBraces.java | 2 +- .../openrewrite/staticanalysis/NestedEnumsAreNotStatic.java | 2 +- .../NewStringBuilderBufferWithCharArgument.java | 2 +- .../staticanalysis/NoDoubleBraceInitialization.java | 2 +- .../staticanalysis/NoEmptyCollectionWithRawType.java | 2 +- .../staticanalysis/NoEqualityInForCondition.java | 2 +- .../java/org/openrewrite/staticanalysis/NoFinalizer.java | 2 +- .../NoPrimitiveWrappersForToStringOrCompareTo.java | 2 +- .../staticanalysis/NoRedundantJumpStatements.java | 2 +- .../openrewrite/staticanalysis/NoToStringOnStringType.java | 2 +- .../openrewrite/staticanalysis/NoValueOfOnStringType.java | 2 +- .../staticanalysis/ObjectFinalizeCallsSuper.java | 2 +- .../PrimitiveWrapperClassConstructorToValueOf.java | 2 +- .../staticanalysis/ReferentialEqualityToObjectEquals.java | 2 +- .../staticanalysis/RemoveCallsToObjectFinalize.java | 2 +- .../openrewrite/staticanalysis/RemoveCallsToSystemGc.java | 2 +- .../openrewrite/staticanalysis/RemoveExtraSemicolons.java | 2 +- .../RemoveHashCodeCallsFromArrayInstances.java | 2 +- .../openrewrite/staticanalysis/RemoveRedundantTypeCast.java | 2 +- .../RemoveToStringCallsFromArrayInstances.java | 2 +- .../staticanalysis/RemoveUnusedLocalVariables.java | 2 +- .../staticanalysis/RemoveUnusedPrivateFields.java | 6 +++--- .../staticanalysis/RemoveUnusedPrivateMethods.java | 2 +- .../staticanalysis/RenameLocalVariablesToCamelCase.java | 2 +- .../RenameMethodsNamedHashcodeEqualOrTostring.java | 2 +- .../staticanalysis/RenamePrivateFieldsToCamelCase.java | 2 +- .../staticanalysis/ReplaceDuplicateStringLiterals.java | 2 +- .../staticanalysis/ReplaceLambdaWithMethodReference.java | 2 +- .../openrewrite/staticanalysis/ReplaceWeekYearWithYear.java | 2 +- .../staticanalysis/SimplifyBooleanExpression.java | 2 +- .../openrewrite/staticanalysis/SimplifyBooleanReturn.java | 2 +- .../openrewrite/staticanalysis/StaticMethodNotFinal.java | 2 +- .../openrewrite/staticanalysis/StringLiteralEquality.java | 4 ++-- .../staticanalysis/TernaryOperatorsShouldNotBeNested.java | 2 +- .../staticanalysis/UnnecessaryCloseInTryWithResources.java | 2 +- .../openrewrite/staticanalysis/UnnecessaryParentheses.java | 2 +- .../staticanalysis/UnnecessaryPrimitiveAnnotations.java | 2 +- .../org/openrewrite/staticanalysis/UnnecessaryThrows.java | 2 +- .../staticanalysis/UpperCaseLiteralSuffixes.java | 2 +- .../openrewrite/staticanalysis/UseCollectionInterfaces.java | 2 +- .../org/openrewrite/staticanalysis/UseDiamondOperator.java | 2 +- .../staticanalysis/UseJavaStyleArrayDeclarations.java | 2 +- .../staticanalysis/UseLambdaForFunctionalInterface.java | 2 +- .../org/openrewrite/staticanalysis/UseObjectNotifyAll.java | 2 +- .../org/openrewrite/staticanalysis/UseStringReplace.java | 4 ++-- .../org/openrewrite/staticanalysis/WhileInsteadOfFor.java | 2 +- .../staticanalysis/WriteOctalValuesAsDecimal.java | 2 +- src/main/resources/META-INF/rewrite/static-analysis.yml | 4 ++-- 83 files changed, 88 insertions(+), 88 deletions(-) diff --git a/src/main/java/org/openrewrite/staticanalysis/AddSerialVersionUidToSerializable.java b/src/main/java/org/openrewrite/staticanalysis/AddSerialVersionUidToSerializable.java index 56e29ac08..6b75b8511 100644 --- a/src/main/java/org/openrewrite/staticanalysis/AddSerialVersionUidToSerializable.java +++ b/src/main/java/org/openrewrite/staticanalysis/AddSerialVersionUidToSerializable.java @@ -48,7 +48,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-2057"); + return Collections.singleton("RSPEC-S2057"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/AtomicPrimitiveEqualsUsesGet.java b/src/main/java/org/openrewrite/staticanalysis/AtomicPrimitiveEqualsUsesGet.java index e1efc9a5a..99649ef95 100644 --- a/src/main/java/org/openrewrite/staticanalysis/AtomicPrimitiveEqualsUsesGet.java +++ b/src/main/java/org/openrewrite/staticanalysis/AtomicPrimitiveEqualsUsesGet.java @@ -53,7 +53,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-2204"); + return Collections.singleton("RSPEC-S2204"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/AvoidBoxedBooleanExpressions.java b/src/main/java/org/openrewrite/staticanalysis/AvoidBoxedBooleanExpressions.java index 830081557..257ea9015 100644 --- a/src/main/java/org/openrewrite/staticanalysis/AvoidBoxedBooleanExpressions.java +++ b/src/main/java/org/openrewrite/staticanalysis/AvoidBoxedBooleanExpressions.java @@ -42,7 +42,7 @@ public String getDescription() { @Override public Set getTags() { - return singleton("RSPEC-5411"); + return singleton("RSPEC-S5411"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/BigDecimalDoubleConstructor.java b/src/main/java/org/openrewrite/staticanalysis/BigDecimalDoubleConstructor.java index 775c038e1..fc9288908 100644 --- a/src/main/java/org/openrewrite/staticanalysis/BigDecimalDoubleConstructor.java +++ b/src/main/java/org/openrewrite/staticanalysis/BigDecimalDoubleConstructor.java @@ -27,7 +27,7 @@ "For example writing `new BigDecimal(0.1)` does not create a `BigDecimal` which is exactly equal to `0.1`, " + "but it is equal to `0.1000000000000000055511151231257827021181583404541015625`. " + "This is because `0.1` cannot be represented exactly as a double (or, for that matter, as a binary fraction of any finite length).", - tags = {"RSPEC-2111"} + tags = {"RSPEC-S2111"} ) public class BigDecimalDoubleConstructor { diff --git a/src/main/java/org/openrewrite/staticanalysis/BigDecimalRoundingConstantsToEnums.java b/src/main/java/org/openrewrite/staticanalysis/BigDecimalRoundingConstantsToEnums.java index 7e9d8ceba..ce690768a 100644 --- a/src/main/java/org/openrewrite/staticanalysis/BigDecimalRoundingConstantsToEnums.java +++ b/src/main/java/org/openrewrite/staticanalysis/BigDecimalRoundingConstantsToEnums.java @@ -49,7 +49,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-2111"); + return Collections.singleton("RSPEC-S2111"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/BooleanChecksNotInverted.java b/src/main/java/org/openrewrite/staticanalysis/BooleanChecksNotInverted.java index a88e6f562..66881993f 100644 --- a/src/main/java/org/openrewrite/staticanalysis/BooleanChecksNotInverted.java +++ b/src/main/java/org/openrewrite/staticanalysis/BooleanChecksNotInverted.java @@ -39,7 +39,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1940"); + return Collections.singleton("RSPEC-S1940"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/CaseInsensitiveComparisonsDoNotChangeCase.java b/src/main/java/org/openrewrite/staticanalysis/CaseInsensitiveComparisonsDoNotChangeCase.java index f32a61738..46d1967af 100644 --- a/src/main/java/org/openrewrite/staticanalysis/CaseInsensitiveComparisonsDoNotChangeCase.java +++ b/src/main/java/org/openrewrite/staticanalysis/CaseInsensitiveComparisonsDoNotChangeCase.java @@ -43,7 +43,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1157"); + return Collections.singleton("RSPEC-S1157"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/CatchClauseOnlyRethrows.java b/src/main/java/org/openrewrite/staticanalysis/CatchClauseOnlyRethrows.java index 3e3e0e9d3..9b05e49e8 100755 --- a/src/main/java/org/openrewrite/staticanalysis/CatchClauseOnlyRethrows.java +++ b/src/main/java/org/openrewrite/staticanalysis/CatchClauseOnlyRethrows.java @@ -42,7 +42,7 @@ public String getDescription() { @Override public Set getTags() { - return singleton("RSPEC-2737"); + return singleton("RSPEC-S2737"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/CombineSemanticallyEqualCatchBlocks.java b/src/main/java/org/openrewrite/staticanalysis/CombineSemanticallyEqualCatchBlocks.java index 2cbc4874b..b68c76cab 100644 --- a/src/main/java/org/openrewrite/staticanalysis/CombineSemanticallyEqualCatchBlocks.java +++ b/src/main/java/org/openrewrite/staticanalysis/CombineSemanticallyEqualCatchBlocks.java @@ -45,7 +45,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-2147"); + return Collections.singleton("RSPEC-S2147"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/CompareEnumsWithEqualityOperator.java b/src/main/java/org/openrewrite/staticanalysis/CompareEnumsWithEqualityOperator.java index 236ef90f4..bc95d597c 100644 --- a/src/main/java/org/openrewrite/staticanalysis/CompareEnumsWithEqualityOperator.java +++ b/src/main/java/org/openrewrite/staticanalysis/CompareEnumsWithEqualityOperator.java @@ -40,7 +40,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-4551"); + return Collections.singleton("RSPEC-S4551"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/ControlFlowIndentation.java b/src/main/java/org/openrewrite/staticanalysis/ControlFlowIndentation.java index 0caa747c7..4d784dc9f 100755 --- a/src/main/java/org/openrewrite/staticanalysis/ControlFlowIndentation.java +++ b/src/main/java/org/openrewrite/staticanalysis/ControlFlowIndentation.java @@ -49,7 +49,7 @@ public String getDescription() { @Override public Set getTags() { - return singleton("RSPEC-2681"); + return singleton("RSPEC-S2681"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/CovariantEquals.java b/src/main/java/org/openrewrite/staticanalysis/CovariantEquals.java index 873a238e8..9ed4e4f6a 100644 --- a/src/main/java/org/openrewrite/staticanalysis/CovariantEquals.java +++ b/src/main/java/org/openrewrite/staticanalysis/CovariantEquals.java @@ -40,7 +40,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-2162"); + return Collections.singleton("RSPEC-S2162"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/DefaultComesLast.java b/src/main/java/org/openrewrite/staticanalysis/DefaultComesLast.java index 139c62da4..a8f85e1dc 100644 --- a/src/main/java/org/openrewrite/staticanalysis/DefaultComesLast.java +++ b/src/main/java/org/openrewrite/staticanalysis/DefaultComesLast.java @@ -43,7 +43,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-4524"); + return Collections.singleton("RSPEC-S4524"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/EmptyBlock.java b/src/main/java/org/openrewrite/staticanalysis/EmptyBlock.java index 6cccf403f..0f636271a 100644 --- a/src/main/java/org/openrewrite/staticanalysis/EmptyBlock.java +++ b/src/main/java/org/openrewrite/staticanalysis/EmptyBlock.java @@ -43,7 +43,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-108"); + return Collections.singleton("RSPEC-S108"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/EqualsAvoidsNull.java b/src/main/java/org/openrewrite/staticanalysis/EqualsAvoidsNull.java index 469c53df1..a1d5554a2 100644 --- a/src/main/java/org/openrewrite/staticanalysis/EqualsAvoidsNull.java +++ b/src/main/java/org/openrewrite/staticanalysis/EqualsAvoidsNull.java @@ -43,7 +43,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1132"); + return Collections.singleton("RSPEC-S1132"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/ExplicitInitialization.java b/src/main/java/org/openrewrite/staticanalysis/ExplicitInitialization.java index cc71fe94b..f988d8392 100644 --- a/src/main/java/org/openrewrite/staticanalysis/ExplicitInitialization.java +++ b/src/main/java/org/openrewrite/staticanalysis/ExplicitInitialization.java @@ -48,7 +48,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-3052"); + return Collections.singleton("RSPEC-S3052"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/ExplicitLambdaArgumentTypes.java b/src/main/java/org/openrewrite/staticanalysis/ExplicitLambdaArgumentTypes.java index 1a37cdf6f..9bf1ae0a3 100755 --- a/src/main/java/org/openrewrite/staticanalysis/ExplicitLambdaArgumentTypes.java +++ b/src/main/java/org/openrewrite/staticanalysis/ExplicitLambdaArgumentTypes.java @@ -48,7 +48,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-2211"); + return Collections.singleton("RSPEC-S2211"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/ExternalizableHasNoArgsConstructor.java b/src/main/java/org/openrewrite/staticanalysis/ExternalizableHasNoArgsConstructor.java index 7d122a137..65a833099 100644 --- a/src/main/java/org/openrewrite/staticanalysis/ExternalizableHasNoArgsConstructor.java +++ b/src/main/java/org/openrewrite/staticanalysis/ExternalizableHasNoArgsConstructor.java @@ -51,7 +51,7 @@ public Duration getEstimatedEffortPerOccurrence() { @Override public Set getTags() { - return Collections.singleton("RSPEC-2060"); + return Collections.singleton("RSPEC-S2060"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/FallThrough.java b/src/main/java/org/openrewrite/staticanalysis/FallThrough.java index e12a6e43a..ba23f852f 100644 --- a/src/main/java/org/openrewrite/staticanalysis/FallThrough.java +++ b/src/main/java/org/openrewrite/staticanalysis/FallThrough.java @@ -42,7 +42,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-128"); + return Collections.singleton("RSPEC-S128"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/FinalClass.java b/src/main/java/org/openrewrite/staticanalysis/FinalClass.java index 6310044c5..a0d08973d 100755 --- a/src/main/java/org/openrewrite/staticanalysis/FinalClass.java +++ b/src/main/java/org/openrewrite/staticanalysis/FinalClass.java @@ -38,7 +38,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-2974"); + return Collections.singleton("RSPEC-S2974"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/FixStringFormatExpressions.java b/src/main/java/org/openrewrite/staticanalysis/FixStringFormatExpressions.java index 063474a74..db905298a 100644 --- a/src/main/java/org/openrewrite/staticanalysis/FixStringFormatExpressions.java +++ b/src/main/java/org/openrewrite/staticanalysis/FixStringFormatExpressions.java @@ -45,7 +45,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-3457"); + return Collections.singleton("RSPEC-S3457"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/ForLoopIncrementInUpdate.java b/src/main/java/org/openrewrite/staticanalysis/ForLoopIncrementInUpdate.java index d17db337c..110fac692 100644 --- a/src/main/java/org/openrewrite/staticanalysis/ForLoopIncrementInUpdate.java +++ b/src/main/java/org/openrewrite/staticanalysis/ForLoopIncrementInUpdate.java @@ -46,7 +46,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1994"); + return Collections.singleton("RSPEC-S1994"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/HiddenField.java b/src/main/java/org/openrewrite/staticanalysis/HiddenField.java index 77ed5bb37..0a2b13286 100644 --- a/src/main/java/org/openrewrite/staticanalysis/HiddenField.java +++ b/src/main/java/org/openrewrite/staticanalysis/HiddenField.java @@ -43,7 +43,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1117"); + return Collections.singleton("RSPEC-S1117"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/HideUtilityClassConstructor.java b/src/main/java/org/openrewrite/staticanalysis/HideUtilityClassConstructor.java index 5249a11c2..43026d399 100644 --- a/src/main/java/org/openrewrite/staticanalysis/HideUtilityClassConstructor.java +++ b/src/main/java/org/openrewrite/staticanalysis/HideUtilityClassConstructor.java @@ -44,7 +44,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1118"); + return Collections.singleton("RSPEC-S1118"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/IndexOfChecksShouldUseAStartPosition.java b/src/main/java/org/openrewrite/staticanalysis/IndexOfChecksShouldUseAStartPosition.java index 3d3a6d077..8912e88dd 100644 --- a/src/main/java/org/openrewrite/staticanalysis/IndexOfChecksShouldUseAStartPosition.java +++ b/src/main/java/org/openrewrite/staticanalysis/IndexOfChecksShouldUseAStartPosition.java @@ -43,7 +43,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-2912"); + return Collections.singleton("RSPEC-S2912"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/IndexOfReplaceableByContains.java b/src/main/java/org/openrewrite/staticanalysis/IndexOfReplaceableByContains.java index d57353119..868df23ec 100644 --- a/src/main/java/org/openrewrite/staticanalysis/IndexOfReplaceableByContains.java +++ b/src/main/java/org/openrewrite/staticanalysis/IndexOfReplaceableByContains.java @@ -43,7 +43,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-2692"); + return Collections.singleton("RSPEC-S2692"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/IndexOfShouldNotCompareGreaterThanZero.java b/src/main/java/org/openrewrite/staticanalysis/IndexOfShouldNotCompareGreaterThanZero.java index e0e701d25..bed28337b 100644 --- a/src/main/java/org/openrewrite/staticanalysis/IndexOfShouldNotCompareGreaterThanZero.java +++ b/src/main/java/org/openrewrite/staticanalysis/IndexOfShouldNotCompareGreaterThanZero.java @@ -46,7 +46,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-2692"); + return Collections.singleton("RSPEC-S2692"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/InlineVariable.java b/src/main/java/org/openrewrite/staticanalysis/InlineVariable.java index da63cfaf1..8e3714663 100644 --- a/src/main/java/org/openrewrite/staticanalysis/InlineVariable.java +++ b/src/main/java/org/openrewrite/staticanalysis/InlineVariable.java @@ -47,7 +47,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1488"); + return Collections.singleton("RSPEC-S1488"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/IsEmptyCallOnCollections.java b/src/main/java/org/openrewrite/staticanalysis/IsEmptyCallOnCollections.java index 7f1e8d12c..9b2bb5eb9 100755 --- a/src/main/java/org/openrewrite/staticanalysis/IsEmptyCallOnCollections.java +++ b/src/main/java/org/openrewrite/staticanalysis/IsEmptyCallOnCollections.java @@ -48,7 +48,7 @@ public String getDescription() { @Override public Set getTags() { - return new LinkedHashSet<>(Arrays.asList("RSPEC-1155", "RSPEC-3981")); + return new LinkedHashSet<>(Arrays.asList("RSPEC-S1155", "RSPEC-S3981")); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/LowercasePackage.java b/src/main/java/org/openrewrite/staticanalysis/LowercasePackage.java index 326c41f4a..f465ccb92 100644 --- a/src/main/java/org/openrewrite/staticanalysis/LowercasePackage.java +++ b/src/main/java/org/openrewrite/staticanalysis/LowercasePackage.java @@ -44,7 +44,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-120"); + return Collections.singleton("RSPEC-S120"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/MethodNameCasing.java b/src/main/java/org/openrewrite/staticanalysis/MethodNameCasing.java index abcbcf899..ca0fef805 100644 --- a/src/main/java/org/openrewrite/staticanalysis/MethodNameCasing.java +++ b/src/main/java/org/openrewrite/staticanalysis/MethodNameCasing.java @@ -66,7 +66,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-100"); + return Collections.singleton("RSPEC-S100"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/MinimumSwitchCases.java b/src/main/java/org/openrewrite/staticanalysis/MinimumSwitchCases.java index b4fbcb1d9..02a0d9ee9 100644 --- a/src/main/java/org/openrewrite/staticanalysis/MinimumSwitchCases.java +++ b/src/main/java/org/openrewrite/staticanalysis/MinimumSwitchCases.java @@ -53,7 +53,7 @@ public String getDescription() { @Override public Set getTags() { - return singleton("RSPEC-1301"); + return singleton("RSPEC-S1301"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/MissingOverrideAnnotation.java b/src/main/java/org/openrewrite/staticanalysis/MissingOverrideAnnotation.java index 3d5150c2f..c9c157b0c 100644 --- a/src/main/java/org/openrewrite/staticanalysis/MissingOverrideAnnotation.java +++ b/src/main/java/org/openrewrite/staticanalysis/MissingOverrideAnnotation.java @@ -55,7 +55,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1161"); + return Collections.singleton("RSPEC-S1161"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/ModifierOrder.java b/src/main/java/org/openrewrite/staticanalysis/ModifierOrder.java index 441bee9a0..a70a063ca 100644 --- a/src/main/java/org/openrewrite/staticanalysis/ModifierOrder.java +++ b/src/main/java/org/openrewrite/staticanalysis/ModifierOrder.java @@ -45,7 +45,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1124"); + return Collections.singleton("RSPEC-S1124"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/MultipleVariableDeclarations.java b/src/main/java/org/openrewrite/staticanalysis/MultipleVariableDeclarations.java index 5ee40c229..25fa71320 100644 --- a/src/main/java/org/openrewrite/staticanalysis/MultipleVariableDeclarations.java +++ b/src/main/java/org/openrewrite/staticanalysis/MultipleVariableDeclarations.java @@ -39,7 +39,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1659"); + return Collections.singleton("RSPEC-S1659"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/NeedBraces.java b/src/main/java/org/openrewrite/staticanalysis/NeedBraces.java index 0a714248e..9c9adf6ed 100644 --- a/src/main/java/org/openrewrite/staticanalysis/NeedBraces.java +++ b/src/main/java/org/openrewrite/staticanalysis/NeedBraces.java @@ -46,7 +46,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-121"); + return Collections.singleton("RSPEC-S121"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/NestedEnumsAreNotStatic.java b/src/main/java/org/openrewrite/staticanalysis/NestedEnumsAreNotStatic.java index 0a187a95c..180e9c84f 100644 --- a/src/main/java/org/openrewrite/staticanalysis/NestedEnumsAreNotStatic.java +++ b/src/main/java/org/openrewrite/staticanalysis/NestedEnumsAreNotStatic.java @@ -41,7 +41,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-2786"); + return Collections.singleton("RSPEC-S2786"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/NewStringBuilderBufferWithCharArgument.java b/src/main/java/org/openrewrite/staticanalysis/NewStringBuilderBufferWithCharArgument.java index 45ca09382..296a36766 100644 --- a/src/main/java/org/openrewrite/staticanalysis/NewStringBuilderBufferWithCharArgument.java +++ b/src/main/java/org/openrewrite/staticanalysis/NewStringBuilderBufferWithCharArgument.java @@ -47,7 +47,7 @@ public Duration getEstimatedEffortPerOccurrence() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1317"); + return Collections.singleton("RSPEC-S1317"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/NoDoubleBraceInitialization.java b/src/main/java/org/openrewrite/staticanalysis/NoDoubleBraceInitialization.java index 2b90b5a08..ecd07ebe6 100644 --- a/src/main/java/org/openrewrite/staticanalysis/NoDoubleBraceInitialization.java +++ b/src/main/java/org/openrewrite/staticanalysis/NoDoubleBraceInitialization.java @@ -46,7 +46,7 @@ public String getDescription() { @Override public Set getTags() { - return new LinkedHashSet<>(Arrays.asList("RSPEC-1171", "RSPEC-3599")); + return new LinkedHashSet<>(Arrays.asList("RSPEC-S1171", "RSPEC-S3599")); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/NoEmptyCollectionWithRawType.java b/src/main/java/org/openrewrite/staticanalysis/NoEmptyCollectionWithRawType.java index 2cb8f3727..a3b22fcd8 100644 --- a/src/main/java/org/openrewrite/staticanalysis/NoEmptyCollectionWithRawType.java +++ b/src/main/java/org/openrewrite/staticanalysis/NoEmptyCollectionWithRawType.java @@ -47,7 +47,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1596"); + return Collections.singleton("RSPEC-S1596"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/NoEqualityInForCondition.java b/src/main/java/org/openrewrite/staticanalysis/NoEqualityInForCondition.java index 05b1095e5..edba8b70a 100644 --- a/src/main/java/org/openrewrite/staticanalysis/NoEqualityInForCondition.java +++ b/src/main/java/org/openrewrite/staticanalysis/NoEqualityInForCondition.java @@ -39,7 +39,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-888"); + return Collections.singleton("RSPEC-S888"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/NoFinalizer.java b/src/main/java/org/openrewrite/staticanalysis/NoFinalizer.java index 565bebbce..f50acdd49 100644 --- a/src/main/java/org/openrewrite/staticanalysis/NoFinalizer.java +++ b/src/main/java/org/openrewrite/staticanalysis/NoFinalizer.java @@ -40,7 +40,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1111"); + return Collections.singleton("RSPEC-S1111"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/NoPrimitiveWrappersForToStringOrCompareTo.java b/src/main/java/org/openrewrite/staticanalysis/NoPrimitiveWrappersForToStringOrCompareTo.java index fa22b683a..4e32ff2ff 100644 --- a/src/main/java/org/openrewrite/staticanalysis/NoPrimitiveWrappersForToStringOrCompareTo.java +++ b/src/main/java/org/openrewrite/staticanalysis/NoPrimitiveWrappersForToStringOrCompareTo.java @@ -54,7 +54,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1158"); + return Collections.singleton("RSPEC-S1158"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/NoRedundantJumpStatements.java b/src/main/java/org/openrewrite/staticanalysis/NoRedundantJumpStatements.java index cd010ff7b..dfcf1b100 100644 --- a/src/main/java/org/openrewrite/staticanalysis/NoRedundantJumpStatements.java +++ b/src/main/java/org/openrewrite/staticanalysis/NoRedundantJumpStatements.java @@ -43,7 +43,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-3626"); + return Collections.singleton("RSPEC-S3626"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/NoToStringOnStringType.java b/src/main/java/org/openrewrite/staticanalysis/NoToStringOnStringType.java index 85b32a502..cd45f50a8 100644 --- a/src/main/java/org/openrewrite/staticanalysis/NoToStringOnStringType.java +++ b/src/main/java/org/openrewrite/staticanalysis/NoToStringOnStringType.java @@ -43,7 +43,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1858"); + return Collections.singleton("RSPEC-S1858"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/NoValueOfOnStringType.java b/src/main/java/org/openrewrite/staticanalysis/NoValueOfOnStringType.java index 0e922a16a..123801262 100644 --- a/src/main/java/org/openrewrite/staticanalysis/NoValueOfOnStringType.java +++ b/src/main/java/org/openrewrite/staticanalysis/NoValueOfOnStringType.java @@ -49,7 +49,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1153"); + return Collections.singleton("RSPEC-S1153"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/ObjectFinalizeCallsSuper.java b/src/main/java/org/openrewrite/staticanalysis/ObjectFinalizeCallsSuper.java index 488fbbeb9..e75a49225 100644 --- a/src/main/java/org/openrewrite/staticanalysis/ObjectFinalizeCallsSuper.java +++ b/src/main/java/org/openrewrite/staticanalysis/ObjectFinalizeCallsSuper.java @@ -45,7 +45,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1114"); + return Collections.singleton("RSPEC-S1114"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/PrimitiveWrapperClassConstructorToValueOf.java b/src/main/java/org/openrewrite/staticanalysis/PrimitiveWrapperClassConstructorToValueOf.java index 3fc20580d..5b69c1ed5 100644 --- a/src/main/java/org/openrewrite/staticanalysis/PrimitiveWrapperClassConstructorToValueOf.java +++ b/src/main/java/org/openrewrite/staticanalysis/PrimitiveWrapperClassConstructorToValueOf.java @@ -45,7 +45,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-2129"); + return Collections.singleton("RSPEC-S2129"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/ReferentialEqualityToObjectEquals.java b/src/main/java/org/openrewrite/staticanalysis/ReferentialEqualityToObjectEquals.java index 102e6145a..f1ce4e83c 100644 --- a/src/main/java/org/openrewrite/staticanalysis/ReferentialEqualityToObjectEquals.java +++ b/src/main/java/org/openrewrite/staticanalysis/ReferentialEqualityToObjectEquals.java @@ -48,7 +48,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1698"); + return Collections.singleton("RSPEC-S1698"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/RemoveCallsToObjectFinalize.java b/src/main/java/org/openrewrite/staticanalysis/RemoveCallsToObjectFinalize.java index d8d893995..958faafa3 100644 --- a/src/main/java/org/openrewrite/staticanalysis/RemoveCallsToObjectFinalize.java +++ b/src/main/java/org/openrewrite/staticanalysis/RemoveCallsToObjectFinalize.java @@ -44,7 +44,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1111"); + return Collections.singleton("RSPEC-S1111"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/RemoveCallsToSystemGc.java b/src/main/java/org/openrewrite/staticanalysis/RemoveCallsToSystemGc.java index f8b1c10af..a53b105ed 100644 --- a/src/main/java/org/openrewrite/staticanalysis/RemoveCallsToSystemGc.java +++ b/src/main/java/org/openrewrite/staticanalysis/RemoveCallsToSystemGc.java @@ -45,7 +45,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1215"); + return Collections.singleton("RSPEC-S1215"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/RemoveExtraSemicolons.java b/src/main/java/org/openrewrite/staticanalysis/RemoveExtraSemicolons.java index a17e42eb4..df4489bd0 100644 --- a/src/main/java/org/openrewrite/staticanalysis/RemoveExtraSemicolons.java +++ b/src/main/java/org/openrewrite/staticanalysis/RemoveExtraSemicolons.java @@ -41,7 +41,7 @@ public String getDescription() { @Override public Set getTags() { - return new LinkedHashSet<>(Arrays.asList("RSPEC-1116", "RSPEC-2959")); + return new LinkedHashSet<>(Arrays.asList("RSPEC-S1116", "RSPEC-S2959")); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/RemoveHashCodeCallsFromArrayInstances.java b/src/main/java/org/openrewrite/staticanalysis/RemoveHashCodeCallsFromArrayInstances.java index fa01557bd..09f9bfdce 100644 --- a/src/main/java/org/openrewrite/staticanalysis/RemoveHashCodeCallsFromArrayInstances.java +++ b/src/main/java/org/openrewrite/staticanalysis/RemoveHashCodeCallsFromArrayInstances.java @@ -46,7 +46,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-2116"); + return Collections.singleton("RSPEC-S2116"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/RemoveRedundantTypeCast.java b/src/main/java/org/openrewrite/staticanalysis/RemoveRedundantTypeCast.java index f39ba0a8f..1a53b8d60 100644 --- a/src/main/java/org/openrewrite/staticanalysis/RemoveRedundantTypeCast.java +++ b/src/main/java/org/openrewrite/staticanalysis/RemoveRedundantTypeCast.java @@ -45,7 +45,7 @@ public Duration getEstimatedEffortPerOccurrence() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1905"); + return Collections.singleton("RSPEC-S1905"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/RemoveToStringCallsFromArrayInstances.java b/src/main/java/org/openrewrite/staticanalysis/RemoveToStringCallsFromArrayInstances.java index 18d18db48..1b88c38cd 100644 --- a/src/main/java/org/openrewrite/staticanalysis/RemoveToStringCallsFromArrayInstances.java +++ b/src/main/java/org/openrewrite/staticanalysis/RemoveToStringCallsFromArrayInstances.java @@ -48,7 +48,7 @@ public class RemoveToStringCallsFromArrayInstances extends Recipe { @Override public Set getTags() { - return Collections.singleton("RSPEC-2116"); + return Collections.singleton("RSPEC-S2116"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/RemoveUnusedLocalVariables.java b/src/main/java/org/openrewrite/staticanalysis/RemoveUnusedLocalVariables.java index 89a784982..5f297ed16 100644 --- a/src/main/java/org/openrewrite/staticanalysis/RemoveUnusedLocalVariables.java +++ b/src/main/java/org/openrewrite/staticanalysis/RemoveUnusedLocalVariables.java @@ -56,7 +56,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1481"); + return Collections.singleton("RSPEC-S1481"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/RemoveUnusedPrivateFields.java b/src/main/java/org/openrewrite/staticanalysis/RemoveUnusedPrivateFields.java index 0bf95213f..137342669 100644 --- a/src/main/java/org/openrewrite/staticanalysis/RemoveUnusedPrivateFields.java +++ b/src/main/java/org/openrewrite/staticanalysis/RemoveUnusedPrivateFields.java @@ -53,7 +53,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1068"); + return Collections.singleton("RSPEC-S1068"); } @Override @@ -90,7 +90,7 @@ public J.ClassDeclaration visitClassDeclaration(J.ClassDeclaration classDecl, Ex Statement statement = statements.get(i); if (statement instanceof J.VariableDeclarations) { J.VariableDeclarations vd = (J.VariableDeclarations) statement; - // RSPEC-1068 does not apply serialVersionUID of Serializable classes, or fields with annotations. + // RSPEC-S1068 does not apply serialVersionUID of Serializable classes, or fields with annotations. if (!(skipSerialVersionUID && isSerialVersionUid(vd)) && vd.getLeadingAnnotations().isEmpty() && vd.hasModifier(J.Modifier.Type.Private)) { @@ -98,7 +98,7 @@ public J.ClassDeclaration visitClassDeclaration(J.ClassDeclaration classDecl, Ex checkFields.add(new CheckField(vd, nextStatement)); } } else if (statement instanceof J.MethodDeclaration) { - // RSPEC-1068 does not apply fields from classes with native methods. + // RSPEC-S1068 does not apply fields from classes with native methods. J.MethodDeclaration md = (J.MethodDeclaration) statement; if (md.hasModifier(J.Modifier.Type.Native)) { return cd; diff --git a/src/main/java/org/openrewrite/staticanalysis/RemoveUnusedPrivateMethods.java b/src/main/java/org/openrewrite/staticanalysis/RemoveUnusedPrivateMethods.java index b3ccb3eba..de4cf3090 100644 --- a/src/main/java/org/openrewrite/staticanalysis/RemoveUnusedPrivateMethods.java +++ b/src/main/java/org/openrewrite/staticanalysis/RemoveUnusedPrivateMethods.java @@ -42,7 +42,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1144"); + return Collections.singleton("RSPEC-S1144"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/RenameLocalVariablesToCamelCase.java b/src/main/java/org/openrewrite/staticanalysis/RenameLocalVariablesToCamelCase.java index baa08a507..0247ca1d2 100644 --- a/src/main/java/org/openrewrite/staticanalysis/RenameLocalVariablesToCamelCase.java +++ b/src/main/java/org/openrewrite/staticanalysis/RenameLocalVariablesToCamelCase.java @@ -62,7 +62,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-117"); + return Collections.singleton("RSPEC-S117"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/RenameMethodsNamedHashcodeEqualOrTostring.java b/src/main/java/org/openrewrite/staticanalysis/RenameMethodsNamedHashcodeEqualOrTostring.java index 8de57a6fb..9ad7044f4 100644 --- a/src/main/java/org/openrewrite/staticanalysis/RenameMethodsNamedHashcodeEqualOrTostring.java +++ b/src/main/java/org/openrewrite/staticanalysis/RenameMethodsNamedHashcodeEqualOrTostring.java @@ -48,7 +48,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1221"); + return Collections.singleton("RSPEC-S1221"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/RenamePrivateFieldsToCamelCase.java b/src/main/java/org/openrewrite/staticanalysis/RenamePrivateFieldsToCamelCase.java index 1dd544b2a..3b421a594 100644 --- a/src/main/java/org/openrewrite/staticanalysis/RenamePrivateFieldsToCamelCase.java +++ b/src/main/java/org/openrewrite/staticanalysis/RenamePrivateFieldsToCamelCase.java @@ -62,7 +62,7 @@ public String getDescription() { @Override public Set getTags() { - return new LinkedHashSet<>(Arrays.asList("RSPEC-116", "RSPEC-3008")); + return new LinkedHashSet<>(Arrays.asList("RSPEC-S116", "RSPEC-S3008")); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/ReplaceDuplicateStringLiterals.java b/src/main/java/org/openrewrite/staticanalysis/ReplaceDuplicateStringLiterals.java index 43771be35..aafa8adce 100644 --- a/src/main/java/org/openrewrite/staticanalysis/ReplaceDuplicateStringLiterals.java +++ b/src/main/java/org/openrewrite/staticanalysis/ReplaceDuplicateStringLiterals.java @@ -56,7 +56,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1192"); + return Collections.singleton("RSPEC-S1192"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/ReplaceLambdaWithMethodReference.java b/src/main/java/org/openrewrite/staticanalysis/ReplaceLambdaWithMethodReference.java index c69a5c4f3..873117f44 100644 --- a/src/main/java/org/openrewrite/staticanalysis/ReplaceLambdaWithMethodReference.java +++ b/src/main/java/org/openrewrite/staticanalysis/ReplaceLambdaWithMethodReference.java @@ -43,7 +43,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1612"); + return Collections.singleton("RSPEC-S1612"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/ReplaceWeekYearWithYear.java b/src/main/java/org/openrewrite/staticanalysis/ReplaceWeekYearWithYear.java index a09caa222..ede5bed36 100644 --- a/src/main/java/org/openrewrite/staticanalysis/ReplaceWeekYearWithYear.java +++ b/src/main/java/org/openrewrite/staticanalysis/ReplaceWeekYearWithYear.java @@ -41,7 +41,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-3986"); + return Collections.singleton("RSPEC-S3986"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/SimplifyBooleanExpression.java b/src/main/java/org/openrewrite/staticanalysis/SimplifyBooleanExpression.java index 0390c1bd6..5216ad9bc 100644 --- a/src/main/java/org/openrewrite/staticanalysis/SimplifyBooleanExpression.java +++ b/src/main/java/org/openrewrite/staticanalysis/SimplifyBooleanExpression.java @@ -42,7 +42,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1125"); + return Collections.singleton("RSPEC-S1125"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/SimplifyBooleanReturn.java b/src/main/java/org/openrewrite/staticanalysis/SimplifyBooleanReturn.java index dbb414d34..eefb68bd6 100644 --- a/src/main/java/org/openrewrite/staticanalysis/SimplifyBooleanReturn.java +++ b/src/main/java/org/openrewrite/staticanalysis/SimplifyBooleanReturn.java @@ -49,7 +49,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1126"); + return Collections.singleton("RSPEC-S1126"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/StaticMethodNotFinal.java b/src/main/java/org/openrewrite/staticanalysis/StaticMethodNotFinal.java index cf1f223ab..8d9e613a6 100644 --- a/src/main/java/org/openrewrite/staticanalysis/StaticMethodNotFinal.java +++ b/src/main/java/org/openrewrite/staticanalysis/StaticMethodNotFinal.java @@ -39,7 +39,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-2333"); + return Collections.singleton("RSPEC-S2333"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/StringLiteralEquality.java b/src/main/java/org/openrewrite/staticanalysis/StringLiteralEquality.java index d3e8131ed..87540c7f1 100644 --- a/src/main/java/org/openrewrite/staticanalysis/StringLiteralEquality.java +++ b/src/main/java/org/openrewrite/staticanalysis/StringLiteralEquality.java @@ -46,7 +46,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-4973"); + return Collections.singleton("RSPEC-S4973"); } @Override @@ -57,7 +57,7 @@ public Duration getEstimatedEffortPerOccurrence() { @Override public TreeVisitor getVisitor() { // Don't change for Kotlin because In Kotlin, `==` means structural equality, so it's redundant to call equals(). - // see https://rules.sonarsource.com/kotlin/RSPEC-6519/ + // see https://rules.sonarsource.com/kotlin/RSPEC-S6519/ TreeVisitor preconditions = Preconditions.and( Preconditions.and( Preconditions.not(new KotlinFileChecker<>()), diff --git a/src/main/java/org/openrewrite/staticanalysis/TernaryOperatorsShouldNotBeNested.java b/src/main/java/org/openrewrite/staticanalysis/TernaryOperatorsShouldNotBeNested.java index d2b21d35e..f81a59ecc 100644 --- a/src/main/java/org/openrewrite/staticanalysis/TernaryOperatorsShouldNotBeNested.java +++ b/src/main/java/org/openrewrite/staticanalysis/TernaryOperatorsShouldNotBeNested.java @@ -48,7 +48,7 @@ public String getDescription() { } @Override public Set getTags() { - return Collections.singleton("RSPEC-3358"); + return Collections.singleton("RSPEC-S3358"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/UnnecessaryCloseInTryWithResources.java b/src/main/java/org/openrewrite/staticanalysis/UnnecessaryCloseInTryWithResources.java index 23fb22d7a..2f35fdb0f 100644 --- a/src/main/java/org/openrewrite/staticanalysis/UnnecessaryCloseInTryWithResources.java +++ b/src/main/java/org/openrewrite/staticanalysis/UnnecessaryCloseInTryWithResources.java @@ -45,7 +45,7 @@ public Duration getEstimatedEffortPerOccurrence() { @Override public Set getTags() { - return Collections.singleton("RSPEC-4087"); + return Collections.singleton("RSPEC-S4087"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/UnnecessaryParentheses.java b/src/main/java/org/openrewrite/staticanalysis/UnnecessaryParentheses.java index fdf1bce99..a2f50d1e1 100644 --- a/src/main/java/org/openrewrite/staticanalysis/UnnecessaryParentheses.java +++ b/src/main/java/org/openrewrite/staticanalysis/UnnecessaryParentheses.java @@ -39,7 +39,7 @@ public String getDescription() { @Override public Set getTags() { - return new LinkedHashSet<>(Arrays.asList("RSPEC-1110", "RSPEC-1611")); + return new LinkedHashSet<>(Arrays.asList("RSPEC-S1110", "RSPEC-S1611")); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/UnnecessaryPrimitiveAnnotations.java b/src/main/java/org/openrewrite/staticanalysis/UnnecessaryPrimitiveAnnotations.java index 9a0a66f02..83cd834f9 100644 --- a/src/main/java/org/openrewrite/staticanalysis/UnnecessaryPrimitiveAnnotations.java +++ b/src/main/java/org/openrewrite/staticanalysis/UnnecessaryPrimitiveAnnotations.java @@ -47,7 +47,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-4682"); + return Collections.singleton("RSPEC-S4682"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/UnnecessaryThrows.java b/src/main/java/org/openrewrite/staticanalysis/UnnecessaryThrows.java index 8795536c8..1d63357ce 100644 --- a/src/main/java/org/openrewrite/staticanalysis/UnnecessaryThrows.java +++ b/src/main/java/org/openrewrite/staticanalysis/UnnecessaryThrows.java @@ -48,7 +48,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1130"); + return Collections.singleton("RSPEC-S1130"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/UpperCaseLiteralSuffixes.java b/src/main/java/org/openrewrite/staticanalysis/UpperCaseLiteralSuffixes.java index d0e419ae3..23006a5bb 100644 --- a/src/main/java/org/openrewrite/staticanalysis/UpperCaseLiteralSuffixes.java +++ b/src/main/java/org/openrewrite/staticanalysis/UpperCaseLiteralSuffixes.java @@ -42,7 +42,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-818"); + return Collections.singleton("RSPEC-S818"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/UseCollectionInterfaces.java b/src/main/java/org/openrewrite/staticanalysis/UseCollectionInterfaces.java index faa813322..a087b51b0 100644 --- a/src/main/java/org/openrewrite/staticanalysis/UseCollectionInterfaces.java +++ b/src/main/java/org/openrewrite/staticanalysis/UseCollectionInterfaces.java @@ -48,7 +48,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1319"); + return Collections.singleton("RSPEC-S1319"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/UseDiamondOperator.java b/src/main/java/org/openrewrite/staticanalysis/UseDiamondOperator.java index 9cec97d87..22f339b73 100644 --- a/src/main/java/org/openrewrite/staticanalysis/UseDiamondOperator.java +++ b/src/main/java/org/openrewrite/staticanalysis/UseDiamondOperator.java @@ -45,7 +45,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-2293"); + return Collections.singleton("RSPEC-S2293"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/UseJavaStyleArrayDeclarations.java b/src/main/java/org/openrewrite/staticanalysis/UseJavaStyleArrayDeclarations.java index e34ed4e03..2ee425af3 100644 --- a/src/main/java/org/openrewrite/staticanalysis/UseJavaStyleArrayDeclarations.java +++ b/src/main/java/org/openrewrite/staticanalysis/UseJavaStyleArrayDeclarations.java @@ -44,7 +44,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1197"); + return Collections.singleton("RSPEC-S1197"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/UseLambdaForFunctionalInterface.java b/src/main/java/org/openrewrite/staticanalysis/UseLambdaForFunctionalInterface.java index 6c06a2dcc..bd6367896 100644 --- a/src/main/java/org/openrewrite/staticanalysis/UseLambdaForFunctionalInterface.java +++ b/src/main/java/org/openrewrite/staticanalysis/UseLambdaForFunctionalInterface.java @@ -50,7 +50,7 @@ public String getDescription() { @Override public Set getTags() { - return singleton("RSPEC-1604"); + return singleton("RSPEC-S1604"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/UseObjectNotifyAll.java b/src/main/java/org/openrewrite/staticanalysis/UseObjectNotifyAll.java index 92c6f3fd3..c1b1df39a 100644 --- a/src/main/java/org/openrewrite/staticanalysis/UseObjectNotifyAll.java +++ b/src/main/java/org/openrewrite/staticanalysis/UseObjectNotifyAll.java @@ -43,7 +43,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-2446"); + return Collections.singleton("RSPEC-S2446"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/UseStringReplace.java b/src/main/java/org/openrewrite/staticanalysis/UseStringReplace.java index 35b3d6919..6caad84dc 100644 --- a/src/main/java/org/openrewrite/staticanalysis/UseStringReplace.java +++ b/src/main/java/org/openrewrite/staticanalysis/UseStringReplace.java @@ -39,7 +39,7 @@ * method each time it is called even if the first argument is not a regular expression. This has a significant * performance cost and therefore should be used with care. * - * @see + * @see * @see */ public class UseStringReplace extends Recipe { @@ -57,7 +57,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-5361"); + return Collections.singleton("RSPEC-S5361"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/WhileInsteadOfFor.java b/src/main/java/org/openrewrite/staticanalysis/WhileInsteadOfFor.java index 12077e0ed..b305e5f3c 100644 --- a/src/main/java/org/openrewrite/staticanalysis/WhileInsteadOfFor.java +++ b/src/main/java/org/openrewrite/staticanalysis/WhileInsteadOfFor.java @@ -40,7 +40,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1264"); + return Collections.singleton("RSPEC-S1264"); } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/WriteOctalValuesAsDecimal.java b/src/main/java/org/openrewrite/staticanalysis/WriteOctalValuesAsDecimal.java index d071ab7bd..b9a633fb6 100644 --- a/src/main/java/org/openrewrite/staticanalysis/WriteOctalValuesAsDecimal.java +++ b/src/main/java/org/openrewrite/staticanalysis/WriteOctalValuesAsDecimal.java @@ -38,7 +38,7 @@ public String getDescription() { @Override public Set getTags() { - return Collections.singleton("RSPEC-1314"); + return Collections.singleton("RSPEC-S1314"); } @Override diff --git a/src/main/resources/META-INF/rewrite/static-analysis.yml b/src/main/resources/META-INF/rewrite/static-analysis.yml index 04b740bd8..17fb80e51 100644 --- a/src/main/resources/META-INF/rewrite/static-analysis.yml +++ b/src/main/resources/META-INF/rewrite/static-analysis.yml @@ -50,7 +50,7 @@ recipeList: methodPattern: java.lang.Thread run() newMethodName: start tags: - - RSPEC-1217 + - RSPEC-S1217 --- type: specs.openrewrite.org/v1beta/recipe name: org.openrewrite.staticanalysis.CommonDeclarationSiteTypeVariances @@ -79,4 +79,4 @@ recipeList: excludeBounds: - java.lang.* tags: - - RSPEC-1217 + - RSPEC-S1217