forked from operaton/operaton
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrewrite.yml
More file actions
122 lines (119 loc) · 6.03 KB
/
rewrite.yml
File metadata and controls
122 lines (119 loc) · 6.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
---
type: specs.openrewrite.org/v1beta/style
name: org.operaton.style.OperatonJavaStyle
styleConfigs:
- org.openrewrite.java.style.ImportLayoutStyle:
classCountToUseStarImport: 15
nameCountToUseStarImport: 8
layout:
- import java.*
- import jakarta.*
- <blank line>
- import all other imports
- <blank line>
- import org.operaton.*
- <blank line>
- import static org.operaton.*
- import static all other imports
- org.openrewrite.java.style.TabsAndIndentsStyle:
useTabCharacter: false
tabSize: 2
indentSize: 2
continuationIndent: 2
indentsRelativeToExpressionStart: false
---
type: specs.openrewrite.org/v1beta/recipe
name: org.operaton.AddLicenseHeader
displayName: Add Operaton ASL2 header
recipeList:
- org.openrewrite.java.AddLicenseHeader:
licenseText: |
Copyright ${CURRENT_YEAR} the Operaton contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at:
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
---
# see https://docs.openrewrite.org/recipes/staticanalysis/codecleanup
type: specs.openrewrite.org/v1beta/recipe
name: org.operaton.recipe.CodeCleanup
displayName: Code cleanup
description: Automatically cleanup code and common SAST issues, e.g. remove unnecessary parentheses, simplify expressions.
recipeList:
- org.openrewrite.staticanalysis.CommonStaticAnalysis
# Java cleanups
- org.openrewrite.staticanalysis.AddSerialAnnotationToSerialVersionUID
- org.openrewrite.staticanalysis.AvoidBoxedBooleanExpressions
- org.openrewrite.staticanalysis.CombineSemanticallyEqualCatchBlocks
- org.openrewrite.staticanalysis.HideUtilityClassConstructor
- org.openrewrite.staticanalysis.InstanceOfPatternMatch
- org.openrewrite.staticanalysis.MissingOverrideAnnotation
- org.openrewrite.staticanalysis.UnnecessaryThrows
- org.openrewrite.staticanalysis.UseLambdaForFunctionalInterface
- org.openrewrite.staticanalysis.UseStandardCharset
- org.openrewrite.java.RemoveUnusedImports
- org.openrewrite.java.SimplifySingleElementAnnotation
- org.openrewrite.java.migrate.lang.StringFormatted
- org.openrewrite.java.migrate.UpgradeToJava17
- org.openrewrite.java.migrate.DeprecatedLogRecordThreadID
# Logging
- org.openrewrite.java.logging.slf4j.ParameterizedLogging
- org.operaton.AddLicenseHeader
---
type: specs.openrewrite.org/v1beta/recipe
name: org.operaton.recipe.TestsCleanup
displayName: Tests cleanup
description: Automatically cleanup test code, use best practices for JUnit 5, AssertJ, and Mockito.
recipeList:
- org.openrewrite.java.RemoveUnusedImports
# Testing
- org.openrewrite.java.testing.assertj.AssertJShortRulesRecipes$AbstractShortAssertIsZeroRecipe
- org.openrewrite.java.testing.assertj.CollapseConsecutiveAssertThatStatements
- org.openrewrite.java.testing.assertj.SimplifyChainedAssertJAssertions
- org.openrewrite.java.testing.assertj.SimplifyAssertJAssertion
- org.openrewrite.java.testing.cleanup.AssertionsArgumentOrder
- org.openrewrite.java.testing.mockito.SimplifyMockitoVerifyWhenGiven
- org.openrewrite.java.testing.assertj.StaticImports
# JUnit Jupiter best practices - org.openrewrite.java.testing.junit5.JUnit5BestPractices
#- org.openrewrite.java.testing.junit5.JUnit4to5Migration
#- org.openrewrite.java.testing.hamcrest.MigrateHamcrestToJUnit5
- org.openrewrite.java.testing.junit5.StaticImports
- org.openrewrite.java.testing.junit5.CleanupAssertions
- org.openrewrite.java.testing.junit5.CsvSourceToValueSource
- org.openrewrite.java.testing.cleanup.AssertLiteralBooleanToFailRecipes
- org.openrewrite.java.testing.cleanup.AssertLiteralBooleanRemovedRecipe
#- org.openrewrite.java.testing.cleanup.RemoveTestPrefix
- org.openrewrite.java.testing.cleanup.SimplifyTestThrows
- org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic
- org.openrewrite.java.testing.cleanup.TestMethodsShouldBeVoid
- org.openrewrite.java.testing.junit5.AddParameterizedTestAnnotation
- org.openrewrite.java.testing.junit5.RemoveDuplicateTestTemplates
- org.openrewrite.java.testing.junit5.RemoveTryCatchFailBlocks
- org.openrewrite.java.testing.junit5.LifecycleNonPrivate
- org.openrewrite.java.testing.junit5.AssertThrowsOnLastStatement
- org.openrewrite.java.testing.junit5.AssertTrueInstanceofToAssertInstanceOf
- org.openrewrite.java.testing.junit5.UseAssertSame
# Composite: org.openrewrite.java.testing.assertj.JUnitToAssertj
- org.openrewrite.java.testing.assertj.JUnitAssertArrayEqualsToAssertThat
- org.openrewrite.java.testing.assertj.JUnitAssertEqualsToAssertThat
- org.openrewrite.java.testing.assertj.JUnitAssertFalseToAssertThat
- org.openrewrite.java.testing.assertj.JUnitAssertNotEqualsToAssertThat
- org.openrewrite.java.testing.assertj.JUnitAssertNotNullToAssertThat
- org.openrewrite.java.testing.assertj.JUnitAssertNullToAssertThat
- org.openrewrite.java.testing.assertj.JUnitAssertSameToAssertThat
- org.openrewrite.java.testing.assertj.JUnitAssertTrueToAssertThat
- org.openrewrite.java.testing.assertj.JUnitFailToAssertJFail
- org.openrewrite.java.testing.assertj.JUnitAssertThrowsToAssertExceptionType
- org.openrewrite.java.testing.assertj.JUnitTryFailToAssertThatThrownBy
- org.openrewrite.java.testing.assertj.JUnitAssertInstanceOfToAssertThat
# More AssertJ
- org.openrewrite.java.testing.assertj.AssertJBestPracticesTest
- org.openrewrite.java.testing.assertj.AssertJShortRulesRecipes
- org.openrewrite.java.testing.assertj.AssertJLongRulesRecipes
# Very slow:
#- tech.picnic.errorprone.refasterrules.AssertJObjectRulesRecipes