Skip to content

Commit 69d43a5

Browse files
committed
Remove newly redundant CustomImportOrder in favor of OrderImports.
Since openrewrite/rewrite#6761 the CustomImportOrder rule is parsed into the ImportLayout style which is understood and acted upon by OrderImports.
1 parent 21db3b9 commit 69d43a5

6 files changed

Lines changed: 22 additions & 920 deletions

File tree

src/main/java/org/openrewrite/staticanalysis/CustomImportOrder.java

Lines changed: 0 additions & 53 deletions
This file was deleted.

src/main/java/org/openrewrite/staticanalysis/CustomImportOrderVisitor.java

Lines changed: 0 additions & 188 deletions
This file was deleted.

src/main/resources/META-INF/rewrite/common-static-analysis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,5 @@ recipeList:
111111
- org.openrewrite.kotlin.cleanup.EqualsMethodUsage
112112
- org.openrewrite.kotlin.cleanup.ImplicitParameterInLambda
113113
- org.openrewrite.kotlin.cleanup.ReplaceCharToIntWithCode
114-
- org.openrewrite.staticanalysis.CustomImportOrder
114+
# OrderImports responds to ImportLayoutStyle parsed from checkstyle's CustomImportOrder rule
115+
- org.openrewrite.java.OrderImports

src/main/resources/META-INF/rewrite/recipes.csv

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ maven,org.openrewrite.recipe:rewrite-static-analysis,org.openrewrite.staticanaly
2424
maven,org.openrewrite.recipe:rewrite-static-analysis,org.openrewrite.staticanalysis.CompareEnumsWithEqualityOperator,Enum values should be compared with "==",Replaces `Enum equals(java.lang.Object)` with `Enum == java.lang.Object`. An `!Enum equals(java.lang.Object)` will change to `!=`.,1,,Static analysis and remediation,,Remediations for issues identified by SAST tools.,
2525
maven,org.openrewrite.recipe:rewrite-static-analysis,org.openrewrite.staticanalysis.ControlFlowIndentation,Control flow statement indentation,"Program flow control statements like `if`, `while`, and `for` can omit curly braces when they apply to only a single statement. This recipe ensures that any statements which follow that statement are correctly indented to show they are not part of the flow control statement.",1,,Static analysis and remediation,,Remediations for issues identified by SAST tools.,
2626
maven,org.openrewrite.recipe:rewrite-static-analysis,org.openrewrite.staticanalysis.CovariantEquals,Covariant equals,"Checks that classes and records which define a covariant `equals()` method also override method `equals(Object)`. Covariant `equals()` means a method that is similar to `equals(Object)`, but with a covariant parameter type (any subtype of `Object`).",1,,Static analysis and remediation,,Remediations for issues identified by SAST tools.,
27-
maven,org.openrewrite.recipe:rewrite-static-analysis,org.openrewrite.staticanalysis.CustomImportOrder,Custom import order,Updates and reorders Java import declarations according to group and order settings compatible with the Checkstyle 'CustomImportOrder' check.,1,,Static analysis and remediation,,Remediations for issues identified by SAST tools.,
2827
maven,org.openrewrite.recipe:rewrite-static-analysis,org.openrewrite.staticanalysis.DeclarationSiteTypeVariance,Properly use declaration-site type variance,"Currently, Java requires use-site type variance, so if someone has `Function<IN, OUT>` method parameter, it should rather be `Function<? super IN, ? extends OUT>`. Unfortunately, it is not easy to notice that `? super` and `? extends` is missing, so this recipe adds it where that would improve the situation.",1,,Static analysis and remediation,,Remediations for issues identified by SAST tools.,"[{""name"":""variantTypes"",""type"":""List"",""displayName"":""Variant types"",""description"":""A list of well-known classes that have in/out type variance."",""example"":""java.util.function.Function<IN, OUT>"",""required"":true},{""name"":""excludedBounds"",""type"":""List"",""displayName"":""Excluded bounds"",""description"":""A list of bounds that should not receive explicit variance. Globs supported."",""example"":""java.lang.*""},{""name"":""excludeFinalClasses"",""type"":""Boolean"",""displayName"":""Exclude final classes"",""description"":""If true, do not add `? extends` variance to final classes. `? super` variance will be added regardless of finality.""}]"
2928
maven,org.openrewrite.recipe:rewrite-static-analysis,org.openrewrite.staticanalysis.DefaultComesLast,Default comes last,Ensure the `default` case comes last after all the cases in a switch statement.,1,,Static analysis and remediation,,Remediations for issues identified by SAST tools.,
3029
maven,org.openrewrite.recipe:rewrite-static-analysis,org.openrewrite.staticanalysis.EmptyBlock,Remove empty blocks,Remove empty blocks that effectively do nothing.,1,,Static analysis and remediation,,Remediations for issues identified by SAST tools.,

0 commit comments

Comments
 (0)