Skip to content

Commit 1cff657

Browse files
timtebeekTeamModerne
authored and
app
committed
refactor: OpenRewrite Recipe best practices
Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.recipes.rewrite.OpenRewriteRecipeBestPractices?organizationId=T3BlblJld3JpdGU%3D Co-authored-by: Moderne <team@moderne.io>
1 parent 68a9495 commit 1cff657

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/main/resources/META-INF/rewrite/examples.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2799,6 +2799,18 @@ examples:
27992799
type: specs.openrewrite.org/v1beta/example
28002800
recipeName: org.openrewrite.staticanalysis.SimplifyBooleanExpression
28012801
examples:
2802+
- description: ''
2803+
sources:
2804+
- before: |
2805+
fun getSymbol() : String? {
2806+
return null
2807+
}
2808+
language: kotlin
2809+
- before: |
2810+
val isPositive = getSymbol().equals("+") == true
2811+
after: |
2812+
val isPositive = getSymbol().equals("+")
2813+
language: kotlin
28022814
- description: ''
28032815
sources:
28042816
- before: |
@@ -2818,18 +2830,6 @@ examples:
28182830
}
28192831
}
28202832
language: java
2821-
- description: ''
2822-
sources:
2823-
- before: |
2824-
fun getSymbol() : String? {
2825-
return null
2826-
}
2827-
language: kotlin
2828-
- before: |
2829-
val isPositive = getSymbol().equals("+") == true
2830-
after: |
2831-
val isPositive = getSymbol().equals("+")
2832-
language: kotlin
28332833
---
28342834
type: specs.openrewrite.org/v1beta/example
28352835
recipeName: org.openrewrite.staticanalysis.SimplifyBooleanReturn

0 commit comments

Comments
 (0)