Skip to content

Commit 90ff85a

Browse files
authored
[openrewrite] RecipeNullabilityBestPractices (#2663)
2 parents f3c82b3 + 66ac9b9 commit 90ff85a

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

gradle/rewrite.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ apply plugin: 'org.openrewrite.rewrite'
22

33
rewrite {
44
activeRecipe('com.diffplug.spotless.openrewrite.SanityCheck')
5+
activeStyle('com.diffplug.spotless.openrewrite.SpotlessFormat')
56
exclusions.addAll(
67
'**.dirty.java',
78
'**FormatterProperties.java',

rewrite.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ recipeList:
2424
- org.openrewrite.java.recipes.JavaRecipeBestPractices
2525
- org.openrewrite.java.recipes.RecipeTestingBestPractices
2626
- org.openrewrite.java.security.JavaSecurityBestPractices
27+
- org.openrewrite.staticanalysis.BufferedWriterCreationRecipes
2728
- org.openrewrite.staticanalysis.CommonStaticAnalysis
2829
- org.openrewrite.staticanalysis.EqualsAvoidsNull
2930
- org.openrewrite.staticanalysis.JavaApiBestPractices
@@ -36,6 +37,9 @@ recipeList:
3637
- org.openrewrite.staticanalysis.RemoveUnusedLocalVariables
3738
- org.openrewrite.staticanalysis.RemoveUnusedPrivateFields
3839
- org.openrewrite.staticanalysis.RemoveUnusedPrivateMethods
40+
- org.openrewrite.staticanalysis.ReplaceApacheCommonsLang3ValidateNotNullWithObjectsRequireNonNull
41+
- org.openrewrite.staticanalysis.SimplifyTernaryRecipes
42+
- org.openrewrite.staticanalysis.URLEqualsHashCodeRecipes
3943
- org.openrewrite.staticanalysis.UnnecessaryCloseInTryWithResources
4044
- org.openrewrite.staticanalysis.UnnecessaryExplicitTypeArguments
4145
- org.openrewrite.staticanalysis.UnnecessaryParentheses
@@ -59,3 +63,28 @@ recipeList:
5963
- tech.picnic.errorprone.refasterrules.StringRulesRecipes
6064
- tech.picnic.errorprone.refasterrules.TimeRulesRecipes
6165
---
66+
name: com.diffplug.spotless.openrewrite.SpotlessFormat
67+
styleConfigs:
68+
- org.openrewrite.java.style.ImportLayoutStyle:
69+
classCountToUseStarImport: 999
70+
nameCountToUseStarImport: 999
71+
# bug https://github.com/openrewrite/rewrite/issues/6107
72+
# layout:
73+
# - import java.*
74+
# - <blank line>
75+
# - import javax.*
76+
# - <blank line>
77+
# - import org.*
78+
# - <blank line>
79+
# - import com.*
80+
# - <blank line>
81+
# - import com.diffplug.*
82+
# - <blank line>
83+
# - import static all other imports
84+
# - <blank line>
85+
# - import all other imports
86+
# - <blank line>
87+
- org.openrewrite.java.style.TabsAndIndentsStyle:
88+
useTabCharacter: true
89+
tabSize: 4
90+
---

0 commit comments

Comments
 (0)