Reference
Design Partners
Common static analysis issues
** org.openrewrite.java.cleanup.CommonStaticAnalysis** Resolve common static analysis issues discovered through 3rd party tools

Source

  • groupId: org.openrewrite
  • artifactId: rewrite-java
  • version: 7.17.0

Usage

This recipe has no required configuration parameters and comes from a rewrite core library. It can be activated directly without adding any dependencies.
Gradle
Maven
build.gradle
1
plugins {
2
id("org.openrewrite.rewrite") version("5.15.5")
3
}
4
5
rewrite {
6
activeRecipe("org.openrewrite.java.cleanup.CommonStaticAnalysis")
7
}
8
9
repositories {
10
mavenCentral()
11
}
Copied!
pom.xml
1
<project>
2
<build>
3
<plugins>
4
<plugin>
5
<groupId>org.openrewrite.maven</groupId>
6
<artifactId>rewrite-maven-plugin</artifactId>
7
<version>4.17.2</version>
8
<configuration>
9
<activeRecipes>
10
<recipe>org.openrewrite.java.cleanup.CommonStaticAnalysis</recipe>
11
</activeRecipes>
12
</configuration>
13
</plugin>
14
</plugins>
15
</build>
16
</project>
Copied!
Recipes can also be activated directly from the command line by adding the argument -DactiveRecipes=org.openrewrite.java.cleanup.CommonStaticAnalysis

Definition

Recipe List
Yaml Recipe List
1
---
2
type: specs.openrewrite.org/v1beta/recipe
3
name: org.openrewrite.java.cleanup.CommonStaticAnalysis
4
displayName: Common static analysis issues
5
description: Resolve common static analysis issues discovered through 3rd party tools
6
recipeList:
7
- org.openrewrite.java.cleanup.AddSerialVersionUidToSerializable
8
- org.openrewrite.java.cleanup.AtomicPrimitiveEqualsUsesGet
9
- org.openrewrite.java.cleanup.BigDecimalRoundingConstantsToEnums
10
- org.openrewrite.java.cleanup.BooleanChecksNotInverted
11
- org.openrewrite.java.cleanup.CaseInsensitiveComparisonsDoNotChangeCase
12
- org.openrewrite.java.cleanup.CatchClauseOnlyRethrows
13
- org.openrewrite.java.cleanup.ControlFlowIndentation
14
- org.openrewrite.java.cleanup.CovariantEquals
15
- org.openrewrite.java.cleanup.DefaultComesLast
16
- org.openrewrite.java.cleanup.EqualsAvoidsNull
17
- org.openrewrite.java.cleanup.ExplicitInitialization
18
- org.openrewrite.java.cleanup.ExternalizableHasNoArgsConstructor
19
- org.openrewrite.java.cleanup.FallThrough
20
- org.openrewrite.java.cleanup.FinalClass
21
- org.openrewrite.java.cleanup.ForLoopIncrementInUpdate
22
- org.openrewrite.java.cleanup.HiddenField
23
- org.openrewrite.java.cleanup.HideUtilityClassConstructor
24
- org.openrewrite.java.cleanup.IndexOfChecksShouldUseAStartPosition
25
- org.openrewrite.java.cleanup.IndexOfReplaceableByContains
26
- org.openrewrite.java.cleanup.IndexOfShouldNotCompareGreaterThanZero
27
- org.openrewrite.java.cleanup.IsEmptyCallOnCollections
28
- org.openrewrite.java.cleanup.LambdaBlockToExpression
29
- org.openrewrite.java.cleanup.MethodNameCasing
30
- org.openrewrite.java.cleanup.MinimumSwitchCases
31
- org.openrewrite.java.cleanup.ModifierOrder
32
- org.openrewrite.java.cleanup.MultipleVariableDeclarations
33
- org.openrewrite.java.cleanup.NestedEnumsAreNotStatic
34
- org.openrewrite.java.cleanup.NewStringBuilderBufferWithCharArgument
35
- org.openrewrite.java.cleanup.NoDoubleBraceInitialization
36
- org.openrewrite.java.cleanup.NoEmptyCollectionWithRawType
37
- org.openrewrite.java.cleanup.NoEqualityInForCondition
38
- org.openrewrite.java.cleanup.NoFinalizer
39
- org.openrewrite.java.cleanup.NoPrimitiveWrappersForToStringOrCompareTo
40
- org.openrewrite.java.cleanup.NoRedundantJumpStatements
41
- org.openrewrite.java.cleanup.NoToStringOnStringType
42
- org.openrewrite.java.cleanup.NoValueOfOnStringType
43
- org.openrewrite.java.cleanup.ObjectFinalizeCallsSuper
44
- org.openrewrite.java.cleanup.PrimitiveWrapperClassConstructorToValueOf
45
- org.openrewrite.java.cleanup.RedundantFileCreation
46
- org.openrewrite.java.cleanup.RemoveExtraSemicolons
47
- org.openrewrite.java.RemoveUnusedImports
48
- org.openrewrite.java.cleanup.RemoveUnusedLocalVariables
49
- org.openrewrite.java.cleanup.RemoveUnusedPrivateMethods
50
- org.openrewrite.java.cleanup.RenameLocalVariablesToCamelCase
51
- org.openrewrite.java.cleanup.SimplifyBooleanExpression
52
- org.openrewrite.java.cleanup.SimplifyBooleanReturn
53
- org.openrewrite.java.cleanup.StaticMethodNotFinal
54
- org.openrewrite.java.cleanup.StringLiteralEquality
55
- org.openrewrite.java.cleanup.UnnecessaryCloseInTryWithResources
56
- org.openrewrite.java.cleanup.UnnecessaryExplicitTypeArguments
57
- org.openrewrite.java.cleanup.UnnecessaryParentheses
58
- org.openrewrite.java.cleanup.UnnecessaryPrimitiveAnnotations
59
- org.openrewrite.java.cleanup.UnnecessaryThrows
60
- org.openrewrite.java.cleanup.UseCollectionInterfaces
61
- org.openrewrite.java.cleanup.UseDiamondOperator
62
- org.openrewrite.java.cleanup.UseFilesCreateTempDirectory
63
- org.openrewrite.java.cleanup.UseJavaStyleArrayDeclarations
64
- org.openrewrite.java.cleanup.UseLambdaForFunctionalInterface
65
- org.openrewrite.java.cleanup.WhileInsteadOfFor
66
- org.openrewrite.java.cleanup.WriteOctalValuesAsDecimal
Copied!
Last modified 6d ago
Export as PDF
Copy link