Recipes by Tag
This doc contains all recipe tags and the recipes that are tagged with them.
Total tags: 396
0.2
3 recipes
- org.openrewrite.python.migrate.langchain.ReplaceLangchainCommunityImports
- Replace
langchainimports withlangchain_community - Migrate third-party integration imports from
langchaintolangchain_community. These integrations were moved in LangChain v0.2.
- Replace
- org.openrewrite.python.migrate.langchain.ReplaceLangchainProviderImports
- Replace
langchain_communityimports with provider packages - Migrate provider-specific imports from
langchain_communityto dedicated provider packages likelangchain_openai,langchain_anthropic, etc.
- Replace
- org.openrewrite.python.migrate.langchain.UpgradeToLangChain02
- Upgrade to LangChain 0.2
- Migrate to LangChain 0.2 by updating imports from
langchaintolangchain_communityand provider-specific packages.
1.0
4 recipes
- org.openrewrite.python.migrate.langchain.FindDeprecatedLangchainAgents
- Find deprecated LangChain agent patterns
- Find usage of deprecated LangChain agent patterns including
initialize_agent,AgentExecutor, andLLMChain. These were deprecated in LangChain v0.2 and removed in v1.0.
- org.openrewrite.python.migrate.langchain.FindLangchainCreateReactAgent
- Find
create_react_agentusage (replace withcreate_agent) - Find
from langgraph.prebuilt import create_react_agentwhich should be replaced withfrom langchain.agents import create_agentin LangChain v1.0.
- Find
- org.openrewrite.python.migrate.langchain.ReplaceLangchainClassicImports
- Replace
langchainlegacy imports withlangchain_classic - Migrate legacy chain, retriever, and indexing imports from
langchaintolangchain_classic. These were moved in LangChain v1.0.
- Replace
- org.openrewrite.python.migrate.langchain.UpgradeToLangChain1
- Upgrade to LangChain 1.0
- Migrate to LangChain 1.0 by applying all v0.2 migrations and then moving legacy functionality to
langchain_classic.
3.10
12 recipes
- org.openrewrite.python.migrate.ReplaceCollectionsAbcImports
- Replace
collectionsABC imports withcollections.abc - Migrate deprecated abstract base class imports from
collectionstocollections.abc. These imports were deprecated in Python 3.3 and removed in Python 3.10.
- Replace
- org.openrewrite.python.migrate.ReplaceConditionNotifyAll
- Replace
Condition.notifyAll()withCondition.notify_all() - Replace
notifyAll()method calls withnotify_all(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceEventIsSet
- Replace
Event.isSet()withEvent.is_set() - Replace
isSet()method calls withis_set(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadGetName
- Replace
Thread.getName()withThread.name - Replace
getName()method calls with thenameproperty. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadIsDaemon
- Replace
Thread.isDaemon()withThread.daemon - Replace
isDaemon()method calls with thedaemonproperty. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadSetDaemon
- Replace
Thread.setDaemon()withThread.daemon = ... - Replace
setDaemon()method calls withdaemonproperty assignment. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadSetName
- Replace
Thread.setName()withThread.name = ... - Replace
setName()method calls withnameproperty assignment. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadingActiveCount
- Replace
threading.activeCount()withthreading.active_count() - Replace
threading.activeCount()withthreading.active_count(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadingCurrentThread
- Replace
threading.currentThread()withthreading.current_thread() - Replace
threading.currentThread()withthreading.current_thread(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceTypingOptionalWithUnion
- Replace
typing.Optional[X]withX | None - PEP 604 introduced the
|operator for union types in Python 3.10. ReplaceOptional[X]with the more conciseX | Nonesyntax.
- Replace
- org.openrewrite.python.migrate.ReplaceTypingUnionWithPipe
- Replace
typing.Union[X, Y]withX | Y - PEP 604 introduced the
|operator for union types in Python 3.10. ReplaceUnion[X, Y, ...]with the more conciseX | Y | ...syntax.
- Replace
- org.openrewrite.python.migrate.UpgradeToPython310
- Upgrade to Python 3.10
- Migrate deprecated APIs and adopt new syntax for Python 3.10 compatibility. This includes adopting PEP 604 union type syntax (
X | Y) and other modernizations between Python 3.9 and 3.10.
3.11
3 recipes
- org.openrewrite.python.migrate.FindLocaleGetdefaultlocale
- Find deprecated
locale.getdefaultlocale()usage locale.getdefaultlocale()was deprecated in Python 3.11. Uselocale.setlocale(),locale.getlocale(), orlocale.getpreferredencoding(False)instead.
- Find deprecated
- org.openrewrite.python.migrate.ReplaceReTemplate
- Replace
re.template()withre.compile()and flagre.TEMPLATE/re.T re.template()was deprecated in Python 3.11 and removed in 3.13. Calls are auto-replaced withre.compile().re.TEMPLATE/re.Tflags have no direct replacement and are flagged for manual review.
- Replace
- org.openrewrite.python.migrate.UpgradeToPython311
- Upgrade to Python 3.11
- Migrate deprecated and removed APIs for Python 3.11 compatibility. This includes handling removed modules, deprecated functions, and API changes between Python 3.10 and 3.11.
3.12
13 recipes
- org.openrewrite.python.migrate.FindImpUsage
- Find deprecated imp module usage
- Find imports of the deprecated
impmodule which was removed in Python 3.12. Migrate toimportlib.
- org.openrewrite.python.migrate.FindPathlibLinkTo
- Find deprecated
Path.link_to()usage - Find usage of
Path.link_to()which was deprecated in Python 3.10 and removed in 3.12. Usehardlink_to()instead (note: argument order is reversed).
- Find deprecated
- org.openrewrite.python.migrate.FindShutilRmtreeOnerror
- Find deprecated
shutil.rmtree(onerror=...)parameter - The
onerrorparameter ofshutil.rmtree()was deprecated in Python 3.12 in favor ofonexc. Theonexccallback receives the exception object directly rather than an exc_info tuple.
- Find deprecated
- org.openrewrite.python.migrate.ReplaceConditionNotifyAll
- Replace
Condition.notifyAll()withCondition.notify_all() - Replace
notifyAll()method calls withnotify_all(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceEventIsSet
- Replace
Event.isSet()withEvent.is_set() - Replace
isSet()method calls withis_set(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceSysLastExcInfo
- Replace
sys.last_valuewithsys.last_excand flagsys.last_type/sys.last_traceback sys.last_type,sys.last_value, andsys.last_tracebackwere deprecated in Python 3.12.sys.last_valueis auto-replaced withsys.last_exc;sys.last_typeandsys.last_tracebackare flagged for manual review.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadGetName
- Replace
Thread.getName()withThread.name - Replace
getName()method calls with thenameproperty. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadIsDaemon
- Replace
Thread.isDaemon()withThread.daemon - Replace
isDaemon()method calls with thedaemonproperty. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadSetDaemon
- Replace
Thread.setDaemon()withThread.daemon = ... - Replace
setDaemon()method calls withdaemonproperty assignment. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadSetName
- Replace
Thread.setName()withThread.name = ... - Replace
setName()method calls withnameproperty assignment. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadingActiveCount
- Replace
threading.activeCount()withthreading.active_count() - Replace
threading.activeCount()withthreading.active_count(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadingCurrentThread
- Replace
threading.currentThread()withthreading.current_thread() - Replace
threading.currentThread()withthreading.current_thread(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
- org.openrewrite.python.migrate.UpgradeToPython312
- Upgrade to Python 3.12
- Migrate deprecated and removed APIs for Python 3.12 compatibility. This includes detecting usage of the removed
impmodule and other legacy modules that were removed in Python 3.12.
3.13
20 recipes
- org.openrewrite.python.migrate.FindAifcModule
- Find deprecated
aifcmodule usage - The
aifcmodule was deprecated in Python 3.11 and removed in Python 3.13. Use third-party audio libraries instead.
- Find deprecated
- org.openrewrite.python.migrate.FindAudioopModule
- Find deprecated
audioopmodule usage - The
audioopmodule was deprecated in Python 3.11 and removed in Python 3.13. Use pydub, numpy, or scipy for audio operations.
- Find deprecated
- org.openrewrite.python.migrate.FindCgiModule
- Find deprecated
cgimodule usage - The
cgimodule was deprecated in Python 3.11 and removed in Python 3.13. Useurllib.parsefor query string parsing,html.escape()for escaping, and web frameworks oremail.messagefor form handling.
- Find deprecated
- org.openrewrite.python.migrate.FindCgitbModule
- Find deprecated
cgitbmodule usage - The
cgitbmodule was deprecated in Python 3.11 and removed in Python 3.13. Use the standardloggingandtracebackmodules for error handling.
- Find deprecated
- org.openrewrite.python.migrate.FindChunkModule
- Find deprecated
chunkmodule usage - The
chunkmodule was deprecated in Python 3.11 and removed in Python 3.13. Implement IFF chunk reading manually or use specialized libraries.
- Find deprecated
- org.openrewrite.python.migrate.FindCryptModule
- Find deprecated
cryptmodule usage - The
cryptmodule was deprecated in Python 3.11 and removed in Python 3.13. Usebcrypt,argon2-cffi, orpasslibinstead.
- Find deprecated
- org.openrewrite.python.migrate.FindImghdrModule
- Find deprecated
imghdrmodule usage - The
imghdrmodule was deprecated in Python 3.11 and removed in Python 3.13. Usefiletype,python-magic, orPillowinstead.
- Find deprecated
- org.openrewrite.python.migrate.FindMailcapModule
- Find deprecated
mailcapmodule usage - The
mailcapmodule was deprecated in Python 3.11 and removed in Python 3.13. Usemimetypesmodule for MIME type handling.
- Find deprecated
- org.openrewrite.python.migrate.FindMsilibModule
- Find deprecated
msilibmodule usage - The
msilibmodule was deprecated in Python 3.11 and removed in Python 3.13. Use platform-specific tools for MSI creation.
- Find deprecated
- org.openrewrite.python.migrate.FindNisModule
- Find deprecated
nismodule usage - The
nismodule was deprecated in Python 3.11 and removed in Python 3.13. There is no direct replacement.
- Find deprecated
- org.openrewrite.python.migrate.FindNntplibModule
- Find deprecated
nntplibmodule usage - The
nntplibmodule was deprecated in Python 3.11 and removed in Python 3.13. NNTP is largely obsolete; consider alternatives if needed.
- Find deprecated
- org.openrewrite.python.migrate.FindOssaudiodevModule
- Find deprecated
ossaudiodevmodule usage - The
ossaudiodevmodule was deprecated in Python 3.11 and removed in Python 3.13. There is no direct replacement.
- Find deprecated
- org.openrewrite.python.migrate.FindPipesModule
- Find deprecated
pipesmodule usage - The
pipesmodule was deprecated in Python 3.11 and removed in Python 3.13. Use subprocess with shlex.quote() for shell escaping.
- Find deprecated
- org.openrewrite.python.migrate.FindSndhdrModule
- Find deprecated
sndhdrmodule usage - The
sndhdrmodule was deprecated in Python 3.11 and removed in Python 3.13. Usefiletypeor audio libraries likepydubinstead.
- Find deprecated
- org.openrewrite.python.migrate.FindSpwdModule
- Find deprecated
spwdmodule usage - The
spwdmodule was deprecated in Python 3.11 and removed in Python 3.13. There is no direct replacement.
- Find deprecated
- org.openrewrite.python.migrate.FindSunauModule
- Find deprecated
sunaumodule usage - The
sunaumodule was deprecated in Python 3.11 and removed in Python 3.13. Usesoundfileorpydubinstead.
- Find deprecated
- org.openrewrite.python.migrate.FindTelnetlibModule
- Find deprecated
telnetlibmodule usage - The
telnetlibmodule was deprecated in Python 3.11 and removed in Python 3.13. Consider usingtelnetlib3from PyPI, direct socket usage, or SSH-based alternatives like paramiko.
- Find deprecated
- org.openrewrite.python.migrate.FindUuModule
- Find deprecated
uumodule usage - The
uumodule was deprecated in Python 3.11 and removed in Python 3.13. Usebase64module instead for encoding binary data.
- Find deprecated
- org.openrewrite.python.migrate.FindXdrlibModule
- Find deprecated
xdrlibmodule usage - The
xdrlibmodule was deprecated in Python 3.11 and removed in Python 3.13. Usestructmodule for binary packing/unpacking.
- Find deprecated
- org.openrewrite.python.migrate.UpgradeToPython313
- Upgrade to Python 3.13
- Migrate deprecated and removed APIs for Python 3.13 compatibility. This includes detecting usage of modules removed in PEP 594 ('dead batteries') and other API changes between Python 3.12 and 3.13.
3.14
6 recipes
- org.openrewrite.python.migrate.FindTempfileMktemp
- Find deprecated
tempfile.mktemp()usage - Find usage of
tempfile.mktemp()which is deprecated due to security concerns (race condition). Usemkstemp()orNamedTemporaryFile()instead.
- Find deprecated
- org.openrewrite.python.migrate.FindUrllibParseSplitFunctions
- Find deprecated urllib.parse split functions
- Find usage of deprecated urllib.parse split functions (splithost, splitport, etc.) removed in Python 3.14. Use urlparse() instead.
- org.openrewrite.python.migrate.FindUrllibParseToBytes
- Find deprecated
urllib.parse.to_bytes()usage - Find usage of
urllib.parse.to_bytes()which was deprecated in Python 3.8 and removed in 3.14. Use str.encode() directly.
- Find deprecated
- org.openrewrite.python.migrate.ReplaceArrayFromstring
- Replace
array.fromstring()witharray.frombytes() - Replace
fromstring()withfrombytes()on array objects. The fromstring() method was deprecated in Python 3.2 and removed in 3.14.
- Replace
- org.openrewrite.python.migrate.ReplaceArrayTostring
- Replace
array.tostring()witharray.tobytes() - Replace
tostring()withtobytes()on array objects. The tostring() method was deprecated in Python 3.2 and removed in 3.14.
- Replace
- org.openrewrite.python.migrate.UpgradeToPython314
- Upgrade to Python 3.14
- Migrate deprecated and removed APIs for Python 3.14 compatibility. This includes replacing deprecated AST node types with
ast.Constantand other API changes between Python 3.13 and 3.14.
3.6
2 recipes
- org.openrewrite.python.migrate.ReplacePercentFormatWithFString
- Replace
%formatting with f-string - Replace
"..." % (...)expressions with f-strings (Python 3.6+). Only converts%sand%rspecifiers where the format string is a literal and the conversion is safe.
- Replace
- org.openrewrite.python.migrate.ReplaceStrFormatWithFString
- Replace
str.format()with f-string - Replace
"...".format(...)calls with f-strings (Python 3.6+). Only converts cases where the format string is a literal and the conversion is safe.
- Replace
3.8
7 recipes
- org.openrewrite.python.migrate.FindMacpathModule
- Find removed
macpathmodule usage - The
macpathmodule was removed in Python 3.8. Useos.pathinstead.
- Find removed
- org.openrewrite.python.migrate.FindSysCoroutineWrapper
- Find removed
sys.set_coroutine_wrapper()/sys.get_coroutine_wrapper() sys.set_coroutine_wrapper()andsys.get_coroutine_wrapper()were deprecated in Python 3.7 and removed in Python 3.8.
- Find removed
- org.openrewrite.python.migrate.ReplaceCgiParseQs
- Replace
cgi.parse_qs()withurllib.parse.parse_qs() cgi.parse_qs()was removed in Python 3.8. Useurllib.parse.parse_qs()instead. Note: this rewrites call sites but does not manage imports. Use withChangeImportin a composite recipe to updatefromimports.
- Replace
- org.openrewrite.python.migrate.ReplaceCgiParseQsl
- Replace
cgi.parse_qsl()withurllib.parse.parse_qsl() cgi.parse_qsl()was removed in Python 3.8. Useurllib.parse.parse_qsl()instead. Note: this rewrites call sites but does not manage imports. Use withChangeImportin a composite recipe to updatefromimports.
- Replace
- org.openrewrite.python.migrate.ReplacePlatformPopen
- Replace
platform.popen()withsubprocess.check_output() platform.popen()was removed in Python 3.8. Usesubprocess.check_output(cmd, shell=True)instead. Note: this rewrites call sites but does not manage imports.
- Replace
- org.openrewrite.python.migrate.ReplaceTarfileFilemode
- Replace
tarfile.filemodewithstat.filemode tarfile.filemodewas removed in Python 3.8. Usestat.filemode()instead.
- Replace
- org.openrewrite.python.migrate.UpgradeToPython38
- Upgrade to Python 3.8
- Migrate deprecated APIs and detect legacy patterns for Python 3.8 compatibility.
3.9
5 recipes
- org.openrewrite.python.migrate.ReplaceElementGetchildren
- Replace
Element.getchildren()withlist(element) - Replace
getchildren()withlist(element)on XML Element objects. Deprecated in Python 3.9.
- Replace
- org.openrewrite.python.migrate.ReplaceElementGetiterator
- Replace
Element.getiterator()withElement.iter() - Replace
getiterator()withiter()on XML Element objects. The getiterator() method was deprecated in Python 3.9.
- Replace
- org.openrewrite.python.migrate.ReplaceHtmlParserUnescape
- Replace
HTMLParser.unescape()withhtml.unescape() HTMLParser.unescape()was removed in Python 3.9. Usehtml.unescape()instead.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadIsAlive
- Replace
Thread.isAlive()withThread.is_alive() - Replace
isAlive()method calls withis_alive(). Deprecated in Python 3.1 and removed in 3.9.
- Replace
- org.openrewrite.python.migrate.UpgradeToPython39
- Upgrade to Python 3.9
- Migrate deprecated APIs for Python 3.9 compatibility. This includes PEP 585 built-in generics, removed base64 functions, and deprecated XML Element methods.
5to6
7 recipes
- org.openrewrite.codemods.ecmascript.5to6.ECMAScript6BestPractices
- Upgrade ECMAScript 5 to ECMAScript 6
- A collection of common ECMAScript 5 to ECMAScript 6 updates.
- org.openrewrite.codemods.ecmascript.5to6.amdToEsm
- Transform AMD style
define()calls to ES6importstatements - Transform AMD style
define()calls to ES6importstatements.
- Transform AMD style
- org.openrewrite.codemods.ecmascript.5to6.cjsToEsm
- Transform CommonJS style
require()calls to ES6importstatements - Transform CommonJS style
require()calls to ES6importstatements.
- Transform CommonJS style
- org.openrewrite.codemods.ecmascript.5to6.namedExportGeneration
- Generate named exports from CommonJS modules
- Generate named exports from CommonJS modules.
- org.openrewrite.codemods.ecmascript.5to6.noStrict
- Remove "use strict" directives
- Remove "use strict" directives.
- org.openrewrite.codemods.ecmascript.5to6.simpleArrow
- Replace all function expressions with only
returnstatement with simple arrow - Replace all function expressions with only
returnstatement with simple arrow function.
- Replace all function expressions with only
- org.openrewrite.codemods.ecmascript.5to6.varToLet
- Convert
vartolet - Convert
vartolet.
- Convert
acegi
1 recipe
- io.moderne.java.spring.security.MigrateAcegiToSpringSecurity_5_0
- Migrate from Acegi Security 1.0.x to Spring Security 5.0
- Migrates Acegi Security 1.0.x directly to Spring Security 5.0. This recipe handles dependency changes, type renames, XML configuration updates, web.xml filter migration, and adds TODO comments for password encoders that require manual migration.
actions
2 recipes
- org.openrewrite.github.MigrateSetupUvV6ToV7
- Migrate
astral-sh/setup-uvfrom v6 to v7 - Migrates
astral-sh/setup-uvfrom v6 to v7. Updates the action version and removes the deprecatedserver-urlinput. See the v7.0.0 release notes for breaking changes.
- Migrate
- org.openrewrite.github.MigrateTibdexGitHubAppTokenToActions
- Migrate from tibdex/github-app-token to actions/create-github-app-token
- Migrates from tibdex/github-app-token@v2 to actions/create-github-app-token@v2 and updates parameter names from snake_case to kebab-case.
activation
2 recipes
- io.quarkus.updates.core.quarkus30.JavaxActivationMigrationToJakartaActivation
- Migrate deprecated
javax.activationpackages tojakarta.activation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxActivationMigrationToJakartaActivation
- Migrate deprecated
javax.activationpackages tojakarta.activation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
activemq
1 recipe
- org.openrewrite.quarkus.spring.SpringBootActiveMQToQuarkus
- Replace Spring Boot ActiveMQ with Quarkus Artemis JMS
- Migrates
spring-boot-starter-activemqtoquarkus-artemis-jms.
actuator
2 recipes
- org.openrewrite.quarkus.spring.MigrateSpringActuator
- Migrate Spring Boot Actuator to Quarkus Health and Metrics
- Migrates Spring Boot Actuator to Quarkus SmallRye Health and Metrics extensions. Converts HealthIndicator implementations to Quarkus HealthCheck pattern.
- org.openrewrite.quarkus.spring.SpringBootActuatorToQuarkus
- Replace Spring Boot Actuator with Quarkus SmallRye Health
- Migrates
spring-boot-starter-actuatortoquarkus-smallrye-health.
ai
1 recipe
- io.moderne.ai.FixMisencodedCommentsInFrench
- Fix mis-encoded French comments, javadocs and pom.xml comments
- Fixes mis-encoded French comments in your code, javadocs and in your pom.xml files. Mis-encoded comments contain a ? or � character.
amqp
2 recipes
- org.openrewrite.quarkus.spring.SpringBootAmqpToQuarkusClassic
- Replace Spring Boot AMQP with Quarkus Messaging RabbitMQ
- Migrates
spring-boot-starter-amqptoquarkus-messaging-rabbitmqwhen no reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringBootAmqpToQuarkusReactive
- Replace Spring Boot AMQP with Quarkus Messaging AMQP
- Migrates
spring-boot-starter-amqptoquarkus-messaging-amqpwhen reactor dependencies are present.
annotation
3 recipes
- com.oracle.weblogic.rewrite.jakarta.JavaxAnnotationMigrationToJakarta9Annotation
- Migrate deprecated
javax.annotationtojakarta.annotation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxAnnotationMigrationToJakartaAnnotation
- Migrate deprecated
javax.annotationpackages tojakarta.annotation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxAnnotationMigrationToJakartaAnnotation
- Migrate deprecated
javax.annotationtojakarta.annotation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
annotations
2 recipes
- org.openrewrite.java.migrate.ComIntelliJAnnotationsToOrgJetbrainsAnnotations
- Migrate com.intellij:annotations to org.jetbrains:annotations
- This recipe will upgrade old dependency of com.intellij:annotations to the newer org.jetbrains:annotations.
- org.openrewrite.quarkus.spring.EnableAnnotationsToQuarkusDependencies
- Migrate
@EnableXyzannotations to Quarkus extensions - Removes Spring
@EnableXyzannotations and adds the corresponding Quarkus extensions as dependencies.
- Migrate
apache
20 recipes
- org.openrewrite.apache.commons.codec.ApacheBase64ToJavaBase64
- Prefer
java.util.Base64 - Prefer the Java standard library's
java.util.Base64over third-party usage of apache'sapache.commons.codec.binary.Base64.
- Prefer
- org.openrewrite.apache.commons.collections.UpgradeApacheCommonsCollections_3_4
- Migrates to Apache Commons Collections 4.x
- Migrate applications to the latest Apache Commons Collections 4.x release. This recipe modifies application's build files, make changes to deprecated/preferred APIs, and migrates configuration settings that have changes between versions.
- org.openrewrite.apache.commons.io.ApacheFileUtilsToJavaFiles
- Prefer
java.nio.file.Files - Prefer the Java standard library's
java.nio.file.Filesover third-party usage of apache'sapache.commons.io.FileUtils.
- Prefer
- org.openrewrite.apache.commons.io.ApacheIOUtilsUseExplicitCharset
- Use IOUtils method that include their charset encoding
- Use
IOUtilsmethod invocations that include the charset encoding instead of using the deprecated versions that do not include a charset encoding. (e.g. convertsIOUtils.readLines(inputStream)toIOUtils.readLines(inputStream, StandardCharsets.UTF_8).
- org.openrewrite.apache.commons.io.RelocateApacheCommonsIo
- Relocate
org.apache.commons:commons-iotocommons-io:commons-io - The deployment of
org.apache.commons:commons-iowas a publishing mistake around 2012 which was corrected by changing the deployment GAV to be located undercommons-io:commons-io.
- Relocate
- org.openrewrite.apache.commons.io.UseStandardCharsets
- Prefer
java.nio.charset.StandardCharsets - Prefer the Java standard library's
java.nio.charset.StandardCharsetsover third-party usage of apache'sorg.apache.commons.io.Charsets.
- Prefer
- org.openrewrite.apache.commons.io.UseSystemLineSeparator
- Prefer
System.lineSeparator() - Prefer the Java standard library's
System.lineSeparator()over third-party usage of apache'sIOUtils.LINE_SEPARATOR.
- Prefer
- org.openrewrite.apache.commons.lang.IsNotEmptyToJdk
- Replace any StringUtils#isEmpty(String) and #isNotEmpty(String)
- Replace any
StringUtils#isEmpty(String)and#isNotEmpty(String)withs == null || s.isEmpty()ands != null && !s.isEmpty().
- org.openrewrite.apache.commons.lang.UpgradeApacheCommonsLang_2_3
- Migrates to Apache Commons Lang 3.x
- Migrate applications to the latest Apache Commons Lang 3.x release. This recipe modifies application's build files, and changes the package as per the migration release notes.
- org.openrewrite.apache.commons.lang.WordUtilsToCommonsText
- Migrate
WordUtilsto Apache Commons Text - Migrate
org.apache.commons.lang.WordUtilstoorg.apache.commons.text.WordUtilsand add the Commons Text dependency.
- Migrate
- org.openrewrite.apache.commons.lang3.UseStandardCharsets
- Prefer
java.nio.charset.StandardCharsets - Prefer the Java standard library's
java.nio.charset.StandardCharsetsoverorg.apache.commons.lang3.CharEncoding.
- Prefer
- org.openrewrite.apache.commons.math.UpgradeApacheCommonsMath_2_3
- Migrates to Apache Commons Math 3.x
- Migrate applications to the latest Apache Commons Math 3.x release. This recipe modifies application's build files, make changes to deprecated/preferred APIs, and migrates configuration settings that have changes between versions.
- org.openrewrite.apache.httpclient4.UpgradeApacheHttpClient_4_5
- Migrates to ApacheHttpClient 4.5.x
- Migrate applications to the latest Apache HttpClient 4.5.x release. This recipe modifies application's build files, make changes to deprecated/preferred APIs, and migrates configuration settings that have changes between versions.
- org.openrewrite.apache.httpclient5.UpgradeApacheHttpClientDependencies
- Migrate from org.apache.httpcomponents to ApacheHttpClient 5.x dependencies
- Adopt
org.apache.httpcomponents.client5:httpclient5fromorg.apache.httpcomponents.
- org.openrewrite.apache.httpclient5.UpgradeApacheHttpClient_5
- Migrate to ApacheHttpClient 5.x
- Migrate applications to the latest Apache HttpClient 5.x release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.apache.httpclient5.UpgradeApacheHttpClient_5_AsyncClientClassMapping
- Migrate Apache HttpAsyncClient 4.x classes to HttpClient 5.x
- Migrates classes from Apache HttpAsyncClient 4.x
httpasyncclientto their equivalents in HttpClient 5.x.
- org.openrewrite.apache.httpclient5.UpgradeApacheHttpCoreNioDependencies
- Migrate from httpcore-nio to ApacheHttpClient 5.x core dependency
- Adopt
org.apache.httpcomponents.core5:httpcore5fromorg.apache.httpcomponents:httpcore-nio.
- org.openrewrite.apache.poi.UpgradeApachePoi_3_17
- Migrates to Apache POI 3.17
- Migrates to the last Apache POI 3.x release. This recipe modifies build files and makes changes to deprecated/preferred APIs that have changed between versions.
- org.openrewrite.apache.poi.UpgradeApachePoi_4_1
- Migrates to Apache POI 4.1.2
- Migrates to the last Apache POI 4.x release. This recipe modifies build files and makes changes to deprecated/preferred APIs that have changed between versions.
- org.openrewrite.apache.poi.UpgradeApachePoi_5
- Migrates to Apache POI 5.x
- Migrates to the latest Apache POI 5.x release. This recipe modifies build files to account for artifact renames and upgrades dependency versions. It also chains the 4.1 recipe to handle all prior API migrations.
application
7 recipes
- com.oracle.weblogic.rewrite.WebLogicApplicationClientXmlNamespace1412
- Migrate xmlns entries in
application-client.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Application Client schema files to WebLogic 14.1.2
- Tags: application-client
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicApplicationClientXmlNamespace1511
- Migrate xmlns entries in
application-client.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inapplication-client.xmlfiles to WebLogic 15.1.1 - Tags: application-client
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicApplicationXmlNamespace1412
- Migrate xmlns entries in
weblogic-application.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Application schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicApplicationXmlNamespace1511
- Migrate xmlns entries in
weblogic-application.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-application.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxApplicationClientXmlToJakarta9ApplicationClientXml
- Migrate xmlns entries in
application-client.xmlfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Tags: application-client
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxApplicationXmlToJakarta9ApplicationXml
- Migrate xmlns entries in
application.xmlfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- org.openrewrite.quarkus.spring.EnableAnnotationsToQuarkusDependencies
- Migrate
@EnableXyzannotations to Quarkus extensions - Removes Spring
@EnableXyzannotations and adds the corresponding Quarkus extensions as dependencies.
- Migrate
arquillian
1 recipe
- org.openrewrite.java.testing.arquillian.ArquillianJUnit4ToArquillianJUnit5
- Use Arquillian JUnit 5 Extension
- Migrates Arquillian JUnit 4 to JUnit 5.
array
2 recipes
- org.openrewrite.python.migrate.ReplaceArrayFromstring
- Replace
array.fromstring()witharray.frombytes() - Replace
fromstring()withfrombytes()on array objects. The fromstring() method was deprecated in Python 3.2 and removed in 3.14.
- Replace
- org.openrewrite.python.migrate.ReplaceArrayTostring
- Replace
array.tostring()witharray.tobytes() - Replace
tostring()withtobytes()on array objects. The tostring() method was deprecated in Python 3.2 and removed in 3.14.
- Replace
artemis
1 recipe
- org.openrewrite.quarkus.spring.SpringBootArtemisToQuarkus
- Replace Spring Boot Artemis with Quarkus Artemis JMS
- Migrates
spring-boot-starter-artemistoquarkus-artemis-jms.
aspnet
3 recipes
- OpenRewrite.Recipes.AspNet.UpgradeAspNetFrameworkToCore
- Migrate ASP.NET Framework to ASP.NET Core
- Migrate ASP.NET Framework (System.Web.Mvc, System.Web.Http) types to their ASP.NET Core equivalents. Based on the .NET Upgrade Assistant's UA0002 and UA0010 diagnostics. See https://learn.microsoft.com/en-us/aspnet/core/migration/proper-to-2x.
- OpenRewrite.Recipes.Net9.FindImplicitAuthenticationDefault
- Find implicit authentication default scheme (ASP.NET Core 9)
- Finds calls to
AddAuthentication()with no arguments. In .NET 9, a single registered authentication scheme is no longer automatically used as the default.
- OpenRewrite.Recipes.Net9.FindSwashbuckle
- Find Swashbuckle usage (ASP.NET Core 9 built-in OpenAPI)
- Finds usages of Swashbuckle APIs (
AddSwaggerGen,UseSwagger,UseSwaggerUI). .NET 9 includes built-in OpenAPI support. Consider migrating toAddOpenApi()/MapOpenApi().
aspnetcore
40 recipes
- OpenRewrite.Recipes.AspNetCore2.FindBuildWebHost
- Find BuildWebHost method
- Flags
BuildWebHostmethod declarations that should be renamed toCreateWebHostBuilderand refactored for ASP.NET Core 2.1.
- OpenRewrite.Recipes.AspNetCore2.FindIAuthenticationManager
- Find IAuthenticationManager usage
- Flags references to
IAuthenticationManagerwhich was removed in ASP.NET Core 2.0. UseHttpContextextension methods fromMicrosoft.AspNetCore.Authenticationinstead.
- OpenRewrite.Recipes.AspNetCore2.FindLoggerFactoryAddProvider
- Find ILoggerFactory.Add() calls*
- Flags
ILoggerFactory.AddConsole(),AddDebug(), and similar extension methods. In ASP.NET Core 2.2+, logging should be configured viaConfigureLoggingin the host builder.
- OpenRewrite.Recipes.AspNetCore2.FindSetCompatibilityVersion
- Find SetCompatibilityVersion() calls
- Flags
SetCompatibilityVersioncalls. This method is a no-op in ASP.NET Core 3.0+ and should be removed during migration.
- OpenRewrite.Recipes.AspNetCore2.FindUseKestrelWithConfig
- Find UseKestrel() with configuration
- Flags
UseKestrelcalls with configuration lambdas that should be replaced withConfigureKestrelto avoid conflicts with the IIS in-process hosting model.
- OpenRewrite.Recipes.AspNetCore2.UpgradeToAspNetCore20
- Migrate to ASP.NET Core 2.0
- Migrate ASP.NET Core 1.x projects to ASP.NET Core 2.0, applying authentication and Identity changes. See https://learn.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/identity-2x.
- OpenRewrite.Recipes.AspNetCore2.UpgradeToAspNetCore21
- Migrate to ASP.NET Core 2.1
- Migrate ASP.NET Core 2.0 projects to ASP.NET Core 2.1, including host builder changes and obsolete API replacements. See https://learn.microsoft.com/en-us/aspnet/core/migration/20-to-21.
- OpenRewrite.Recipes.AspNetCore2.UpgradeToAspNetCore22
- Migrate to ASP.NET Core 2.2
- Migrate ASP.NET Core 2.1 projects to ASP.NET Core 2.2, including Kestrel configuration and logging changes. See https://learn.microsoft.com/en-us/aspnet/core/migration/21-to-22.
- OpenRewrite.Recipes.AspNetCore2.UseGetExternalAuthenticationSchemesAsync
- Use GetExternalAuthenticationSchemesAsync()
- Replace
GetExternalAuthenticationSchemes()withGetExternalAuthenticationSchemesAsync(). The synchronous method was removed in ASP.NET Core 2.0.
- OpenRewrite.Recipes.AspNetCore2.UseHttpContextAuthExtensions
- Use HttpContext authentication extensions
- Replace
HttpContext.Authentication.Method(...)calls withHttpContext.Method(...)extension methods. TheIAuthenticationManagerinterface was removed in ASP.NET Core 2.0.
- OpenRewrite.Recipes.AspNetCore2.UseUseAuthentication
- Replace UseIdentity() with UseAuthentication()
- Replace
app.UseIdentity()withapp.UseAuthentication(). TheUseIdentitymethod was removed in ASP.NET Core 2.0 in favor ofUseAuthentication.
- OpenRewrite.Recipes.AspNetCore3.FindAddMvc
- Find AddMvc() calls
- Flags
AddMvc()calls that should be replaced with more specific service registrations (AddControllers,AddControllersWithViews, orAddRazorPages) in ASP.NET Core 3.0.
- OpenRewrite.Recipes.AspNetCore3.FindIApplicationLifetime
- Find IApplicationLifetime usage
- Flags usages of
IApplicationLifetimewhich should be replaced withIHostApplicationLifetimein ASP.NET Core 3.0.
- OpenRewrite.Recipes.AspNetCore3.FindIHostingEnvironment
- Find IHostingEnvironment usage
- Flags usages of
IHostingEnvironmentwhich should be replaced withIWebHostEnvironmentin ASP.NET Core 3.0.
- OpenRewrite.Recipes.AspNetCore3.FindNewLoggerFactory
- Find new LoggerFactory() calls
- Flags
new LoggerFactory()calls that should be replaced withLoggerFactory.Create(builder => ...)in .NET Core 3.0+.
- OpenRewrite.Recipes.AspNetCore3.FindNewtonsoftJsonUsage
- Find Newtonsoft.Json usage in ASP.NET Core
- Flags
JsonConvertand otherNewtonsoft.Jsonusage. ASP.NET Core 3.0 usesSystem.Text.Jsonby default.
- OpenRewrite.Recipes.AspNetCore3.FindUseMvcOrUseSignalR
- Find UseMvc()/UseSignalR() calls
- Flags
UseMvc()andUseSignalR()calls that should be replaced with endpoint routing (UseRouting()+UseEndpoints()) in ASP.NET Core 3.0.
- OpenRewrite.Recipes.AspNetCore3.FindWebHostBuilder
- Find WebHostBuilder usage
- Flags
WebHostBuilderandWebHost.CreateDefaultBuilderusage that should migrate to the Generic Host pattern in ASP.NET Core 3.0+.
- OpenRewrite.Recipes.AspNetCore3.UpgradeToAspNetCore30
- Migrate to ASP.NET Core 3.0
- Migrate ASP.NET Core 2.2 projects to ASP.NET Core 3.0, including endpoint routing, Generic Host, and System.Text.Json changes. See https://learn.microsoft.com/en-us/aspnet/core/migration/22-to-30.
- OpenRewrite.Recipes.Net10.FindActionContextAccessorObsolete
- Find obsolete
IActionContextAccessor/ActionContextAccessor(ASPDEPR006) - Finds usages of
IActionContextAccessorandActionContextAccessorwhich are obsolete in .NET 10. UseIHttpContextAccessorandHttpContext.GetEndpoint()instead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindIpNetworkObsolete
- Find obsolete
IPNetwork/KnownNetworks(ASPDEPR005) - Finds usages of
Microsoft.AspNetCore.HttpOverrides.IPNetworkandForwardedHeadersOptions.KnownNetworkswhich are obsolete in .NET 10. UseSystem.Net.IPNetworkandKnownIPNetworksinstead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindRazorRuntimeCompilationObsolete
- Find obsolete
AddRazorRuntimeCompilationcalls (ASPDEPR003) - Finds calls to
AddRazorRuntimeCompilationwhich is obsolete in .NET 10. Use Hot Reload instead for development scenarios.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindWebHostBuilderObsolete
- Find obsolete
WebHostBuilder/IWebHost/WebHostusage (ASPDEPR004/ASPDEPR008) - Finds usages of
WebHostBuilder,IWebHost, andWebHostwhich are obsolete in .NET 10. Migrate toHostBuilderorWebApplicationBuilderinstead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindWithOpenApiDeprecated
- Find deprecated
WithOpenApicalls (ASPDEPR002) - Finds calls to
.WithOpenApi()which is deprecated in .NET 10. Remove the call or useAddOpenApiOperationTransformerinstead.
- Find deprecated
- OpenRewrite.Recipes.Net10.KnownNetworksRename
- Rename
KnownNetworkstoKnownIPNetworks(ASPDEPR005) - Renames
ForwardedHeadersOptions.KnownNetworkstoKnownIPNetworksfor .NET 10 compatibility.
- Rename
- OpenRewrite.Recipes.Net10.RazorRuntimeCompilationObsolete
- Remove obsolete
AddRazorRuntimeCompilationcalls (ASPDEPR003) - Removes
AddRazorRuntimeCompilation()calls which are obsolete in .NET 10. Use Hot Reload instead for development scenarios.
- Remove obsolete
- OpenRewrite.Recipes.Net10.WithOpenApiDeprecated
- Remove deprecated
WithOpenApicalls (ASPDEPR002) - Removes
.WithOpenApi()calls which are deprecated in .NET 10. The call is removed from fluent method chains.
- Remove deprecated
- OpenRewrite.Recipes.Net3_0.FindCompactOnMemoryPressure
- Find
CompactOnMemoryPressureusage (removed in ASP.NET Core 3.0) - Finds usages of
CompactOnMemoryPressurewhich was removed fromMemoryCacheOptionsin ASP.NET Core 3.0.
- Find
- OpenRewrite.Recipes.Net3_0.FindConnectionAdapter
- Find
IConnectionAdapterusage (removed in ASP.NET Core 3.0) - Finds usages of
IConnectionAdapterwhich was removed from Kestrel in ASP.NET Core 3.0. Use Connection Middleware instead.
- Find
- OpenRewrite.Recipes.Net3_0.FindHttpContextAuthentication
- Find
HttpContext.Authenticationusage (removed in ASP.NET Core 3.0) - Finds usages of
HttpContext.Authenticationwhich was removed in ASP.NET Core 3.0. Use dependency injection to getIAuthenticationServiceinstead.
- Find
- OpenRewrite.Recipes.Net3_0.FindObsoleteLocalizationApis
- Find obsolete localization APIs (ASP.NET Core 3.0)
- Finds usages of
ResourceManagerWithCultureStringLocalizerandWithCulture()which are obsolete in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_0.FindSpaServices
- Find SpaServices/NodeServices usage (obsolete in ASP.NET Core 3.0)
- Finds usages of
SpaServicesandNodeServiceswhich are obsolete in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_0.FindSynchronousIO
- Find synchronous IO usage (disabled in ASP.NET Core 3.0)
- Finds references to
AllowSynchronousIOwhich indicates synchronous IO usage that is disabled by default in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_0.FindUseMvc
- Find
UseMvc/AddMvcusage (replaced in ASP.NET Core 3.0) - Finds usages of
app.UseMvc(),app.UseMvcWithDefaultRoute(), andservices.AddMvc()which should be migrated to endpoint routing and more specific service registration in ASP.NET Core 3.0.
- Find
- OpenRewrite.Recipes.Net3_0.FindWebApiCompatShim
- Find Web API compatibility shim usage (removed in ASP.NET Core 3.0)
- Finds usages of
ApiController,HttpResponseMessage, and other types fromMicrosoft.AspNetCore.Mvc.WebApiCompatShimwhich was removed in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_0.FindWebHostBuilder
- Find
WebHostBuilder/WebHost.CreateDefaultBuilderusage (replaced in ASP.NET Core 3.0) - Finds usages of
WebHost.CreateDefaultBuilder()andnew WebHostBuilder()which should be migrated toHost.CreateDefaultBuilder()withConfigureWebHostDefaults()in ASP.NET Core 3.0.
- Find
- OpenRewrite.Recipes.Net3_0.UseApiControllerBase
- Migrate ApiController to ControllerBase
- Replace
ApiControllerbase class (from the removed WebApiCompatShim) withControllerBaseand add the[ApiController]attribute. The shim was removed in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_1.FindSameSiteNone
- Find
SameSiteMode.Noneusage (behavior changed in .NET Core 3.1) - Finds usages of
SameSiteMode.Nonewhich changed behavior in .NET Core 3.1 due to Chrome 80 SameSite cookie changes. Apps using remote authentication may need browser sniffing.
- Find
- OpenRewrite.Recipes.Net9.MigrateSwashbuckleToOpenApi
- Migrate Swashbuckle to built-in OpenAPI
- Migrate from Swashbuckle to the built-in OpenAPI support in ASP.NET Core 9. Replaces
AddSwaggerGen()withAddOpenApi(),UseSwaggerUI()withMapOpenApi(), removesUseSwagger(), removes Swashbuckle packages, and addsMicrosoft.AspNetCore.OpenApi.
- OpenRewrite.Recipes.Net9.UseMapStaticAssets
- Use MapStaticAssets()
- Replace
UseStaticFiles()withMapStaticAssets()for ASP.NET Core 9. Only applies when the receiver supportsIEndpointRouteBuilder(WebApplication / minimal hosting). Skips Startup.cs patterns usingIApplicationBuilderwhereMapStaticAssetsis not available.
assertj
11 recipes
- org.openrewrite.java.testing.assertj.Assertj
- AssertJ best practices
- Migrates JUnit asserts to AssertJ and applies best practices to assertions.
- org.openrewrite.java.testing.assertj.FestToAssertj
- Migrate Fest 2.x to AssertJ
- AssertJ provides a rich set of assertions, truly helpful error messages, improves test code readability. Converts Fest 2.x imports to AssertJ imports.
- org.openrewrite.java.testing.assertj.JUnitToAssertj
- Migrate JUnit asserts to AssertJ
- AssertJ provides a rich set of assertions, truly helpful error messages, improves test code readability. Converts assertions from
org.junit.jupiter.api.Assertionstoorg.assertj.core.api.Assertions. Will convert JUnit 4 to JUnit Jupiter if necessary to match and modify assertions.
- org.openrewrite.java.testing.assertj.SimplifyAssertJAssertions
- Shorten AssertJ assertions
- Replace AssertJ assertions where a dedicated assertion is available for the same actual value.
- org.openrewrite.java.testing.assertj.SimplifyChainedAssertJAssertions
- Simplify AssertJ chained assertions
- Replace AssertJ assertions where a method is called on the actual value with a dedicated assertion.
- org.openrewrite.java.testing.assertj.StaticImports
- Statically import AssertJ's
assertThat - Consistently use a static import rather than inlining the
Assertionsclass name in tests.
- Statically import AssertJ's
- org.openrewrite.java.testing.hamcrest.ConsistentHamcrestMatcherImports
- Use consistent Hamcrest matcher imports
- Use consistent imports for Hamcrest matchers, and remove wrapping
is(Matcher)calls ahead of further changes.
- org.openrewrite.java.testing.hamcrest.MigrateHamcrestToAssertJ
- Migrate Hamcrest assertions to AssertJ
- Migrate Hamcrest
assertThat(..)to AssertJAssertions.
- org.openrewrite.java.testing.hamcrest.MigrateHamcrestToJUnit5
- Migrate Hamcrest assertions to JUnit Jupiter
- Migrate Hamcrest
assertThat(..)to JUnit JupiterAssertions.
- org.openrewrite.java.testing.testng.TestNgToAssertj
- Migrate TestNG assertions to AssertJ
- Convert assertions from
org.testng.Asserttoorg.assertj.core.api.Assertions.
- org.openrewrite.java.testing.truth.MigrateTruthToAssertJ
- Migrate Google Truth to AssertJ
- Migrate Google Truth assertions to AssertJ assertions.
async
2 recipes
- OpenRewrite.Recipes.Net9.RemoveConfigureAwaitFalse
- Remove ConfigureAwait(false)
- Remove
.ConfigureAwait(false)calls that are unnecessary in ASP.NET Core and modern .NET applications (no SynchronizationContext). Do not apply to library code targeting .NET Framework.
- org.openrewrite.javascript.cleanup.async-callback-in-sync-array-method
- Detect async callbacks in synchronous array methods
- Detects async callbacks passed to array methods like .some(), .every(), .filter() which don't await promises. This is a common bug where Promise objects are always truthy.
authentication
5 recipes
- OpenRewrite.Recipes.AspNetCore2.UseGetExternalAuthenticationSchemesAsync
- Use GetExternalAuthenticationSchemesAsync()
- Replace
GetExternalAuthenticationSchemes()withGetExternalAuthenticationSchemesAsync(). The synchronous method was removed in ASP.NET Core 2.0.
- OpenRewrite.Recipes.AspNetCore2.UseHttpContextAuthExtensions
- Use HttpContext authentication extensions
- Replace
HttpContext.Authentication.Method(...)calls withHttpContext.Method(...)extension methods. TheIAuthenticationManagerinterface was removed in ASP.NET Core 2.0.
- OpenRewrite.Recipes.AspNetCore2.UseUseAuthentication
- Replace UseIdentity() with UseAuthentication()
- Replace
app.UseIdentity()withapp.UseAuthentication(). TheUseIdentitymethod was removed in ASP.NET Core 2.0 in favor ofUseAuthentication.
- io.quarkus.updates.core.quarkus30.JavaxAuthenticationMigrationToJakartaAuthentication
- Migrate deprecated
javax.security.auth.messagepackages tojakarta.security.auth.message - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxAuthenticationMigrationToJakartaAuthentication
- Migrate deprecated
javax.security.auth.messagepackages tojakarta.security.auth.message - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
authorization
2 recipes
- io.quarkus.updates.core.quarkus30.JavaxAuthorizationMigrationToJakartaAuthorization
- Migrate deprecated
javax.security.jaccpackages tojakarta.security.jacc - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxAuthorizationMigrationToJakartaAuthorization
- Migrate deprecated
javax.security.jaccpackages tojakarta.security.jacc - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
AWS
57 recipes
- org.openrewrite.terraform.aws.AWSBestPractices
- Best practices for AWS
- Securely operate on Amazon Web Services.
- org.openrewrite.terraform.aws.DisableInstanceMetadataServiceV1
- Disable Instance Metadata Service version 1
- As a request/response method IMDSv1 is prone to local misconfigurations.
- org.openrewrite.terraform.aws.EnableApiGatewayCaching
- Enable API gateway caching
- Enable caching for all methods of API Gateway.
- org.openrewrite.terraform.aws.EnableDynamoDbPITR
- Enable point-in-time recovery for DynamoDB
- DynamoDB Point-In-Time Recovery (PITR) is an automatic backup service for DynamoDB table data that helps protect your DynamoDB tables from accidental write or delete operations.
- org.openrewrite.terraform.aws.EnableECRScanOnPush
- Scan images pushed to ECR
- ECR Image Scanning assesses and identifies operating system vulnerabilities. Using automated image scans you can ensure container image vulnerabilities are found before getting pushed to production.
- org.openrewrite.terraform.aws.EncryptAuroraClusters
- Encrypt Aurora clusters
- Native Aurora encryption helps protect your cloud applications and fulfils compliance requirements for data-at-rest encryption.
- org.openrewrite.terraform.aws.EncryptCodeBuild
- Encrypt CodeBuild projects
- Build artifacts, such as a cache, logs, exported raw test report data files, and build results, are encrypted by default using CMKs for Amazon S3 that are managed by the AWS Key Management Service.
- org.openrewrite.terraform.aws.EncryptDAXStorage
- Encrypt DAX storage at rest
- DAX encryption at rest automatically integrates with AWS KMS for managing the single service default key used to encrypt clusters.
- org.openrewrite.terraform.aws.EncryptDocumentDB
- Encrypt DocumentDB storage
- The encryption feature available for Amazon DocumentDB clusters provides an additional layer of data protection by helping secure your data against unauthorized access to the underlying storage.
- org.openrewrite.terraform.aws.EncryptEBSSnapshots
- Encrypt EBS snapshots
- EBS snapshots should be encrypted, as they often include sensitive information, customer PII or CPNI.
- org.openrewrite.terraform.aws.EncryptEBSVolumeLaunchConfiguration
- Encrypt EBS volume launch configurations
- EBS volumes allow you to create encrypted launch configurations when creating EC2 instances and auto scaling. When the entire EBS volume is encrypted, data stored at rest on the volume, disk I/O, snapshots created from the volume, and data in-transit between EBS and EC2 are all encrypted.
- org.openrewrite.terraform.aws.EncryptEBSVolumes
- Encrypt EBS volumes
- Encrypting EBS volumes ensures that replicated copies of your images are secure even if they are accidentally exposed. AWS EBS encryption uses AWS KMS customer master keys (CMK) when creating encrypted volumes and snapshots. Storing EBS volumes in their encrypted state reduces the risk of data exposure or data loss.
- org.openrewrite.terraform.aws.EncryptEFSVolumesInECSTaskDefinitionsInTransit
- Encrypt EFS Volumes in ECS Task Definitions in transit
- Enable attached EFS definitions in ECS tasks to use encryption in transit.
- org.openrewrite.terraform.aws.EncryptElastiCacheRedisAtRest
- Encrypt ElastiCache Redis at rest
- ElastiCache for Redis offers default encryption at rest as a service.
- org.openrewrite.terraform.aws.EncryptElastiCacheRedisInTransit
- Encrypt ElastiCache Redis in transit
- ElastiCache for Redis offers optional encryption in transit. In-transit encryption provides an additional layer of data protection when transferring data over standard HTTPS protocol.
- org.openrewrite.terraform.aws.EncryptNeptuneStorage
- Encrypt Neptune storage
- Encryption of Neptune storage protects data and metadata against unauthorized access.
- org.openrewrite.terraform.aws.EncryptRDSClusters
- Encrypt RDS clusters
- Native RDS encryption helps protect your cloud applications and fulfils compliance requirements for data-at-rest encryption.
- org.openrewrite.terraform.aws.EncryptRedshift
- Encrypt Redshift storage at rest
- Redshift clusters should be securely encrypted at rest.
- org.openrewrite.terraform.aws.EnsureAWSCMKRotationIsEnabled
- Ensure AWS CMK rotation is enabled
- Ensure AWS CMK rotation is enabled.
- org.openrewrite.terraform.aws.EnsureAWSEFSWithEncryptionForDataAtRestIsEnabled
- Ensure AWS EFS with encryption for data at rest is enabled
- Ensure AWS EFS with encryption for data at rest is enabled.
- org.openrewrite.terraform.aws.EnsureAWSEKSClusterEndpointAccessIsPubliclyDisabled
- Ensure AWS EKS cluster endpoint access is publicly disabled
- Ensure AWS EKS cluster endpoint access is publicly disabled.
- org.openrewrite.terraform.aws.EnsureAWSElasticsearchDomainEncryptionForDataAtRestIsEnabled
- Ensure AWS Elasticsearch domain encryption for data at rest is enabled
- Ensure AWS Elasticsearch domain encryption for data at rest is enabled.
- org.openrewrite.terraform.aws.EnsureAWSElasticsearchDomainsHaveEnforceHTTPSEnabled
- Ensure AWS Elasticsearch domains have
EnforceHTTPSenabled - Ensure AWS Elasticsearch domains have
EnforceHTTPSenabled.
- Ensure AWS Elasticsearch domains have
- org.openrewrite.terraform.aws.EnsureAWSElasticsearchHasNodeToNodeEncryptionEnabled
- Ensure AWS Elasticsearch has node-to-node encryption enabled
- Ensure AWS Elasticsearch has node-to-node encryption enabled.
- org.openrewrite.terraform.aws.EnsureAWSIAMPasswordPolicyHasAMinimumOf14Characters
- Ensure AWS IAM password policy has a minimum of 14 characters
- Ensure AWS IAM password policy has a minimum of 14 characters.
- org.openrewrite.terraform.aws.EnsureAWSLambdaFunctionIsConfiguredForFunctionLevelConcurrentExecutionLimit
- Ensure AWS Lambda function is configured for function-level concurrent execution limit
- Ensure AWS Lambda function is configured for function-level concurrent execution limit.
- org.openrewrite.terraform.aws.EnsureAWSLambdaFunctionsHaveTracingEnabled
- Ensure AWS Lambda functions have tracing enabled
- Ensure AWS Lambda functions have tracing enabled.
- org.openrewrite.terraform.aws.EnsureAWSRDSDatabaseInstanceIsNotPubliclyAccessible
- Ensure AWS RDS database instance is not publicly accessible
- Ensure AWS RDS database instance is not publicly accessible.
- org.openrewrite.terraform.aws.EnsureAWSS3ObjectVersioningIsEnabled
- Ensure AWS S3 object versioning is enabled
- Ensure AWS S3 object versioning is enabled.
- org.openrewrite.terraform.aws.EnsureAmazonEKSControlPlaneLoggingEnabledForAllLogTypes
- Ensure Amazon EKS control plane logging enabled for all log types
- Ensure Amazon EKS control plane logging enabled for all log types.
- org.openrewrite.terraform.aws.EnsureCloudTrailLogFileValidationIsEnabled
- Ensure CloudTrail log file validation is enabled
- Ensure CloudTrail log file validation is enabled.
- org.openrewrite.terraform.aws.EnsureDataStoredInAnS3BucketIsSecurelyEncryptedAtRest
- Ensure data stored in an S3 bucket is securely encrypted at rest
- Ensure data stored in an S3 bucket is securely encrypted at rest.
- org.openrewrite.terraform.aws.EnsureDetailedMonitoringForEC2InstancesIsEnabled
- Ensure detailed monitoring for EC2 instances is enabled
- Ensure detailed monitoring for EC2 instances is enabled.
- org.openrewrite.terraform.aws.EnsureEC2IsEBSOptimized
- Ensure EC2 is EBS optimized
- Ensure EC2 is EBS optimized.
- org.openrewrite.terraform.aws.EnsureECRRepositoriesAreEncrypted
- Ensure ECR repositories are encrypted
- Ensure ECR repositories are encrypted.
- org.openrewrite.terraform.aws.EnsureEnhancedMonitoringForAmazonRDSInstancesIsEnabled
- Ensure enhanced monitoring for Amazon RDS instances is enabled
- Ensure enhanced monitoring for Amazon RDS instances is enabled.
- org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyExpiresPasswordsWithin90DaysOrLess
- Ensure IAM password policy expires passwords within 90 days or less
- Ensure IAM password policy expires passwords within 90 days or less.
- org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyPreventsPasswordReuse
- Ensure IAM password policy prevents password reuse
- Ensure IAM password policy prevents password reuse.
- org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyRequiresAtLeastOneLowercaseLetter
- Ensure IAM password policy requires at least one lowercase letter
- Ensure IAM password policy requires at least one lowercase letter.
- org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyRequiresAtLeastOneNumber
- Ensure IAM password policy requires at least one number
- Ensure IAM password policy requires at least one number.
- org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyRequiresAtLeastOneSymbol
- Ensure IAM password policy requires at least one symbol
- Ensure IAM password policy requires at least one symbol.
- org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyRequiresAtLeastOneUppercaseLetter
- Ensure IAM password policy requires at least one uppercase letter
- Ensure IAM password policy requires at least one uppercase letter.
- org.openrewrite.terraform.aws.EnsureKinesisStreamIsSecurelyEncrypted
- Ensure Kinesis Stream is securely encrypted
- Ensure Kinesis Stream is securely encrypted.
- org.openrewrite.terraform.aws.EnsureRDSDatabaseHasIAMAuthenticationEnabled
- Ensure RDS database has IAM authentication enabled
- Ensure RDS database has IAM authentication enabled.
- org.openrewrite.terraform.aws.EnsureRDSInstancesHaveMultiAZEnabled
- Ensure RDS instances have Multi-AZ enabled
- Ensure RDS instances have Multi-AZ enabled.
- org.openrewrite.terraform.aws.EnsureRespectiveLogsOfAmazonRDSAreEnabled
- Ensure respective logs of Amazon RDS are enabled
- Ensure respective logs of Amazon RDS are enabled.
- org.openrewrite.terraform.aws.EnsureTheS3BucketHasAccessLoggingEnabled
- Ensure the S3 bucket has access logging enabled
- Ensure the S3 bucket has access logging enabled.
- org.openrewrite.terraform.aws.EnsureVPCSubnetsDoNotAssignPublicIPByDefault
- Ensure VPC subnets do not assign public IP by default
- Ensure VPC subnets do not assign public IP by default.
- org.openrewrite.terraform.aws.ImmutableECRTags
- Make ECR tags immutable
- Amazon ECR supports immutable tags, preventing image tags from being overwritten. In the past, ECR tags could have been overwritten, this could be overcome by requiring users to uniquely identify an image using a naming convention.
- org.openrewrite.terraform.aws.UpgradeAwsAuroraMySqlToV3
- Upgrade AWS Aurora MySQL to version 3 (MySQL 8.0)
- Upgrade
engine_versionto Aurora MySQL version 3 (MySQL 8.0 compatible) onaws_rds_clusterresources and setallow_major_version_upgrade = trueto permit the major version change.
- org.openrewrite.terraform.aws.UpgradeAwsAuroraPostgresToV17
- Upgrade AWS Aurora PostgreSQL to 17
- Upgrade
engine_versionto Aurora PostgreSQL 17 onaws_rds_clusterresources and setallow_major_version_upgrade = trueto permit the major version change.
- org.openrewrite.terraform.aws.UpgradeAwsRdsMySqlToV8_4
- Upgrade AWS RDS MySQL to 8.4
- Upgrade
engine_versionto MySQL 8.4 onaws_db_instanceresources and setallow_major_version_upgrade = trueto permit the major version change.
- org.openrewrite.terraform.aws.UpgradeAwsRdsPostgresToV17
- Upgrade AWS RDS PostgreSQL to 17
- Upgrade
engine_versionto PostgreSQL 17 onaws_db_instanceresources and setallow_major_version_upgrade = trueto permit the major version change.
- org.openrewrite.terraform.aws.UseHttpsForCloudfrontDistribution
- Use HTTPS for Cloudfront distribution
- Secure communication by default.
- software.amazon.awssdk.v2migration.AddS3EventNotificationDependency
- Add AWS SDK for Java v2 S3 Event Notification dependency if needed
- This recipe will add the Java v2 S3 Event Notification dependency if v1 S3EventNotification is used
- software.amazon.awssdk.v2migration.AddTransferManagerDependency
- Add AWS SDK for Java v2 S3 Transfer Manager dependency if needed
- This recipe will add the Java v2 S3 Transfer Manager dependency if v1 Transfer Manager is used
- software.amazon.awssdk.v2migration.AwsSdkJavaV1ToV2
- Migrate from the AWS SDK for Java v1 to the AWS SDK for Java v2
- This recipe will apply changes required for migrating from the AWS SDK for Java v1 to the AWS SDK for Java v2.
Azure
49 recipes
- org.openrewrite.terraform.azure.AzureBestPractices
- Best practices for Azure
- Securely operate on Microsoft Azure.
- org.openrewrite.terraform.azure.DisableKubernetesDashboard
- Disable Kubernetes dashboard
- Disabling the dashboard eliminates it as an attack vector. The dashboard add-on is disabled by default for all new clusters created on Kubernetes 1.18 or greater.
- org.openrewrite.terraform.azure.EnableAzureStorageAccountTrustedMicrosoftServicesAccess
- Enable Azure Storage Account Trusted Microsoft Services access
- Certain Microsoft services that interact with storage accounts operate from networks that cannot be granted access through network rules. Using this configuration, you can allow the set of trusted Microsoft services to bypass those network rules.
- org.openrewrite.terraform.azure.EnableAzureStorageSecureTransferRequired
- Enable Azure Storage secure transfer required
- Microsoft recommends requiring secure transfer for all storage accounts.
- org.openrewrite.terraform.azure.EnableGeoRedundantBackupsOnPostgreSQLServer
- Enable geo-redundant backups on PostgreSQL server
- Ensure PostgreSQL server enables geo-redundant backups.
- org.openrewrite.terraform.azure.EncryptAzureVMDataDiskWithADECMK
- Encrypt Azure VM data disk with ADE/CMK
- Ensure Azure VM data disk is encrypted with ADE/CMK.
- org.openrewrite.terraform.azure.EnsureAKSPoliciesAddOn
- Ensure AKS policies add-on
- Azure Policy Add-on for Kubernetes service (AKS) extends Gatekeeper v3, an admission controller webhook for Open Policy Agent (OPA), to apply at-scale enforcements and safeguards on your clusters in a centralized, consistent manner.
- org.openrewrite.terraform.azure.EnsureAKVSecretsHaveAnExpirationDateSet
- Ensure AKV secrets have an expiration date set
- Ensure AKV secrets have an expiration date set.
- org.openrewrite.terraform.azure.EnsureASecurityContactPhoneNumberIsPresent
- Ensure a security contact phone number is present
- Ensure a security contact phone number is present.
- org.openrewrite.terraform.azure.EnsureActivityLogRetentionIsSetTo365DaysOrGreater
- Ensure activity log retention is set to 365 days or greater
- Ensure activity log retention is set to 365 days or greater.
- org.openrewrite.terraform.azure.EnsureAllKeysHaveAnExpirationDate
- Ensure all keys have an expiration date
- Ensure all keys have an expiration date.
- org.openrewrite.terraform.azure.EnsureAppServiceEnablesDetailedErrorMessages
- Ensure app service enables detailed error messages
- Ensure app service enables detailed error messages.
- org.openrewrite.terraform.azure.EnsureAppServiceEnablesFailedRequestTracing
- Ensure app service enables failed request tracing
- Ensure app service enables failed request tracing.
- org.openrewrite.terraform.azure.EnsureAppServiceEnablesHTTPLogging
- Ensure app service enables HTTP logging
- Ensure app service enables HTTP logging.
- org.openrewrite.terraform.azure.EnsureAppServicesUseAzureFiles
- Ensure app services use Azure files
- Ensure app services use Azure files.
- org.openrewrite.terraform.azure.EnsureAzureAppServiceWebAppRedirectsHTTPToHTTPS
- Ensure Azure App Service Web app redirects HTTP to HTTPS
- Ensure Azure App Service Web app redirects HTTP to HTTPS.
- org.openrewrite.terraform.azure.EnsureAzureApplicationGatewayHasWAFEnabled
- Ensure Azure application gateway has WAF enabled
- Ensure Azure application gateway has WAF enabled.
- org.openrewrite.terraform.azure.EnsureAzureKeyVaultIsRecoverable
- Ensure Azure key vault is recoverable
- Ensure Azure key vault is recoverable.
- org.openrewrite.terraform.azure.EnsureAzureNetworkWatcherNSGFlowLogsRetentionIsGreaterThan90Days
- Ensure Azure Network Watcher NSG flow logs retention is greater than 90 days
- Ensure Azure Network Watcher NSG flow logs retention is greater than 90 days.
- org.openrewrite.terraform.azure.EnsureAzurePostgreSQLDatabaseServerWithSSLConnectionIsEnabled
- Ensure Azure PostgreSQL database server with SSL connection is enabled
- Ensure Azure PostgreSQL database server with SSL connection is enabled.
- org.openrewrite.terraform.azure.EnsureAzureSQLServerAuditLogRetentionIsGreaterThan90Days
- Ensure Azure SQL server audit log retention is greater than 90 days
- Ensure Azure SQL server audit log retention is greater than 90 days.
- org.openrewrite.terraform.azure.EnsureAzureSQLServerSendAlertsToFieldValueIsSet
- Ensure Azure SQL server send alerts to field value is set
- Ensure Azure SQL server send alerts to field value is set.
- org.openrewrite.terraform.azure.EnsureAzureSQLServerThreatDetectionAlertsAreEnabledForAllThreatTypes
- Ensure Azure SQL Server threat detection alerts are enabled for all threat types
- Ensure Azure SQL Server threat detection alerts are enabled for all threat types.
- org.openrewrite.terraform.azure.EnsureFTPDeploymentsAreDisabled
- Ensure FTP Deployments are disabled
- Ensure FTP Deployments are disabled.
- org.openrewrite.terraform.azure.EnsureKeyVaultAllowsFirewallRulesSettings
- Ensure key vault allows firewall rules settings
- Ensure key vault allows firewall rules settings.
- org.openrewrite.terraform.azure.EnsureKeyVaultEnablesPurgeProtection
- Ensure key vault enables purge protection
- Ensure key vault enables purge protection.
- org.openrewrite.terraform.azure.EnsureKeyVaultKeyIsBackedByHSM
- Ensure key vault key is backed by HSM
- Ensure key vault key is backed by HSM.
- org.openrewrite.terraform.azure.EnsureKeyVaultSecretsHaveContentTypeSet
- Ensure key vault secrets have
content_typeset - Ensure key vault secrets have
content_typeset.
- Ensure key vault secrets have
- org.openrewrite.terraform.azure.EnsureLogProfileIsConfiguredToCaptureAllActivities
- Ensure log profile is configured to capture all activities
- Ensure log profile is configured to capture all activities.
- org.openrewrite.terraform.azure.EnsureMSSQLServersHaveEmailServiceAndCoAdministratorsEnabled
- Ensure MSSQL servers have email service and co-administrators enabled
- Ensure MSSQL servers have email service and co-administrators enabled.
- org.openrewrite.terraform.azure.EnsureManagedIdentityProviderIsEnabledForAppServices
- Ensure managed identity provider is enabled for app services
- Ensure managed identity provider is enabled for app services.
- org.openrewrite.terraform.azure.EnsureMySQLIsUsingTheLatestVersionOfTLSEncryption
- Ensure MySQL is using the latest version of TLS encryption
- Ensure MySQL is using the latest version of TLS encryption.
- org.openrewrite.terraform.azure.EnsureMySQLServerDatabasesHaveEnforceSSLConnectionEnabled
- Ensure MySQL server databases have Enforce SSL connection enabled
- Ensure MySQL server databases have Enforce SSL connection enabled.
- org.openrewrite.terraform.azure.EnsureMySQLServerDisablesPublicNetworkAccess
- Ensure MySQL server disables public network access
- Ensure MySQL server disables public network access.
- org.openrewrite.terraform.azure.EnsureMySQLServerEnablesGeoRedundantBackups
- Ensure MySQL server enables geo-redundant backups
- Ensure MySQL server enables geo-redundant backups.
- org.openrewrite.terraform.azure.EnsureMySQLServerEnablesThreatDetectionPolicy
- Ensure MySQL server enables Threat Detection policy
- Ensure MySQL server enables Threat Detection policy.
- org.openrewrite.terraform.azure.EnsurePostgreSQLServerDisablesPublicNetworkAccess
- Ensure PostgreSQL server disables public network access
- Ensure PostgreSQL server disables public network access.
- org.openrewrite.terraform.azure.EnsurePostgreSQLServerEnablesInfrastructureEncryption
- Ensure PostgreSQL server enables infrastructure encryption
- Ensure PostgreSQL server enables infrastructure encryption.
- org.openrewrite.terraform.azure.EnsurePostgreSQLServerEnablesThreatDetectionPolicy
- Ensure PostgreSQL server enables Threat Detection policy
- Ensure PostgreSQL server enables Threat Detection policy.
- org.openrewrite.terraform.azure.EnsurePublicNetworkAccessEnabledIsSetToFalseForMySQLServers
- Ensure public network access enabled is set to False for mySQL servers
- Ensure public network access enabled is set to False for mySQL servers.
- org.openrewrite.terraform.azure.EnsureSendEmailNotificationForHighSeverityAlertsIsEnabled
- Ensure Send email notification for high severity alerts is enabled
- Ensure Send email notification for high severity alerts is enabled.
- org.openrewrite.terraform.azure.EnsureSendEmailNotificationForHighSeverityAlertsToAdminsIsEnabled
- Ensure Send email notification for high severity alerts to admins is enabled
- Ensure Send email notification for high severity alerts to admins is enabled.
- org.openrewrite.terraform.azure.EnsureStandardPricingTierIsSelected
- Ensure standard pricing tier is selected
- Ensure standard pricing tier is selected.
- org.openrewrite.terraform.azure.EnsureStorageAccountUsesLatestTLSVersion
- Ensure storage account uses latest TLS version
- Communication between an Azure Storage account and a client application is encrypted using Transport Layer Security (TLS). Microsoft recommends using the latest version of TLS for all your Microsoft Azure App Service web applications.
- org.openrewrite.terraform.azure.EnsureTheStorageContainerStoringActivityLogsIsNotPubliclyAccessible
- Ensure the storage container storing activity logs is not publicly accessible
- Ensure the storage container storing activity logs is not publicly accessible.
- org.openrewrite.terraform.azure.EnsureWebAppHasIncomingClientCertificatesEnabled
- Ensure Web App has incoming client certificates enabled
- Ensure Web App has incoming client certificates enabled.
- org.openrewrite.terraform.azure.EnsureWebAppUsesTheLatestVersionOfHTTP
- Ensure Web App uses the latest version of HTTP
- Ensure Web App uses the latest version of HTTP.
- org.openrewrite.terraform.azure.EnsureWebAppUsesTheLatestVersionOfTLSEncryption
- Ensure Web App uses the latest version of TLS encryption
- Ensure Web App uses the latest version of TLS encryption.
- org.openrewrite.terraform.azure.SetAzureStorageAccountDefaultNetworkAccessToDeny
- Set Azure Storage Account default network access to deny
- Ensure Azure Storage Account default network access is set to Deny.
batch
9 recipes
- io.quarkus.updates.core.quarkus30.ChangeJavaxAnnotationToJakarta
- Migrate deprecated
javax.annotationpackages tojakarta.annotation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation. Excludes
javax.annotation.processing.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxAnnotationPackageToJakarta
- Migrate deprecated
javax.annotationpackages tojakarta.annotation - Change type of classes in the
javax.annotationpackage to jakarta.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxAnnotationSecurityPackageToJakarta
- Migrate deprecated
javax.annotation.securitypackages tojakarta.annotation.security - Change type of classes in the
javax.annotation.securitypackage to jakarta.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxAnnotationSqlPackageToJakarta
- Migrate deprecated
javax.annotation.sqlpackages tojakarta.annotation.sql - Change type of classes in the
javax.annotation.sqlpackage to jakarta.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxBatchMigrationToJakartaBatch
- Migrate deprecated
javax.batchpackages tojakarta.batch - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxBatchMigrationToJakartaBatch
- Migrate deprecated
javax.batchpackages tojakarta.batch - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.spring.batch.SpringBatch4To5Migration
- Migrate to Spring Batch 5.0 from 4.3
- Migrate applications built on Spring Batch 4.3 to the latest Spring Batch 5.0 release.
- org.openrewrite.java.spring.batch.SpringBatch5To6Migration
- Migrate to Spring Batch 6.0 from 5.2
- Migrate applications built on Spring Batch 5.2 to the latest Spring Batch 6.0 release.
- org.openrewrite.quarkus.spring.SpringBootBatchToQuarkus
- Replace Spring Boot Batch with Quarkus Scheduler
- Migrates
spring-boot-starter-batchtoquarkus-scheduler.
batchXML
1 recipe
- com.oracle.weblogic.rewrite.jakarta.JavaxBatchXmlToJakarta9BatchXml
- Migrate xmlns entries in
batch.xmlfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
bean validation
1 recipe
- org.openrewrite.java.migrate.jakarta.JavaxBeanValidationXmlToJakartaBeanValidationXml
- Migrate xmlns entries and javax. packages in
validation.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries and javax. packages in
beans
2 recipes
- com.oracle.weblogic.rewrite.jakarta.JavaxBeansXmlToJakarta9BeansXml
- Migrate xmlns entries in
beans.xmlfiles for Beans 3.0. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JavaxBeansXmlToJakartaBeansXml
- Migrate xmlns entries in
beans.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
best
1 recipe
- org.openrewrite.java.migrate.JavaBestPractices
- Java best practices
- Applies opinionated best practices for Java projects targeting Java 25. This recipe includes the full Java 25 upgrade chain plus additional improvements to code style, API usage, and third-party dependency reduction that go beyond what the version migration recipes apply.
- Tags: best-practices
bindings
1 recipe
- com.oracle.weblogic.rewrite.jakarta.JavaxBindingsSchemaXjbsToJakarta9BindingsSchemaXjbs
- Migrate xmlns entries in
*.xjbfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
bom
2 recipes
- org.openrewrite.quarkus.spring.CustomizeQuarkusVersion
- Customize Quarkus BOM Version
- Allows customization of the Quarkus BOM version used in the migration. By default uses 3.x (latest 3.x version), but can be configured to use a specific version.
- org.openrewrite.quarkus.spring.SpringBootToQuarkus
- Migrate Spring Boot to Quarkus
- Replace Spring Boot with Quarkus.
boot
78 recipes
- io.moderne.java.spring.boot.ReplaceSpringFrameworkDepsWithBootStarters
- Replace Spring Framework dependencies with Spring Boot starters
- Replace common Spring Framework dependencies with their Spring Boot starter equivalents. This recipe handles the direct dependency replacement; any remaining Spring Framework dependencies that become transitively available through starters are cleaned up separately by RemoveRedundantDependencies.
- io.moderne.java.spring.boot.SpringToSpringBoot
- Migrate Spring Framework to Spring Boot
- Migrate non Spring Boot applications to the latest compatible Spring Boot release. This recipe will modify an application's build files introducing Maven dependency management for Spring Boot, or adding the Gradle Spring Boot build plugin.
- io.moderne.java.spring.boot2.UpgradeSpringBoot_2_0
- Migrate to Spring Boot 2.0 (Moderne Edition)
- Migrate applications to the latest Spring Boot 2.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.0.
- io.moderne.java.spring.boot3.CommentDeprecations
- Comment deprecated methods in Spring 3.4
- Spring Boot 3.4 deprecates methods that are not commonly used or need manual interaction.
- io.moderne.java.spring.boot3.ReplaceTaskExecutorNameByApplicationTaskExecutorName
- Use bean name
applicationTaskExecutorinstead oftaskExecutor - Spring Boot 3.5 removed the bean name
taskExecutor. Where this bean name is used, the recipe replaces the bean name toapplicationTaskExecutor. This also includes instances where the developer provided their own bean namedtaskExecutor. This also includes scenarios where JSR-250's@Resourceannotation is used.
- Use bean name
- io.moderne.java.spring.boot3.ResolveDeprecationsSpringBoot_3_3
- Resolve Deprecations in Spring Boot 3.3
- Migrates Deprecations in the Spring Boot 3.3 Release. Contains the removal of
DefaultJmsListenerContainerFactoryConfigurer.setObservationRegistryand adds new parameter ofWebEndpointDiscovererconstructor.
- io.moderne.java.spring.boot3.SpringBoot34Deprecations
- Migrate Spring Boot 3.4 deprecated classes and methods
- Migrate deprecated classes and methods that have been marked for removal in Spring Boot 4.0. This includes constructor changes for
EntityManagerFactoryBuilder,HikariCheckpointRestoreLifecycle, and various actuator endpoint discovery classes.
- io.moderne.java.spring.boot3.SpringBoot35Deprecations
- Migrate Spring Boot 3.5 deprecated classes and methods
- Migrate deprecated classes and methods that have been marked for removal in Spring Boot 3.5.
- io.moderne.java.spring.boot3.SpringBoot3BestPractices
- Spring Boot 3.5 best practices
- Applies best practices to Spring Boot 3.5+ applications.
- io.moderne.java.spring.boot3.SpringBootProperties_3_4
- Migrate
@EndpointSecurity properties to 3.4 (Moderne Edition) - Migrate the settings for Spring Boot Management Endpoint Security from
true|falsetoread-only|none.
- Migrate
- io.moderne.java.spring.boot3.UpdateOpenTelemetryResourceAttributes
- Update OpenTelemetry resource attributes
- The
service.groupresource attribute has been deprecated for OpenTelemetry in Spring Boot 3.5. Consider using alternative attributes or remove the deprecated attribute.
- io.moderne.java.spring.boot3.UpgradeGradle7Spring34
- Upgrade Gradle to 7.6.4+ for Spring Boot 3.4
- Spring Boot 3.4 requires Gradle 7.6.4.
- io.moderne.java.spring.boot3.UpgradeGradle8Spring34
- Upgrade Gradle 8 to 8.4+ for Spring Boot 3.4
- Spring Boot 3.4 requires Gradle 8.4+.
- io.moderne.java.spring.boot3.UpgradeSpringBoot_3_4
- Migrate to Spring Boot 3.4 (Moderne Edition)
- Migrate applications to the latest Spring Boot 3.4 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 3.4.
- io.moderne.java.spring.boot3.UpgradeSpringBoot_3_5
- Migrate to Spring Boot 3.5 (Moderne Edition)
- Migrate applications to the latest Spring Boot 3.5 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 3.5.
- io.moderne.java.spring.boot4.AddJackson2ForJerseyJson
- Add Jackson2 for Jersey using JSON
- Check whether a module uses Jersey on combination with JSON and adds the needed
spring-boot-jacksondependency and conditionallyspring-boot-jackson2dependency.
- io.moderne.java.spring.boot4.AddModularStarters
- Add Spring Boot 4.0 modular starters
- Add Spring Boot 4.0 starter dependencies based on package usage. Note: Higher-level starters (like data-jpa) include lower-level ones (like jdbc) transitively, so only the highest-level detected starter is added for each technology.
- io.moderne.java.spring.boot4.AddMongoDbRepresentationProperties
- Add MongoDB representation properties for UUID and BigDecimal
- Adds the 'spring.mongodb.representation.uuid' property with value 'standard' and the 'spring.data.mongodb.representation.big-decimal' property with the value 'decimal128' to Spring configuration files when a MongoDB dependency is detected.
- io.moderne.java.spring.boot4.AddValidationStarterDependency
- Add
spring-boot-starter-validationdependency - In Spring Boot 4, validation is no longer auto-included from the web starter. This recipe adds the
spring-boot-starter-validationdependency when Jakarta Validation annotations are used in the project.
- Add
- io.moderne.java.spring.boot4.AdoptJackson3
- Adopt Jackson 3
- Adopt Jackson 3 which is supported by Spring Boot 4 and Jackson 2 support is deprecated.
- io.moderne.java.spring.boot4.MigrateHazelcastSpringSession
- Migrate Spring Session Hazelcast to Hazelcast Spring Session
- Spring Boot 4.0 removed direct support for Spring Session Hazelcast. The Hazelcast team now maintains their own Spring Session integration. This recipe changes the dependency from
org.springframework.session:spring-session-hazelcasttocom.hazelcast.spring:hazelcast-spring-sessionand updates the package fromorg.springframework.session.hazelcasttocom.hazelcast.spring.session.
- io.moderne.java.spring.boot4.MigrateMockMvcToAssertJ
- Migrate MockMvc to AssertJ assertions
- Migrates Spring MockMvc tests from Hamcrest-style
andExpect()assertions to AssertJ-style fluent assertions. ChangesMockMvctoMockMvcTesterand converts assertion chains.
- io.moderne.java.spring.boot4.MigrateRestAssured
- Add explicit version for REST Assured
- REST Assured is no longer managed by Spring Boot 4.0. This recipe adds an explicit version to REST Assured dependencies.
- io.moderne.java.spring.boot4.MigrateSpringRetry
- Migrate Spring Retry to Spring Resilience
- Handle spring-retry no longer managed by Spring Boot and the possible migration to Spring Core Resilience.
- io.moderne.java.spring.boot4.MigrateToModularStarters
- Migrate to Spring Boot 4.0 modular starters (Moderne Edition)
- Remove monolithic starters and adds the necessary Spring Boot 4.0 starter dependencies based on package usage, where any spring-boot-starter was used previously.
- io.moderne.java.spring.boot4.ModuleStarterRelocations
- Spring Boot 4.0 Module Starter Relocations
- Relocate types and packages for Spring Boot 4.0 modular starters.
- io.moderne.java.spring.boot4.RemoveSpringPulsarReactive
- Remove Spring Pulsar Reactive support
- Spring Boot 4.0 removed support for Spring Pulsar Reactive as it is no longer maintained. This recipe removes the Spring Pulsar Reactive dependencies.
- io.moderne.java.spring.boot4.SpringBoot4BestPractices
- Spring Boot 4.0 best practices
- Applies best practices to Spring Boot 4.+ applications.
- io.moderne.java.spring.boot4.UpgradeSpringBoot_4_0
- Migrate to Spring Boot 4.0 (Moderne Edition)
- Migrate applications to the latest Spring Boot 4.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 4.0.
- org.openrewrite.java.spring.boot2.SpringBoot2BestPractices
- Spring Boot 2.x best practices
- Applies best practices to Spring Boot 2 applications.
- org.openrewrite.java.spring.boot2.SpringBoot2JUnit4to5Migration
- Migrate Spring Boot 2.x projects to JUnit 5 from JUnit 4
- This recipe will migrate a Spring Boot application's tests from JUnit 4 to JUnit 5. This spring-specific migration includes conversion of Spring Test runners to Spring Test extensions and awareness of the composable Spring Test annotations.
- org.openrewrite.java.spring.boot2.SpringBootProperties_2_0
- Migrate Spring Boot properties to 2.0
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot2.SpringBootProperties_2_1
- Migrate Spring Boot properties to 2.1
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot2.SpringBootProperties_2_2
- Migrate Spring Boot properties to 2.2
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot2.SpringBootProperties_2_3
- Migrate Spring Boot properties to 2.3
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot2.SpringBootProperties_2_4
- Migrate Spring Boot properties to 2.4
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot2.SpringBootProperties_2_5
- Migrate Spring Boot properties to 2.5
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot2.SpringBootProperties_2_6
- Migrate Spring Boot properties to 2.6
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot2.SpringBootProperties_2_7
- Migrate Spring Boot properties to 2.7
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_0
- Migrate from Spring Boot 1.x to 2.0 (Community Edition)
- Migrate Spring Boot 1.x applications to the latest Spring Boot 2.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.0.
- org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_1
- Migrate to Spring Boot 2.1
- Migrate applications to the latest Spring Boot 2.1 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.1.
- org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_2
- Migrate to Spring Boot 2.2
- Migrate applications to the latest Spring Boot 2.2 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.2.
- org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_3
- Migrate to Spring Boot 2.3
- Migrate applications to the latest Spring Boot 2.3 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.3.
- org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_4
- Migrate to Spring Boot 2.4
- Migrate applications to the latest Spring Boot 2.4 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.4.
- org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_6
- Migrate to Spring Boot 2.6
- Migrate applications to the latest Spring Boot 2.6 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.6.
- org.openrewrite.java.spring.boot2.search.FindUpgradeRequirementsSpringBoot_2_5
- Find patterns that require updating for Spring Boot 2.5
- Looks for a series of patterns that have not yet had auto-remediation recipes developed for.
- org.openrewrite.java.spring.boot2.search.MessagesInTheDefaultErrorView
- Find projects affected by changes to the default error view message attribute
- As of Spring Boot 2.5 the
messageattribute in the default error view was removed rather than blanked when it is not shown.spring-webmvcorspring-webfluxprojects that parse the error response JSON may need to deal with the missing item (release notes). You can still use theserver.error.include-messageproperty if you want messages to be included.
- org.openrewrite.java.spring.boot3.ActuatorEndpointSanitization
- Remove the deprecated properties
additional-keys-to-sanitizefrom theconfigpropsandenvend points - Spring Boot 3.0 removed the key-based sanitization mechanism used in Spring Boot 2.x in favor of a unified approach. See https://github.com/openrewrite/rewrite-spring/issues/228.
- Remove the deprecated properties
- org.openrewrite.java.spring.boot3.DowngradeServletApiWhenUsingJetty
- Downgrade Jakarta Servlet API to 5.0 when using Jetty
- Jetty does not yet support Servlet 6.0. This recipe will detect the presence of the
spring-boot-starter-jettyas a first-order dependency and will add the maven propertyjakarta-servlet.versionsetting it's value to5.0.0. This will downgrade thejakarta-servletartifact if the pom's parent extends from the spring-boot-parent.
- org.openrewrite.java.spring.boot3.MigrateDropWizardDependencies
- Migrate dropWizard dependencies to Spring Boot 3.x
- Migrate dropWizard dependencies to the new artifactId, since these are changed with Spring Boot 3.
- org.openrewrite.java.spring.boot3.MigrateMaxHttpHeaderSize
- Rename
server.max-http-header-sizetoserver.max-http-request-header-size - Previously, the server.max-http-header-size was treated inconsistently across the four supported embedded web servers. When using Jetty, Netty, or Undertow it would configure the max HTTP request header size. When using Tomcat it would configure the max HTTP request and response header sizes. The renamed property is used to configure the http request header size in Spring Boot 3.0. To limit the max header size of an HTTP response on Tomcat or Jetty (the only two servers that support such a setting), use a
WebServerFactoryCustomizer.
- Rename
- org.openrewrite.java.spring.boot3.MigrateSapCfJavaLoggingSupport
- Migrate SAP cloud foundry logging support to Spring Boot 3.x
- Migrate SAP cloud foundry logging support from
cf-java-logging-support-servlettocf-java-logging-support-servlet-jakarta, to use Jakarta with Spring Boot 3.
- org.openrewrite.java.spring.boot3.MigrateThymeleafDependencies
- Migrate thymeleaf dependencies to Spring Boot 3.x
- Migrate thymeleaf dependencies to the new artifactId, since these are changed with Spring Boot 3.
- org.openrewrite.java.spring.boot3.ReplaceStringLiteralsWithConstants
- Replace String literals with Spring constants
- Replace String literals with Spring constants where applicable.
- org.openrewrite.java.spring.boot3.SpringBoot33BestPractices
- Spring Boot 3.3 best practices
- Applies best practices to Spring Boot 3 applications.
- org.openrewrite.java.spring.boot3.SpringBoot3BestPracticesOnly
- Spring Boot 3.3 best practices (only)
- Applies best practices to Spring Boot 3 applications, without chaining in upgrades to Spring Boot.
- org.openrewrite.java.spring.boot3.SpringBootProperties_3_0
- Migrate Spring Boot properties to 3.0
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot3.SpringBootProperties_3_1
- Migrate Spring Boot properties to 3.1
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot3.SpringBootProperties_3_2
- Migrate Spring Boot properties to 3.2
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot3.SpringBootProperties_3_3
- Migrate Spring Boot properties to 3.3
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot3.SpringBootProperties_3_4
- Migrate Spring Boot properties to 3.4 (Community Edition)
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot3.SpringBootProperties_3_4_EnabledToAccess
- Migrate Enabled to Access Spring Boot Properties
- Migrate properties found in
application.propertiesandapplication.yml, specifically converting 'enabled' to 'access'.
- org.openrewrite.java.spring.boot3.SpringBootProperties_3_5
- Migrate Spring Boot properties to 3.5
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_0
- Migrate to Spring Boot 3.0
- Migrate applications to the latest Spring Boot 3.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.7.
- org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_1
- Migrate to Spring Boot 3.1
- Migrate applications to the latest Spring Boot 3.1 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 3.0.
- org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_2
- Migrate to Spring Boot 3.2
- Migrate applications to the latest Spring Boot 3.2 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 3.1.
- org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_3
- Migrate to Spring Boot 3.3
- Migrate applications to the latest Spring Boot 3.3 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 3.2.
- org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_4
- Migrate to Spring Boot 3.4 (Community Edition)
- Migrate applications to the latest Spring Boot 3.4 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs.
- org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_5
- Migrate to Spring Boot 3.5 (Community Edition)
- Migrate applications to the latest Spring Boot 3.5 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs.
- org.openrewrite.java.spring.boot4.SpringBootProperties_4_0
- Migrate Spring Boot properties to 4.0
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot4.UpgradeSpringBoot_4_0
- Migrate to Spring Boot 4.0 (Community Edition)
- Migrate applications to the latest Spring Boot 4.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs.
- org.openrewrite.java.spring.opentelemetry.MigrateBraveToOpenTelemetry
- Migrate Brave API to OpenTelemetry API
- Migrate Java code using Brave (Zipkin) tracing API to OpenTelemetry API. This recipe handles the migration of Brave Tracer, Span, and related classes to OpenTelemetry equivalents.
- org.openrewrite.java.spring.opentelemetry.MigrateDatadogToOpenTelemetry
- Migrate Datadog tracing to OpenTelemetry
- Migrate from Datadog Java tracing annotations to OpenTelemetry annotations. Replace Datadog @Trace annotations with @WithSpan annotations.
- org.openrewrite.java.spring.opentelemetry.MigrateFromZipkinToOpenTelemetry
- Migrate from Zipkin to OpenTelemetry OTLP
- Migrate from Zipkin tracing to OpenTelemetry OTLP. This recipe replaces Zipkin dependencies with OpenTelemetry OTLP exporter and updates the related configuration properties.
- org.openrewrite.java.spring.opentelemetry.MigrateNewRelicToOpenTelemetry
- Migrate New Relic Agent to OpenTelemetry
- Migrate from New Relic Java Agent annotations to OpenTelemetry annotations. Replace @Trace annotations with @WithSpan annotations.
- org.openrewrite.java.spring.opentelemetry.MigrateOpenTracingToOpenTelemetry
- Migrate OpenTracing API to OpenTelemetry API
- Migrate Java code using OpenTracing API to OpenTelemetry API. OpenTracing has been superseded by OpenTelemetry and is no longer actively maintained.
- org.openrewrite.java.spring.opentelemetry.MigrateSleuthToOpenTelemetry
- Migrate from Spring Cloud Sleuth to OpenTelemetry
- Migrate from Spring Cloud Sleuth to OpenTelemetry. Spring Cloud Sleuth has been deprecated and is replaced by Micrometer Tracing with OpenTelemetry as a backend. This recipe removes Sleuth dependencies and adds OpenTelemetry instrumentation.
- org.openrewrite.java.spring.opentelemetry.MigrateToOpenTelemetry
- Complete migration to OpenTelemetry
- Comprehensive migration to OpenTelemetry including dependencies, configuration properties, and Java code changes. This recipe handles migration from Spring Cloud Sleuth, Brave/Zipkin, and OpenTracing to OpenTelemetry.
bouncycastle
2 recipes
- org.openrewrite.java.migrate.BounceCastleFromJdk15OntoJdk18On
- Migrate Bouncy Castle to
jdk18on - This recipe will upgrade Bouncy Castle dependencies from
-jdk15onor-jdk15to18to-jdk18on.
- Migrate Bouncy Castle to
- org.openrewrite.java.migrate.BouncyCastleFromJdk15OnToJdk15to18
- Migrate Bouncy Castle from
jdk15ontojdk15to18for Java < 8 - This recipe replaces the Bouncy Castle artifacts from
jdk15ontojdk15to18.jdk15onisn't maintained anymore andjdk18onis only for Java 8 and above. Thejdk15to18artifact is the up-to-date replacement of the unmaintainedjdk15onfor Java < 8.
- Migrate Bouncy Castle from
brave
1 recipe
- org.openrewrite.java.spring.opentelemetry.MigrateBraveToOpenTelemetry
- Migrate Brave API to OpenTelemetry API
- Migrate Java code using Brave (Zipkin) tracing API to OpenTelemetry API. This recipe handles the migration of Brave Tracer, Span, and related classes to OpenTelemetry equivalents.
bug
1 recipe
- org.openrewrite.javascript.cleanup.async-callback-in-sync-array-method
- Detect async callbacks in synchronous array methods
- Detects async callbacks passed to array methods like .some(), .every(), .filter() which don't await promises. This is a common bug where Promise objects are always truthy.
build
2 recipes
- org.openrewrite.quarkus.spring.CustomizeQuarkusPluginGoals
- Customize Quarkus Maven Plugin Goals
- Allows customization of Quarkus Maven plugin goals. Adds or modifies the executions and goals for the quarkus-maven-plugin.
- org.openrewrite.quarkus.spring.MigrateMavenPlugin
- Add or replace Spring Boot build plugin with Quarkus build plugin
- Remove Spring Boot Maven plugin if present and add Quarkus Maven plugin using the same version as the quarkus-bom.
byteman
1 recipe
- org.openrewrite.java.testing.byteman.BytemanJUnit4ToBytemanJUnit5
- Use Byteman JUnit 5 dependency
- Migrates Byteman JUnit 4 to JUnit 5.
cache
1 recipe
- org.openrewrite.quarkus.spring.SpringBootCacheToQuarkus
- Replace Spring Boot Cache with Quarkus Cache
- Migrates
spring-boot-starter-cachetoquarkus-cache.
cacheManager
1 recipe
- com.oracle.weblogic.rewrite.examples.spring.ChangeCacheManagerToSimpleCacheManager
- Change cacheManager to use the SimpleCacheManager
- Change cacheManager to use the SimpleCacheManager.
caching
1 recipe
- OpenRewrite.Recipes.Net9.FindDistributedCache
- Find IDistributedCache usage (HybridCache in .NET 9)
- Finds usages of
IDistributedCache. In .NET 9,HybridCacheis the recommended replacement with L1/L2 caching, stampede protection, and tag-based invalidation.
camel
1 recipe
- org.openrewrite.quarkus.spring.SpringBootIntegrationToQuarkus
- Replace Spring Boot Integration with Camel Quarkus
- Migrates
spring-boot-starter-integrationtocamel-quarkus-core.
cdi
3 recipes
- com.oracle.weblogic.rewrite.jakarta.JavaxBeansXmlToJakarta9BeansXml
- Migrate xmlns entries in
beans.xmlfiles for Beans 3.0. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JavaxBeansXmlToJakartaBeansXml
- Migrate xmlns entries in
beans.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- org.openrewrite.quarkus.spring.MigrateSpringEvents
- Migrate Spring Events to CDI Events
- Migrates Spring's event mechanism to CDI events. Converts ApplicationEventPublisher to CDI Event and @EventListener to @Observes.
cgi
2 recipes
- org.openrewrite.python.migrate.ReplaceCgiParseQs
- Replace
cgi.parse_qs()withurllib.parse.parse_qs() cgi.parse_qs()was removed in Python 3.8. Useurllib.parse.parse_qs()instead. Note: this rewrites call sites but does not manage imports. Use withChangeImportin a composite recipe to updatefromimports.
- Replace
- org.openrewrite.python.migrate.ReplaceCgiParseQsl
- Replace
cgi.parse_qsl()withurllib.parse.parse_qsl() cgi.parse_qsl()was removed in Python 3.8. Useurllib.parse.parse_qsl()instead. Note: this rewrites call sites but does not manage imports. Use withChangeImportin a composite recipe to updatefromimports.
- Replace
ci
2 recipes
- org.openrewrite.gitlab.BestPractices
- GitLab CI best practices
- Apply GitLab CI/CD best practices to
.gitlab-ci.yml. This includes addingworkflow:rulesto prevent duplicate pipelines, settinginterruptible: trueandretryin thedefaultsection, configuringartifacts:expire_in, and setting a jobtimeout.
- org.openrewrite.gitlab.search.FindDeprecatedSyntax
- Find deprecated GitLab CI syntax
- Find usages of deprecated
onlyandexceptkeywords in.gitlab-ci.yml. These keywords are deprecated in favor ofrules.
CKV
110 recipes
- org.openrewrite.terraform.aws.DisableInstanceMetadataServiceV1
- Disable Instance Metadata Service version 1
- As a request/response method IMDSv1 is prone to local misconfigurations.
- Tags: CKV_AWS_79
- org.openrewrite.terraform.aws.EnableApiGatewayCaching
- Enable API gateway caching
- Enable caching for all methods of API Gateway.
- Tags: CKV_AWS_120
- org.openrewrite.terraform.aws.EnableDynamoDbPITR
- Enable point-in-time recovery for DynamoDB
- DynamoDB Point-In-Time Recovery (PITR) is an automatic backup service for DynamoDB table data that helps protect your DynamoDB tables from accidental write or delete operations.
- Tags: CKV_AWS_28
- org.openrewrite.terraform.aws.EnableECRScanOnPush
- Scan images pushed to ECR
- ECR Image Scanning assesses and identifies operating system vulnerabilities. Using automated image scans you can ensure container image vulnerabilities are found before getting pushed to production.
- Tags: CKV_AWS_33
- org.openrewrite.terraform.aws.EncryptAuroraClusters
- Encrypt Aurora clusters
- Native Aurora encryption helps protect your cloud applications and fulfils compliance requirements for data-at-rest encryption.
- Tags: CKV_AWS_96
- org.openrewrite.terraform.aws.EncryptCodeBuild
- Encrypt CodeBuild projects
- Build artifacts, such as a cache, logs, exported raw test report data files, and build results, are encrypted by default using CMKs for Amazon S3 that are managed by the AWS Key Management Service.
- Tags: CKV_AWS_147
- org.openrewrite.terraform.aws.EncryptDAXStorage
- Encrypt DAX storage at rest
- DAX encryption at rest automatically integrates with AWS KMS for managing the single service default key used to encrypt clusters.
- Tags: CKV_AWS_47
- org.openrewrite.terraform.aws.EncryptDocumentDB
- Encrypt DocumentDB storage
- The encryption feature available for Amazon DocumentDB clusters provides an additional layer of data protection by helping secure your data against unauthorized access to the underlying storage.
- Tags: CKV_AWS_74
- org.openrewrite.terraform.aws.EncryptEBSSnapshots
- Encrypt EBS snapshots
- EBS snapshots should be encrypted, as they often include sensitive information, customer PII or CPNI.
- Tags: CKV_AWS_4
- org.openrewrite.terraform.aws.EncryptEBSVolumeLaunchConfiguration
- Encrypt EBS volume launch configurations
- EBS volumes allow you to create encrypted launch configurations when creating EC2 instances and auto scaling. When the entire EBS volume is encrypted, data stored at rest on the volume, disk I/O, snapshots created from the volume, and data in-transit between EBS and EC2 are all encrypted.
- Tags: CKV_AWS_8
- org.openrewrite.terraform.aws.EncryptEBSVolumes
- Encrypt EBS volumes
- Encrypting EBS volumes ensures that replicated copies of your images are secure even if they are accidentally exposed. AWS EBS encryption uses AWS KMS customer master keys (CMK) when creating encrypted volumes and snapshots. Storing EBS volumes in their encrypted state reduces the risk of data exposure or data loss.
- Tags: CKV_AWS_3
- org.openrewrite.terraform.aws.EncryptEFSVolumesInECSTaskDefinitionsInTransit
- Encrypt EFS Volumes in ECS Task Definitions in transit
- Enable attached EFS definitions in ECS tasks to use encryption in transit.
- Tags: CKV_AWS_97
- org.openrewrite.terraform.aws.EncryptElastiCacheRedisAtRest
- Encrypt ElastiCache Redis at rest
- ElastiCache for Redis offers default encryption at rest as a service.
- Tags: CKV_AWS_29
- org.openrewrite.terraform.aws.EncryptElastiCacheRedisInTransit
- Encrypt ElastiCache Redis in transit
- ElastiCache for Redis offers optional encryption in transit. In-transit encryption provides an additional layer of data protection when transferring data over standard HTTPS protocol.
- Tags: CKV_AWS_30
- org.openrewrite.terraform.aws.EncryptNeptuneStorage
- Encrypt Neptune storage
- Encryption of Neptune storage protects data and metadata against unauthorized access.
- Tags: CKV_AWS_44
- org.openrewrite.terraform.aws.EncryptRDSClusters
- Encrypt RDS clusters
- Native RDS encryption helps protect your cloud applications and fulfils compliance requirements for data-at-rest encryption.
- Tags: CKV_AWS_16
- org.openrewrite.terraform.aws.EncryptRedshift
- Encrypt Redshift storage at rest
- Redshift clusters should be securely encrypted at rest.
- Tags: CKV_AWS_64
- org.openrewrite.terraform.aws.EnsureAWSCMKRotationIsEnabled
- Ensure AWS CMK rotation is enabled
- Ensure AWS CMK rotation is enabled.
- Tags: CKV_AWS_7
- org.openrewrite.terraform.aws.EnsureAWSEFSWithEncryptionForDataAtRestIsEnabled
- Ensure AWS EFS with encryption for data at rest is enabled
- Ensure AWS EFS with encryption for data at rest is enabled.
- Tags: CKV_AWS_42
- org.openrewrite.terraform.aws.EnsureAWSEKSClusterEndpointAccessIsPubliclyDisabled
- Ensure AWS EKS cluster endpoint access is publicly disabled
- Ensure AWS EKS cluster endpoint access is publicly disabled.
- Tags: CKV_AWS_39
- org.openrewrite.terraform.aws.EnsureAWSElasticsearchDomainEncryptionForDataAtRestIsEnabled
- Ensure AWS Elasticsearch domain encryption for data at rest is enabled
- Ensure AWS Elasticsearch domain encryption for data at rest is enabled.
- Tags: CKV_AWS_5
- org.openrewrite.terraform.aws.EnsureAWSElasticsearchDomainsHaveEnforceHTTPSEnabled
- Ensure AWS Elasticsearch domains have
EnforceHTTPSenabled - Ensure AWS Elasticsearch domains have
EnforceHTTPSenabled. - Tags: CKV_AWS_83
- Ensure AWS Elasticsearch domains have
- org.openrewrite.terraform.aws.EnsureAWSElasticsearchHasNodeToNodeEncryptionEnabled
- Ensure AWS Elasticsearch has node-to-node encryption enabled
- Ensure AWS Elasticsearch has node-to-node encryption enabled.
- Tags: CKV_AWS_6
- org.openrewrite.terraform.aws.EnsureAWSIAMPasswordPolicyHasAMinimumOf14Characters
- Ensure AWS IAM password policy has a minimum of 14 characters
- Ensure AWS IAM password policy has a minimum of 14 characters.
- Tags: CKV_AWS_10
- org.openrewrite.terraform.aws.EnsureAWSLambdaFunctionIsConfiguredForFunctionLevelConcurrentExecutionLimit
- Ensure AWS Lambda function is configured for function-level concurrent execution limit
- Ensure AWS Lambda function is configured for function-level concurrent execution limit.
- Tags: CKV_AWS_115
- org.openrewrite.terraform.aws.EnsureAWSLambdaFunctionsHaveTracingEnabled
- Ensure AWS Lambda functions have tracing enabled
- Ensure AWS Lambda functions have tracing enabled.
- Tags: CKV_AWS_50
- org.openrewrite.terraform.aws.EnsureAWSRDSDatabaseInstanceIsNotPubliclyAccessible
- Ensure AWS RDS database instance is not publicly accessible
- Ensure AWS RDS database instance is not publicly accessible.
- Tags: CKV_AWS_17
- org.openrewrite.terraform.aws.EnsureAWSS3ObjectVersioningIsEnabled
- Ensure AWS S3 object versioning is enabled
- Ensure AWS S3 object versioning is enabled.
- Tags: CKV_AWS_21
- org.openrewrite.terraform.aws.EnsureAmazonEKSControlPlaneLoggingEnabledForAllLogTypes
- Ensure Amazon EKS control plane logging enabled for all log types
- Ensure Amazon EKS control plane logging enabled for all log types.
- Tags: CKV_AWS_37
- org.openrewrite.terraform.aws.EnsureCloudTrailLogFileValidationIsEnabled
- Ensure CloudTrail log file validation is enabled
- Ensure CloudTrail log file validation is enabled.
- Tags: CKV_AWS_36
- org.openrewrite.terraform.aws.EnsureDataStoredInAnS3BucketIsSecurelyEncryptedAtRest
- Ensure data stored in an S3 bucket is securely encrypted at rest
- Ensure data stored in an S3 bucket is securely encrypted at rest.
- Tags: CKV_AWS_19
- org.openrewrite.terraform.aws.EnsureDetailedMonitoringForEC2InstancesIsEnabled
- Ensure detailed monitoring for EC2 instances is enabled
- Ensure detailed monitoring for EC2 instances is enabled.
- Tags: CKV_AWS_126
- org.openrewrite.terraform.aws.EnsureEC2IsEBSOptimized
- Ensure EC2 is EBS optimized
- Ensure EC2 is EBS optimized.
- Tags: CKV_AWS_135
- org.openrewrite.terraform.aws.EnsureECRRepositoriesAreEncrypted
- Ensure ECR repositories are encrypted
- Ensure ECR repositories are encrypted.
- Tags: CKV_AWS_136
- org.openrewrite.terraform.aws.EnsureEnhancedMonitoringForAmazonRDSInstancesIsEnabled
- Ensure enhanced monitoring for Amazon RDS instances is enabled
- Ensure enhanced monitoring for Amazon RDS instances is enabled.
- Tags: CKV_AWS_118
- org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyExpiresPasswordsWithin90DaysOrLess
- Ensure IAM password policy expires passwords within 90 days or less
- Ensure IAM password policy expires passwords within 90 days or less.
- Tags: CKV_AWS_9
- org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyPreventsPasswordReuse
- Ensure IAM password policy prevents password reuse
- Ensure IAM password policy prevents password reuse.
- Tags: CKV_AWS_13
- org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyRequiresAtLeastOneLowercaseLetter
- Ensure IAM password policy requires at least one lowercase letter
- Ensure IAM password policy requires at least one lowercase letter.
- Tags: CKV_AWS_11
- org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyRequiresAtLeastOneNumber
- Ensure IAM password policy requires at least one number
- Ensure IAM password policy requires at least one number.
- Tags: CKV_AWS_12
- org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyRequiresAtLeastOneSymbol
- Ensure IAM password policy requires at least one symbol
- Ensure IAM password policy requires at least one symbol.
- Tags: CKV_AWS_14
- org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyRequiresAtLeastOneUppercaseLetter
- Ensure IAM password policy requires at least one uppercase letter
- Ensure IAM password policy requires at least one uppercase letter.
- Tags: CKV_AWS_15
- org.openrewrite.terraform.aws.EnsureKinesisStreamIsSecurelyEncrypted
- Ensure Kinesis Stream is securely encrypted
- Ensure Kinesis Stream is securely encrypted.
- Tags: CKV_AWS_43
- org.openrewrite.terraform.aws.EnsureRDSDatabaseHasIAMAuthenticationEnabled
- Ensure RDS database has IAM authentication enabled
- Ensure RDS database has IAM authentication enabled.
- Tags: CKV_AWS_161
- org.openrewrite.terraform.aws.EnsureRDSInstancesHaveMultiAZEnabled
- Ensure RDS instances have Multi-AZ enabled
- Ensure RDS instances have Multi-AZ enabled.
- Tags: CKV_AWS_157
- org.openrewrite.terraform.aws.EnsureRespectiveLogsOfAmazonRDSAreEnabled
- Ensure respective logs of Amazon RDS are enabled
- Ensure respective logs of Amazon RDS are enabled.
- Tags: CKV_AWS_129
- org.openrewrite.terraform.aws.EnsureTheS3BucketHasAccessLoggingEnabled
- Ensure the S3 bucket has access logging enabled
- Ensure the S3 bucket has access logging enabled.
- Tags: CKV_AWS_18
- org.openrewrite.terraform.aws.EnsureVPCSubnetsDoNotAssignPublicIPByDefault
- Ensure VPC subnets do not assign public IP by default
- Ensure VPC subnets do not assign public IP by default.
- Tags: CKV_AWS_130
- org.openrewrite.terraform.aws.ImmutableECRTags
- Make ECR tags immutable
- Amazon ECR supports immutable tags, preventing image tags from being overwritten. In the past, ECR tags could have been overwritten, this could be overcome by requiring users to uniquely identify an image using a naming convention.
- Tags: CKV_AWS_51
- org.openrewrite.terraform.aws.UseHttpsForCloudfrontDistribution
- Use HTTPS for Cloudfront distribution
- Secure communication by default.
- Tags: CKV_AWS_34
- org.openrewrite.terraform.azure.DisableKubernetesDashboard
- Disable Kubernetes dashboard
- Disabling the dashboard eliminates it as an attack vector. The dashboard add-on is disabled by default for all new clusters created on Kubernetes 1.18 or greater.
- Tags: CKV_AZURE_8
- org.openrewrite.terraform.azure.EnableAzureStorageAccountTrustedMicrosoftServicesAccess
- Enable Azure Storage Account Trusted Microsoft Services access
- Certain Microsoft services that interact with storage accounts operate from networks that cannot be granted access through network rules. Using this configuration, you can allow the set of trusted Microsoft services to bypass those network rules.
- Tags: CKV_AZURE_36
- org.openrewrite.terraform.azure.EnableAzureStorageSecureTransferRequired
- Enable Azure Storage secure transfer required
- Microsoft recommends requiring secure transfer for all storage accounts.
- Tags: CKV_AZURE_3
- org.openrewrite.terraform.azure.EnableGeoRedundantBackupsOnPostgreSQLServer
- Enable geo-redundant backups on PostgreSQL server
- Ensure PostgreSQL server enables geo-redundant backups.
- Tags: CKV_AZURE_102
- org.openrewrite.terraform.azure.EncryptAzureVMDataDiskWithADECMK
- Encrypt Azure VM data disk with ADE/CMK
- Ensure Azure VM data disk is encrypted with ADE/CMK.
- Tags: CKV_AZURE_2
- org.openrewrite.terraform.azure.EnsureAKSPoliciesAddOn
- Ensure AKS policies add-on
- Azure Policy Add-on for Kubernetes service (AKS) extends Gatekeeper v3, an admission controller webhook for Open Policy Agent (OPA), to apply at-scale enforcements and safeguards on your clusters in a centralized, consistent manner.
- Tags: CKV_AZURE_116
- org.openrewrite.terraform.azure.EnsureAKVSecretsHaveAnExpirationDateSet
- Ensure AKV secrets have an expiration date set
- Ensure AKV secrets have an expiration date set.
- Tags: CKV_AZURE_41
- org.openrewrite.terraform.azure.EnsureASecurityContactPhoneNumberIsPresent
- Ensure a security contact phone number is present
- Ensure a security contact phone number is present.
- Tags: CKV_AZURE_20
- org.openrewrite.terraform.azure.EnsureActivityLogRetentionIsSetTo365DaysOrGreater
- Ensure activity log retention is set to 365 days or greater
- Ensure activity log retention is set to 365 days or greater.
- Tags: CKV_AZURE_37
- org.openrewrite.terraform.azure.EnsureAllKeysHaveAnExpirationDate
- Ensure all keys have an expiration date
- Ensure all keys have an expiration date.
- Tags: CKV_AZURE_40
- org.openrewrite.terraform.azure.EnsureAppServiceEnablesDetailedErrorMessages
- Ensure app service enables detailed error messages
- Ensure app service enables detailed error messages.
- Tags: CKV_AZURE_65
- org.openrewrite.terraform.azure.EnsureAppServiceEnablesFailedRequestTracing
- Ensure app service enables failed request tracing
- Ensure app service enables failed request tracing.
- Tags: CKV_AZURE_66
- org.openrewrite.terraform.azure.EnsureAppServiceEnablesHTTPLogging
- Ensure app service enables HTTP logging
- Ensure app service enables HTTP logging.
- Tags: CKV_AZURE_63
- org.openrewrite.terraform.azure.EnsureAppServicesUseAzureFiles
- Ensure app services use Azure files
- Ensure app services use Azure files.
- Tags: CKV_AZURE_88
- org.openrewrite.terraform.azure.EnsureAzureAppServiceWebAppRedirectsHTTPToHTTPS
- Ensure Azure App Service Web app redirects HTTP to HTTPS
- Ensure Azure App Service Web app redirects HTTP to HTTPS.
- Tags: CKV_AZURE_14
- org.openrewrite.terraform.azure.EnsureAzureApplicationGatewayHasWAFEnabled
- Ensure Azure application gateway has WAF enabled
- Ensure Azure application gateway has WAF enabled.
- Tags: CKV_AZURE_120
- org.openrewrite.terraform.azure.EnsureAzureKeyVaultIsRecoverable
- Ensure Azure key vault is recoverable
- Ensure Azure key vault is recoverable.
- Tags: CKV_AZURE_42
- org.openrewrite.terraform.azure.EnsureAzureNetworkWatcherNSGFlowLogsRetentionIsGreaterThan90Days
- Ensure Azure Network Watcher NSG flow logs retention is greater than 90 days
- Ensure Azure Network Watcher NSG flow logs retention is greater than 90 days.
- Tags: CKV_AZURE_12
- org.openrewrite.terraform.azure.EnsureAzurePostgreSQLDatabaseServerWithSSLConnectionIsEnabled
- Ensure Azure PostgreSQL database server with SSL connection is enabled
- Ensure Azure PostgreSQL database server with SSL connection is enabled.
- Tags: CKV_AZURE_29
- org.openrewrite.terraform.azure.EnsureAzureSQLServerAuditLogRetentionIsGreaterThan90Days
- Ensure Azure SQL server audit log retention is greater than 90 days
- Ensure Azure SQL server audit log retention is greater than 90 days.
- Tags: CKV_AZURE_24
- org.openrewrite.terraform.azure.EnsureAzureSQLServerSendAlertsToFieldValueIsSet
- Ensure Azure SQL server send alerts to field value is set
- Ensure Azure SQL server send alerts to field value is set.
- Tags: CKV_AZURE_26
- org.openrewrite.terraform.azure.EnsureAzureSQLServerThreatDetectionAlertsAreEnabledForAllThreatTypes
- Ensure Azure SQL Server threat detection alerts are enabled for all threat types
- Ensure Azure SQL Server threat detection alerts are enabled for all threat types.
- Tags: CKV_AZURE_25
- org.openrewrite.terraform.azure.EnsureFTPDeploymentsAreDisabled
- Ensure FTP Deployments are disabled
- Ensure FTP Deployments are disabled.
- Tags: CKV_AZURE_78
- org.openrewrite.terraform.azure.EnsureKeyVaultAllowsFirewallRulesSettings
- Ensure key vault allows firewall rules settings
- Ensure key vault allows firewall rules settings.
- Tags: CKV_AZURE_109
- org.openrewrite.terraform.azure.EnsureKeyVaultEnablesPurgeProtection
- Ensure key vault enables purge protection
- Ensure key vault enables purge protection.
- Tags: CKV_AZURE_110
- org.openrewrite.terraform.azure.EnsureKeyVaultKeyIsBackedByHSM
- Ensure key vault key is backed by HSM
- Ensure key vault key is backed by HSM.
- Tags: CKV_AZURE_112
- org.openrewrite.terraform.azure.EnsureKeyVaultSecretsHaveContentTypeSet
- Ensure key vault secrets have
content_typeset - Ensure key vault secrets have
content_typeset. - Tags: CKV_AZURE_114
- Ensure key vault secrets have
- org.openrewrite.terraform.azure.EnsureLogProfileIsConfiguredToCaptureAllActivities
- Ensure log profile is configured to capture all activities
- Ensure log profile is configured to capture all activities.
- Tags: CKV_AZURE_38
- org.openrewrite.terraform.azure.EnsureMSSQLServersHaveEmailServiceAndCoAdministratorsEnabled
- Ensure MSSQL servers have email service and co-administrators enabled
- Ensure MSSQL servers have email service and co-administrators enabled.
- Tags: CKV_AZURE_27
- org.openrewrite.terraform.azure.EnsureManagedIdentityProviderIsEnabledForAppServices
- Ensure managed identity provider is enabled for app services
- Ensure managed identity provider is enabled for app services.
- Tags: CKV_AZURE_71
- org.openrewrite.terraform.azure.EnsureMySQLIsUsingTheLatestVersionOfTLSEncryption
- Ensure MySQL is using the latest version of TLS encryption
- Ensure MySQL is using the latest version of TLS encryption.
- Tags: CKV_AZURE_54
- org.openrewrite.terraform.azure.EnsureMySQLServerDatabasesHaveEnforceSSLConnectionEnabled
- Ensure MySQL server databases have Enforce SSL connection enabled
- Ensure MySQL server databases have Enforce SSL connection enabled.
- Tags: CKV_AZURE_28
- org.openrewrite.terraform.azure.EnsureMySQLServerDisablesPublicNetworkAccess
- Ensure MySQL server disables public network access
- Ensure MySQL server disables public network access.
- Tags: CKV_AZURE_90
- org.openrewrite.terraform.azure.EnsureMySQLServerEnablesGeoRedundantBackups
- Ensure MySQL server enables geo-redundant backups
- Ensure MySQL server enables geo-redundant backups.
- Tags: CKV_AZURE_94
- org.openrewrite.terraform.azure.EnsureMySQLServerEnablesThreatDetectionPolicy
- Ensure MySQL server enables Threat Detection policy
- Ensure MySQL server enables Threat Detection policy.
- Tags: CKV_AZURE_127
- org.openrewrite.terraform.azure.EnsurePostgreSQLServerDisablesPublicNetworkAccess
- Ensure PostgreSQL server disables public network access
- Ensure PostgreSQL server disables public network access.
- Tags: CKV_AZURE_68
- org.openrewrite.terraform.azure.EnsurePostgreSQLServerEnablesInfrastructureEncryption
- Ensure PostgreSQL server enables infrastructure encryption
- Ensure PostgreSQL server enables infrastructure encryption.
- Tags: CKV_AZURE_130
- org.openrewrite.terraform.azure.EnsurePostgreSQLServerEnablesThreatDetectionPolicy
- Ensure PostgreSQL server enables Threat Detection policy
- Ensure PostgreSQL server enables Threat Detection policy.
- Tags: CKV_AZURE_128
- org.openrewrite.terraform.azure.EnsurePublicNetworkAccessEnabledIsSetToFalseForMySQLServers
- Ensure public network access enabled is set to False for mySQL servers
- Ensure public network access enabled is set to False for mySQL servers.
- Tags: CKV_AZURE_53
- org.openrewrite.terraform.azure.EnsureSendEmailNotificationForHighSeverityAlertsIsEnabled
- Ensure Send email notification for high severity alerts is enabled
- Ensure Send email notification for high severity alerts is enabled.
- Tags: CKV_AZURE_21
- org.openrewrite.terraform.azure.EnsureSendEmailNotificationForHighSeverityAlertsToAdminsIsEnabled
- Ensure Send email notification for high severity alerts to admins is enabled
- Ensure Send email notification for high severity alerts to admins is enabled.
- Tags: CKV_AZURE_22
- org.openrewrite.terraform.azure.EnsureStandardPricingTierIsSelected
- Ensure standard pricing tier is selected
- Ensure standard pricing tier is selected.
- Tags: CKV_AZURE_19
- org.openrewrite.terraform.azure.EnsureStorageAccountUsesLatestTLSVersion
- Ensure storage account uses latest TLS version
- Communication between an Azure Storage account and a client application is encrypted using Transport Layer Security (TLS). Microsoft recommends using the latest version of TLS for all your Microsoft Azure App Service web applications.
- Tags: CKV_AZURE_44
- org.openrewrite.terraform.azure.EnsureWebAppHasIncomingClientCertificatesEnabled
- Ensure Web App has incoming client certificates enabled
- Ensure Web App has incoming client certificates enabled.
- Tags: CKV_AZURE_17
- org.openrewrite.terraform.azure.EnsureWebAppUsesTheLatestVersionOfHTTP
- Ensure Web App uses the latest version of HTTP
- Ensure Web App uses the latest version of HTTP.
- Tags: CKV_AZURE_18
- org.openrewrite.terraform.azure.EnsureWebAppUsesTheLatestVersionOfTLSEncryption
- Ensure Web App uses the latest version of TLS encryption
- Ensure Web App uses the latest version of TLS encryption.
- Tags: CKV_AZURE_15
- org.openrewrite.terraform.azure.SetAzureStorageAccountDefaultNetworkAccessToDeny
- Set Azure Storage Account default network access to deny
- Ensure Azure Storage Account default network access is set to Deny.
- Tags: CKV_AZURE_35
- org.openrewrite.terraform.gcp.EnablePodSecurityPolicyControllerOnGKEClusters
- Enable
PodSecurityPolicycontroller on Google Kubernetes Engine (GKE) clusters - Ensure
PodSecurityPolicycontroller is enabled on Google Kubernetes Engine (GKE) clusters. - Tags: CKV_GCP_24
- Enable
- org.openrewrite.terraform.gcp.EnableVPCFlowLogsAndIntranodeVisibility
- Enable VPC flow logs and intranode visibility
- Enable VPC flow logs and intranode visibility.
- Tags: CKV_GCP_61
- org.openrewrite.terraform.gcp.EnableVPCFlowLogsForSubnetworks
- Enable VPC Flow Logs for subnetworks
- Ensure GCP VPC flow logs for subnets are enabled. Flow Logs capture information on IP traffic moving through network interfaces. This information can be used to monitor anomalous traffic and provide security insights.
- Tags: CKV_GCP_26
- org.openrewrite.terraform.gcp.EnsureBinaryAuthorizationIsUsed
- Ensure binary authorization is used
- Ensure binary authorization is used.
- Tags: CKV_GCP_66
- org.openrewrite.terraform.gcp.EnsureComputeInstancesLaunchWithShieldedVMEnabled
- Ensure compute instances launch with shielded VM enabled
- Ensure compute instances launch with shielded VM enabled.
- Tags: CKV_GCP_39
- org.openrewrite.terraform.gcp.EnsureGCPCloudStorageBucketWithUniformBucketLevelAccessAreEnabled
- Ensure GCP cloud storage bucket with uniform bucket-level access are enabled
- Ensure GCP cloud storage bucket with uniform bucket-level access are enabled.
- Tags: CKV_GCP_29
- org.openrewrite.terraform.gcp.EnsureGCPKubernetesClusterNodeAutoRepairConfigurationIsEnabled
- Ensure GCP Kubernetes cluster node auto-repair configuration is enabled
- Ensure GCP Kubernetes cluster node auto-repair configuration is enabled.
- Tags: CKV_GCP_9
- org.openrewrite.terraform.gcp.EnsureGCPKubernetesEngineClustersHaveLegacyComputeEngineMetadataEndpointsDisabled
- Ensure GCP Kubernetes engine clusters have legacy compute engine metadata endpoints disabled
- Ensure GCP Kubernetes engine clusters have legacy compute engine metadata endpoints disabled.
- Tags: CKV_GCP_67
- org.openrewrite.terraform.gcp.EnsureGCPVMInstancesHaveBlockProjectWideSSHKeysFeatureEnabled
- Ensure GCP VM instances have block project-wide SSH keys feature enabled
- Ensure GCP VM instances have block project-wide SSH keys feature enabled.
- Tags: CKV_GCP_32
- org.openrewrite.terraform.gcp.EnsureIPForwardingOnInstancesIsDisabled
- Ensure IP forwarding on instances is disabled
- Ensure IP forwarding on instances is disabled.
- Tags: CKV_GCP_36
- org.openrewrite.terraform.gcp.EnsurePrivateClusterIsEnabledWhenCreatingKubernetesClusters
- Ensure private cluster is enabled when creating Kubernetes clusters
- Ensure private cluster is enabled when creating Kubernetes clusters.
- Tags: CKV_GCP_25
- org.openrewrite.terraform.gcp.EnsureSecureBootForShieldedGKENodesIsEnabled
- Ensure secure boot for shielded GKE nodes is enabled
- Ensure secure boot for shielded GKE nodes is enabled.
- Tags: CKV_GCP_68
- org.openrewrite.terraform.gcp.EnsureShieldedGKENodesAreEnabled
- Ensure shielded GKE nodes are enabled
- Ensure shielded GKE nodes are enabled.
- Tags: CKV_GCP_71
- org.openrewrite.terraform.gcp.EnsureTheGKEMetadataServerIsEnabled
- Ensure the GKE metadata server is enabled
- Ensure the GKE metadata server is enabled.
- Tags: CKV_GCP_69
CKV2
1 recipe
- org.openrewrite.terraform.azure.EnsureTheStorageContainerStoringActivityLogsIsNotPubliclyAccessible
- Ensure the storage container storing activity logs is not publicly accessible
- Ensure the storage container storing activity logs is not publicly accessible.
- Tags: CKV2_AZURE_8
classic
3 recipes
- org.openrewrite.quarkus.spring.SpringBootAmqpToQuarkusClassic
- Replace Spring Boot AMQP with Quarkus Messaging RabbitMQ
- Migrates
spring-boot-starter-amqptoquarkus-messaging-rabbitmqwhen no reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringBootWebToQuarkusClassic
- Replace Spring Boot Web with Quarkus RESTEasy Classic
- Migrates
spring-boot-starter-webtoquarkus-resteasy-jacksonwhen no reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringKafkaToQuarkusClassic
- Replace Spring Kafka with Quarkus Kafka Client
- Migrates
spring-kafkatoquarkus-kafka-clientwhen no reactor dependencies are present.
cleanup
1 recipe
- org.openrewrite.javascript.cleanup.async-callback-in-sync-array-method
- Detect async callbacks in synchronous array methods
- Detects async callbacks passed to array methods like .some(), .every(), .filter() which don't await promises. This is a common bug where Promise objects are always truthy.
cloud
27 recipes
- io.moderne.java.spring.cloud2020.SpringCloudProperties_2020
- Migrate Spring Cloud properties to 2020
- Migrate properties found in
application.propertiesandapplication.yml.
- io.moderne.java.spring.cloud2021.SpringCloudProperties_2021
- Migrate Spring Cloud properties to 2021
- Migrate properties found in
application.propertiesandapplication.yml.
- io.moderne.java.spring.cloud2022.SpringCloudProperties_2022
- Migrate Spring Cloud properties to 2022
- Migrate properties found in
application.propertiesandapplication.yml.
- io.moderne.java.spring.cloud2023.SpringCloudProperties_2023
- Migrate Spring Cloud properties to 2023
- Migrate properties found in
application.propertiesandapplication.yml.
- io.moderne.java.spring.cloud2024.SpringCloudProperties_2024
- Migrate Spring Cloud properties to 2024
- Migrate properties found in
application.propertiesandapplication.yml.
- io.moderne.java.spring.cloud2025.SpringCloudProperties_2025
- Migrate Spring Cloud properties to 2025
- Migrate properties found in
application.propertiesandapplication.yml.
- io.moderne.java.spring.cloud20251.SpringCloudProperties_2025_1
- Migrate Spring Cloud properties to 2025.1
- Migrate properties found in
application.propertiesandapplication.ymlfor Spring Cloud 2025.1 (Oakwood). This includes the stubrunner property prefix migration fromstubrunner.tospring.cloud.contract.stubrunner..
- io.moderne.java.spring.cloud20251.UpgradeSpringCloud_2025_1
- Upgrade to Spring Cloud 2025.1
- Upgrade to Spring Cloud 2025.1 (Oakwood). This release is based on Spring Framework 7 and Spring Boot 4. Each Spring Cloud project has been updated to version 5.0.0.
- org.openrewrite.java.spring.cloud2022.DependencyUpgrades
- Upgrade dependencies to Spring Cloud 2022
- Upgrade dependencies to Spring Cloud 2022 from prior 2021.x version.
- org.openrewrite.java.spring.cloud2022.MigrateCloudSleuthToMicrometerTracing
- Migrate Spring Cloud Sleuth 3.1 to Micrometer Tracing 1.0
- Spring Cloud Sleuth has been discontinued and only compatible with Spring Boot 2.x.
- org.openrewrite.java.spring.cloud2022.UpgradeSpringCloud_2022
- Migrate to Spring Cloud 2022
- Migrate applications to the latest Spring Cloud 2022 (Kilburn) release.
- org.openrewrite.java.spring.cloud2023.DependencyUpgrades
- Upgrade dependencies to Spring Cloud 2023
- Upgrade dependencies to Spring Cloud 2023 from prior 2022.x version.
- org.openrewrite.java.spring.cloud2023.UpgradeSpringCloud_2023
- Migrate to Spring Cloud 2023
- Migrate applications to the latest Spring Cloud 2023 (Leyton) release.
- org.openrewrite.java.spring.cloud2024.DependencyUpgrades
- Upgrade dependencies to Spring Cloud 2024
- Upgrade dependencies to Spring Cloud 2024 from prior 2023.x version.
- org.openrewrite.java.spring.cloud2024.UpgradeSpringCloud_2024
- Migrate to Spring Cloud 2024
- Migrate applications to the latest Spring Cloud 2024 (Moorgate) release.
- org.openrewrite.java.spring.cloud2025.AddSpringCloudDependenciesBom
- Add Spring Cloud dependencies BOM
- Adds the Spring Cloud dependencies BOM as a managed import, but only when the project already uses a Spring Cloud dependency. Prevents accidentally introducing the BOM into unrelated projects.
- org.openrewrite.java.spring.cloud2025.DependencyUpgrades
- Upgrade dependencies to Spring Cloud 2025
- Upgrade dependencies to Spring Cloud 2025 from prior 2024.x version.
- org.openrewrite.java.spring.cloud2025.SpringCloudGatewayDeprecatedModulesAndStarters
- Migrate to New Spring Cloud Gateway Modules and Starters
- Migrate to new Spring Cloud Gateway modules and starters for Spring Cloud 2025.
- org.openrewrite.java.spring.cloud2025.SpringCloudGatewayProperties
- Migrate Spring Cloud Gateway Properties
- Migrate Spring Cloud Gateway properties for Spring Cloud 2025 release.
- org.openrewrite.java.spring.cloud2025.SpringCloudGatewayProxyWebMvcProperties
- Migrate Spring Cloud Gateway Proxy WebMvc Properties
- Migrate Spring Cloud Gateway Proxy WebMvc properties for Spring Cloud 2025 release.
- org.openrewrite.java.spring.cloud2025.SpringCloudGatewayProxyWebfluxProperties
- Migrate Spring Cloud Gateway Proxy Webflux Properties
- Migrate Spring Cloud Gateway Proxy Webflux properties for Spring Cloud 2025 release.
- org.openrewrite.java.spring.cloud2025.SpringCloudGatewayWebMvcProperties
- Migrate Spring Cloud Gateway WebMvc Properties
- Migrate Spring Cloud Gateway WebMvc properties for Spring Cloud 2025 release.
- org.openrewrite.java.spring.cloud2025.SpringCloudGatewayWebfluxProperties
- Migrate Spring Cloud Gateway Webflux Properties
- Migrate Spring Cloud Gateway Webflux properties for Spring Cloud 2025 release.
- org.openrewrite.java.spring.cloud2025.UpgradeSpringCloud_2025
- Migrate to Spring Cloud 2025
- Migrate applications to the latest Spring Cloud 2025 (Northfields) release.
- org.openrewrite.java.spring.cloud2025.UpgradeSpringCloud_2025_1
- Migrate to Spring Cloud 2025.1
- Migrate applications to the latest Spring Cloud 2025.1 release, compatible with Spring Boot 4.0.
- org.openrewrite.quarkus.spring.MigrateSpringCloudConfig
- Migrate Spring Cloud Config Client to Quarkus Config
- Migrates Spring Cloud Config Client to Quarkus configuration sources. Converts bootstrap.yml/properties patterns to Quarkus config.
- org.openrewrite.quarkus.spring.MigrateSpringCloudServiceDiscovery
- Migrate Spring Cloud Service Discovery to Quarkus
- Migrates Spring Cloud Service Discovery annotations and configurations to Quarkus equivalents. Converts @EnableDiscoveryClient and related patterns to Quarkus Stork service discovery.
cloudfoundry
1 recipe
- org.openrewrite.java.spring.boot3.MigrateSapCfJavaLoggingSupport
- Migrate SAP cloud foundry logging support to Spring Boot 3.x
- Migrate SAP cloud foundry logging support from
cf-java-logging-support-servlettocf-java-logging-support-servlet-jakarta, to use Jakarta with Spring Boot 3.
cobertura
1 recipe
- org.openrewrite.java.migrate.cobertura.RemoveCoberturaMavenPlugin
- Remove Cobertura Maven plugin
- This recipe will remove Cobertura, as it is not compatible with Java 11.
code
403 recipes
- OpenRewrite.Recipes.CodeQuality.CodeQuality
- Code quality
- All C# code quality recipes, organized by category.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Formatting.AddNewLineAfterOpeningBrace
- Add newline after opening brace
- Add newline after opening brace so the first statement starts on its own line.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Formatting.AddNewLineBeforeReturn
- Add newline before return
- Add a blank line before return statements that follow other statements.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Formatting.AddParagraphToDocComment
- Add paragraph to documentation comment
- Format multi-line documentation comments with paragraph elements.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Formatting.AddParameterToDocComment
- Add parameter name to documentation comment
- Add missing param elements to XML documentation comments.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Formatting.AddSummaryElementToDocComment
- Add summary to documentation comment
- Add summary text to documentation comments with empty summary elements.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Formatting.AddSummaryToDocComment
- Add summary element to documentation comment
- Add missing summary element to XML documentation comments.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Formatting.AddTypeParamToDocComment
- Add 'typeparam' element to documentation comment
- Add missing 'typeparam' elements to XML documentation comments.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Formatting.FixDocCommentTag
- Fix documentation comment tag
- Replace inline <code> elements with <c> elements in XML documentation comments.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Formatting.FormatAccessorList
- Format accessor list
- Format property accessor list for consistent whitespace.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Formatting.FormatDocumentationSummary
- Format documentation summary
- Format XML documentation summary on a single line or multiple lines.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Formatting.FormatSwitchSection
- Format switch section
- Ensure consistent formatting of switch sections.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Formatting.FormattingCodeQuality
- Formatting code quality
- Code formatting recipes for C#.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Formatting.InvalidDocCommentReference
- Invalid reference in a documentation comment
- Find invalid cref or paramref references in XML documentation comments.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Formatting.NormalizeWhitespace
- Normalize whitespace
- Normalize whitespace for consistent formatting.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Formatting.OrderDocCommentElements
- Order elements in documentation comment
- Order param/typeparam elements to match declaration order.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.CombineLinqMethods
- Combine LINQ methods
- Combine
.Where(predicate).First()and similar patterns into.First(predicate), and consecutive.Where().Where()calls into a single.Where()with a combined predicate. Eliminating intermediate LINQ calls improves readability. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.FindOptimizeCountUsage
- Find Count() comparison that could be optimized
- Detect
Count(pred) == nandCount() > ncomparisons which could useWhere().Take(n+1).Count()orSkip(n).Any()for better performance. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.FindWhereBeforeOrderBy
- Use Where before OrderBy
- Place
.Where()before.OrderBy()to filter elements before sorting. This reduces the number of items that need to be sorted. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.LinqCodeQuality
- LINQ code quality
- Optimize LINQ method calls for better readability and performance.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqSelectAverage
- Optimize LINQ Select().Average()
- Replace
items.Select(selector).Average()withitems.Average(selector). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqSelectMax
- Optimize LINQ Select().Max()
- Replace
items.Select(selector).Max()withitems.Max(selector). Passing the selector directly toMaxavoids an intermediate iterator. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqSelectMin
- Optimize LINQ Select().Min()
- Replace
items.Select(selector).Min()withitems.Min(selector). Passing the selector directly toMinavoids an intermediate iterator. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqSelectSum
- Optimize LINQ Select().Sum()
- Replace
items.Select(selector).Sum()withitems.Sum(selector). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereAny
- Optimize LINQ Where().Any()
- Replace
items.Where(predicate).Any()withitems.Any(predicate). Passing the predicate directly toAnyavoids an intermediate iterator. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereCount
- Optimize LINQ Where().Count()
- Replace
items.Where(predicate).Count()withitems.Count(predicate). Passing the predicate directly toCountavoids an intermediate iterator. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereCountLong
- Optimize LINQ Where().LongCount()
- Replace
.Where(predicate).LongCount()with.LongCount(predicate). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereFirst
- Optimize LINQ Where().First()
- Replace
items.Where(predicate).First()withitems.First(predicate). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereFirstOrDefault
- Optimize LINQ Where().FirstOrDefault()
- Replace
items.Where(predicate).FirstOrDefault()withitems.FirstOrDefault(predicate). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereLast
- Optimize LINQ Where().Last()
- Replace
items.Where(predicate).Last()withitems.Last(predicate). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereLastOrDefault
- Optimize LINQ Where().LastOrDefault()
- Replace
.Where(predicate).LastOrDefault()with.LastOrDefault(predicate). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereSingle
- Optimize LINQ Where().Single()
- Replace
items.Where(predicate).Single()withitems.Single(predicate). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereSingleOrDefault
- Optimize LINQ Where().SingleOrDefault()
- Replace
items.Where(predicate).SingleOrDefault()withitems.SingleOrDefault(predicate). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.RemoveUselessOrderBy
- Remove useless OrderBy call
- Replace
.OrderBy(a).OrderBy(b)with.OrderBy(b). A secondOrderBycompletely replaces the first sort, making the first call useless. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.UseAnyInsteadOfCount
- Use Any() instead of Count() > 0
- Replace
.Count() > 0with.Any().Any()short-circuits after the first match, whileCount()enumerates all elements. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.UseCastInsteadOfSelect
- Use Cast<T>() instead of Select with cast
- Replace
.Select(x => (T)x)with.Cast<T>(). TheCast<T>()method is more concise and clearly expresses the intent. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.UseOrderByDescendingThenByDescending
- Use OrderByDescending().ThenByDescending()
- Replace
.OrderByDescending(a).OrderByDescending(b)with.OrderByDescending(a).ThenByDescending(b). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.UseOrderByThenBy
- Use ThenBy instead of second OrderBy
- Replace
items.OrderBy(a).OrderBy(b)withitems.OrderBy(a).ThenBy(b). A secondOrderBydiscards the first sort;ThenBypreserves it as a secondary key. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.UseOrderByThenByDescending
- Use OrderBy().ThenByDescending()
- Replace
.OrderBy(a).OrderByDescending(b)with.OrderBy(a).ThenByDescending(b). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Linq.UseOrderInsteadOfOrderBy
- Use Order() instead of OrderBy() with identity
- Replace
.OrderBy(x => x)with.Order(). TheOrder()method (available since .NET 7) is a cleaner way to sort elements in their natural order. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Naming.AsyncMethodNameShouldEndWithAsync
- Async method name should end with Async
- Rename async methods to end with 'Async' suffix.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Naming.FindAttributeNameShouldEndWithAttribute
- Attribute name should end with 'Attribute'
- Classes that inherit from
System.Attributeshould have names ending with 'Attribute' by convention. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Naming.FindEventArgsNameConvention
- EventArgs name should end with 'EventArgs'
- Classes that inherit from
System.EventArgsshould have names ending with 'EventArgs' by convention. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Naming.FindExceptionNameShouldEndWithException
- Exception name should end with 'Exception'
- Classes that inherit from
System.Exceptionshould have names ending with 'Exception' by convention. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Naming.FindFixTodoComment
- Find TODO/HACK/FIXME comments
- Detect TODO, HACK, UNDONE, and FIXME comments that indicate unfinished work.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Naming.NamingCodeQuality
- Naming code quality
- Naming convention recipes for C# code.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Naming.NonAsyncMethodNameShouldNotEndWithAsync
- Non-async method should not end with Async
- Remove 'Async' suffix from non-async methods.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Naming.ParameterNameMatchesBase
- Parameter name should match base definition
- Ensure parameter names match the names used in base class or interface.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Naming.RenameParameterAccordingToConvention
- Rename parameter to camelCase
- Detect parameters not following camelCase naming convention.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Naming.RenamePrivateFieldAccordingToConvention
- Rename private field according to _camelCase convention
- Detect private fields not following _camelCase naming convention.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Naming.UseNameofOperator
- Use nameof operator
- Use nameof(parameter) instead of string literal for argument exception constructors.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.AvoidBoxingOfValueType
- Avoid boxing of value type
- Avoid boxing of value type by using generic overloads or ToString().
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.AvoidLockingOnPubliclyAccessible
- Avoid locking on publicly accessible instance
- Avoid lock(this), lock(typeof(T)), or lock on string literals which can cause deadlocks.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.AvoidNullReferenceException
- Avoid NullReferenceException
- Flag patterns that may throw NullReferenceException, such as using 'as' cast result without null check.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.BitOperationOnEnumWithoutFlags
- Bitwise operation on enum without Flags attribute
- Flag bitwise operations on enums that lack the Flags attribute.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.ConvertHasFlagToBitwiseOperation
- Convert HasFlag to bitwise operation
- Replace flags.HasFlag(value) with (flags & value) != 0.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.DoNotPassNonReadOnlyStructByReadOnlyRef
- Do not pass non-read-only struct by read-only reference
- Remove 'in' modifier from parameters of non-readonly struct type to avoid defensive copies.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindAsyncVoid
- Do not use async void
- Async void methods cannot be awaited and exceptions cannot be caught. Use
async Taskinstead, except for event handlers. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindAvoidClosureByUsingFactoryArg
- Find closure in GetOrAdd that could use factory argument
- Detect
ConcurrentDictionary.GetOrAddcalls with lambdas that capture variables. Use the overload with a factory argument parameter to avoid allocation. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindAvoidClosureInConcurrentDictionary
- Avoid closure when using ConcurrentDictionary
- ConcurrentDictionary methods like
GetOrAddmay evaluate the factory even when the key exists. Use the overload with a factory argument to avoid closure allocation. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindAvoidClosureInMethod
- Find closure in GetOrAdd/AddOrUpdate factory
- Detect closures in lambdas passed to
GetOrAddorAddOrUpdate. Use the factory overload that accepts a state argument to avoid allocations. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindBlockingCallsInAsync
- Find blocking calls in async methods
- Detect
.Wait(),.Result, and.GetAwaiter().GetResult()calls in async methods. Blocking calls in async methods can cause deadlocks. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindDoNotUseBlockingCall
- Do not use blocking calls on tasks
- Avoid
.Wait(),.Result, and.GetAwaiter().GetResult()on tasks. These can cause deadlocks. Useawaitinstead. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindDoNotUseToStringIfObject
- Do not use ToString on GetType result
- Using
.GetType().ToString()returns the full type name. Consider using.GetType().Nameor.GetType().FullNameinstead for clarity. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindEqualityComparerDefaultOfString
- Find EqualityComparer<string>.Default usage
- Detect
EqualityComparer<string>.Defaultwhich uses ordinal comparison. Consider using an explicitStringComparerinstead. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindGetTypeOnSystemType
- Find GetType() called on System.Type
- Detect
typeof(T).GetType()which returnsSystem.RuntimeTypeinstead of the expectedSystem.Type. Usetypeof(T)directly. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindImplicitCultureSensitiveMethods
- Find implicit culture-sensitive string methods
- Detect calls to
ToLower()andToUpper()without culture parameters. These methods use the current thread culture, which may cause unexpected behavior. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindImplicitCultureSensitiveToString
- Find implicit culture-sensitive ToString calls
- Detect
.ToString()calls without format arguments. On numeric and DateTime types, these use the current thread culture. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindLinqOnDirectMethods
- Find LINQ methods replaceable with direct methods
- Detect LINQ methods like
.Count()that could be replaced with direct collection properties. Direct access avoids enumeration overhead. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindMakeMethodStatic
- Find methods that could be static
- Detect private methods that don't appear to use instance members and could be marked
staticfor clarity and performance. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindMissingCancellationToken
- Find methods not forwarding CancellationToken
- Detect calls to async methods that may have CancellationToken overloads but are called without one. Uses name-based heuristics.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindMissingStructLayout
- Find structs without StructLayout attribute
- Detect struct declarations without
[StructLayout]attribute. Adding[StructLayout(LayoutKind.Auto)]allows the CLR to optimize field layout for better memory usage. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindMissingTimeoutForRegex
- Add timeout to Regex
- Regex without a timeout can be vulnerable to ReDoS attacks. Specify a
TimeSpantimeout or useRegexOptions.NonBacktracking. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindMissingWithCancellation
- Find missing WithCancellation on async enumerables
- Detect async enumerable iteration without
.WithCancellation(). Async enumerables should forward CancellationToken via WithCancellation. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindNaNComparison
- Do not use NaN in comparisons
- Comparing with
NaNusing==always returns false. Usedouble.IsNaN(x)instead. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindOptimizeEnumerableCountVsAny
- Find LINQ Count() on materialized collection
- Detect LINQ
Count()orAny()on types that have aCountorLengthproperty. Use the property directly for O(1) performance. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindOptimizeGuidCreation
- Find Guid.Parse with constant string
- Detect
Guid.Parse("...")with constant strings. Consider usingnew Guid("...")or a static readonly field for better performance. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindOptimizeStartsWith
- Use char overload for single-character string methods
- Convert string methods with single-character string literals to use char overloads for better performance.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindSequenceEqualForSpan
- Find Span<char> equality that should use SequenceEqual
- Detect
==and!=operators onSpan<char>orReadOnlySpan<char>which compare references. UseSequenceEqualfor content comparison. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindSimplifyStringCreate
- Find simplifiable string.Create calls
- Detect
string.Create(CultureInfo.InvariantCulture, ...)calls that could be simplified to string interpolation when all parameters are culture-invariant. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindStreamReadResultNotUsed
- Find unused Stream.Read return value
- Detect calls to
Stream.ReadorStream.ReadAsyncwhere the return value is discarded. The return value indicates how many bytes were actually read. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindStringCreateInsteadOfFormattable
- Find FormattableString that could use string.Create
- Detect
FormattableStringusage wherestring.Createwith anIFormatProvidercould be used for better performance. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindStringFormatShouldBeConstant
- String.Format format string should be constant
- The format string passed to
string.Formatshould be a compile-time constant to enable analysis and avoid runtime format errors. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindStringGetHashCode
- Find string.GetHashCode() without StringComparer
- Detect calls to
string.GetHashCode()without aStringComparer. The defaultGetHashCode()may produce different results across platforms. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindStructWithDefaultEqualsAsKey
- Find Dictionary/HashSet with struct key type
- Detect
DictionaryorHashSetusage with struct types as keys. Structs without overriddenEquals/GetHashCodeuse slow reflection-based comparison. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseAttributeIsDefined
- Find GetCustomAttributes that could use Attribute.IsDefined
- Detect
GetCustomAttributes().Any()or similar patterns whereAttribute.IsDefinedwould be more efficient. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseContainsKeyInsteadOfTryGetValue
- Use ContainsKey instead of TryGetValue with discard
- When only checking if a key exists, use
ContainsKeyinstead ofTryGetValuewith a discarded out parameter. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseExplicitCaptureRegexOption
- Use RegexOptions.ExplicitCapture
- Use
RegexOptions.ExplicitCaptureto avoid capturing unnamed groups, which improves performance. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseIndexerInsteadOfLinq
- Find LINQ methods replaceable with indexer
- Detect LINQ methods like
.First()and.Last()that could be replaced with direct indexer access for better performance. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseRegexSourceGenerator
- Find Regex that could use source generator
- Detect
new Regex(...)calls that could benefit from the[GeneratedRegex]source generator attribute for better performance (.NET 7+). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseTimeProviderOverload
- Find calls that could use TimeProvider
- Detect
DateTime.UtcNow,DateTimeOffset.UtcNow, andTask.Delaycalls that could use aTimeProviderparameter for better testability (.NET 8+). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseValuesContainsInsteadOfValues
- Find Values.Contains() instead of ContainsValue()
- Detect
.Values.Contains(value)on dictionaries. Use.ContainsValue(value)instead. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.MakeParameterRefReadOnly
- Make parameter ref read-only
- Use in parameter modifier for large struct parameters.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.OptimizeMethodCall
- Optimize method call
- Replace inefficient method calls with more optimal equivalents.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.OptimizeStringBuilderAppend
- Optimize StringBuilder.Append usage
- Optimize StringBuilder method calls: use char overloads for single-character strings, remove redundant ToString() calls, replace string.Format with AppendFormat, and split string concatenation into chained Append calls.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.PerformanceCodeQuality
- Performance code quality
- Performance optimization recipes for C# code.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.ReplaceEnumToStringWithNameof
- Replace Enum.ToString() with nameof
- Replace
MyEnum.Value.ToString()withnameof(MyEnum.Value). Thenameofoperator is evaluated at compile time, avoiding runtime reflection. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.ReturnCompletedTask
- Return completed task instead of null
- Replace return null in Task-returning methods with return Task.CompletedTask.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.ThrowingNotImplementedException
- Throwing of new NotImplementedException
- Find code that throws new NotImplementedException, which may indicate unfinished implementation.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.UnnecessaryExplicitEnumerator
- Remove unnecessary explicit enumerator
- Use foreach instead of explicit enumerator pattern.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.UseArrayEmpty
- Use Array.Empty<T>() instead of new T[0]
- Use Array.Empty<T>() instead of allocating empty arrays.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.UseContainsKey
- Use ContainsKey instead of Keys.Contains
- Replace
.Keys.Contains(key)with.ContainsKey(key)on dictionaries for O(1) performance. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.UseCountProperty
- Use Count/Length property instead of Count()
- Replace collection.Count() with collection.Count when available.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.UseRegexIsMatch
- Use Regex.IsMatch
- Replace Regex.Match(s, p).Success with Regex.IsMatch(s, p).
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.UseStringBuilderAppendLine
- Use StringBuilder.AppendLine
- Replace
sb.Append("\n")withsb.AppendLine(). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.UseStringComparison
- Use StringComparison
- Replace case-insensitive string comparisons using
ToLower()/ToUpper()with overloads that acceptStringComparison.OrdinalIgnoreCase. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Performance.UseStringConcatInsteadOfJoin
- Use string.Concat instead of string.Join
- Replace
string.Join("", args)withstring.Concat(args). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.FileContainsNoCode
- File contains no code
- Find files that contain no code, only using directives, comments, or whitespace.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.FindUnusedInternalType
- Find internal types that may be unused
- Detect
internal(non-public) classes that may be unused. Review these types and remove them if they are no longer needed. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RedundancyCodeQuality
- Redundancy code quality
- Remove redundant code from C# sources.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveArgumentListFromAttribute
- Remove argument list from attribute
- Remove empty argument list from attribute.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveBracesFromRecordDeclaration
- Remove braces from record declaration
- Remove unnecessary braces from record declarations with no body.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveEmptyCatchClause
- Remove empty catch clause
- Remove empty catch clauses that silently swallow exceptions without any logging or handling.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveEmptyDestructor
- Remove empty destructor
- Remove destructors (finalizers) with empty bodies.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveEmptyFinallyClause
- Remove empty finally clause
- Remove
finally \{ \}clauses that contain no statements. An empty finally block serves no purpose. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveEmptyForBody
- Flag empty for loop body
- Flag
forloops with empty bodies as potential dead code. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveEmptyForEachBody
- Remove empty foreach body
- Remove
foreachloops with empty bodies, which iterate without effect. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveEmptySyntax
- Remove empty syntax
- Remove empty namespace, class, struct, interface, and enum declarations.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveEmptyWhileBody
- Remove empty while body
- Remove
while (cond) \{ \}loops with empty bodies as they serve no purpose. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveEnumDefaultUnderlyingType
- Remove enum default underlying type
- Remove : int from enum declaration since int is the default.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveExplicitClassFromRecord
- Remove explicit 'class' from record
- Remove the redundant
classkeyword fromrecord classdeclarations. Records are reference types by default. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemovePartialModifierFromSinglePart
- Remove partial modifier from single-part type
- Remove
partialmodifier from types that have only one part. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantAsOperator
- Remove redundant as operator
- Remove redundant 'as' operator when the expression already has the target type.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantAssignment
- Remove redundant assignment
- Remove assignments where the value is immediately returned.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantAsyncAwait
- Remove redundant async/await
- Remove redundant async/await when a Task can be returned directly.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantAutoPropertyInit
- Remove redundant constructor
- Remove empty parameterless constructors that duplicate the implicit default.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantAutoPropertyInitialization
- Remove redundant auto-property initialization
- Remove auto-property initializers that assign the default value.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantBaseConstructorCall
- Remove redundant base constructor call
- Remove
: base()parameterless base constructor call since it's implicit. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantBaseInterface
- Remove redundant base interface
- Remove interface that is already inherited by another implemented interface.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantCast
- Remove redundant cast
- Remove unnecessary casts when the expression already has the target type.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantCatchBlock
- Remove redundant catch block
- Remove try-catch blocks where every catch clause only rethrows the exception.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantComma
- Remove redundant comma
- Remove redundant trailing comma in enum declarations.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantDefaultFieldInitialization
- Remove redundant default field initialization
- Remove field initializations that assign the default value (e.g.,
int x = 0,bool b = false,string s = null,object o = default). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantDefaultSwitchSection
- Remove redundant default switch section
- Remove default switch section that only contains break.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantDelegateCreation
- Remove redundant delegate creation
- Remove unnecessary
new EventHandler(M)whenMcan be used directly. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantDisposeOrClose
- Remove redundant Dispose/Close call
- Remove Dispose/Close calls on objects already in a using block.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantOverridingMember
- Remove redundant overriding member
- Remove overriding member that only calls the base implementation.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantParentheses
- Remove redundant parentheses
- Remove unnecessary parentheses around expressions in return statements and assignments.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantRegion
- Remove redundant region
- Remove #region/#endregion directives.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantSealedModifier
- Remove redundant sealed modifier
- Remove
sealedmodifier on members of sealed classes, since it's redundant. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantSealedModifierFromOverride
- Remove redundant 'sealed' modifier from override
- Remove redundant 'sealed' modifier from an overriding member in a sealed class.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantStatement
- Remove redundant statement
- Remove redundant
return;at end of void method orcontinue;at end of loop body. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantStringToCharArrayCall
- Remove redundant ToCharArray() call
- Remove
ToCharArray()calls in foreach loops where iterating over the string directly produces the same result. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantToStringCall
- Remove redundant ToString() call
- Remove
ToString()calls on expressions that are already strings. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveUnnecessaryCaseLabel
- Remove unnecessary case label
- Remove case labels from switch section that has default label.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveUnnecessaryElse
- Remove unnecessary else clause
- Remove
elseclause when theifbody always terminates withreturn,throw,break,continue, orgoto. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveUnnecessarySemicolon
- Remove unnecessary semicolon at end of declaration
- Remove unnecessary semicolon at the end of a declaration.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveUnusedDocCommentElement
- Unused element in documentation comment
- Remove unused param/typeparam elements from XML documentation.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveUnusedMemberDeclaration
- Remove unused member declaration
- Remove member declarations that are never referenced.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveUnusedThisParameter
- Unused 'this' parameter
- Remove unused 'this' parameter from extension methods.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.ResourceCanBeDisposedAsynchronously
- Resource can be disposed asynchronously
- Use
await usinginstead ofusingwhen the resource implements IAsyncDisposable. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.UnnecessaryEnumFlag
- Unnecessary enum flag
- Remove unnecessary enum flag value that is a combination of other flags.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.UnnecessaryInterpolatedString
- Remove unnecessary interpolated string
- Replace interpolated strings with no interpolations with regular strings.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.UnnecessaryInterpolation
- Unnecessary interpolation
- Remove unnecessary string interpolation, for example simplifying
$"\{x\}"tox.ToString(). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.UnnecessaryNullCheck
- Remove unnecessary null check
- Remove null check that is unnecessary because the value is known to be non-null.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.UnnecessaryNullForgivingOperator
- Remove unnecessary null-forgiving operator
- Remove ! operator where expression is already non-nullable.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.UnnecessaryRawStringLiteral
- Remove unnecessary raw string literal
- Convert raw string literal to regular string when not needed.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.UnnecessaryUnsafeContext
- Remove unnecessary unsafe context
- Remove unsafe blocks that do not contain unsafe code.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.UnnecessaryVerbatimStringLiteral
- Remove unnecessary verbatim string literal
- Remove @ prefix from string literals that do not contain escape sequences.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Redundancy.UseRethrow
- Use rethrow instead of throw ex
- Replace
throw ex;withthrow;inside catch clauses whenexis the caught exception variable. A barethrowpreserves the original stack trace. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.CombineWhereMethodChain
- Combine 'Enumerable.Where' method chain
- Combine consecutive Enumerable.Where method calls into a single call with a combined predicate.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.ConvertAnonymousMethodToLambda
- Convert anonymous method to lambda
- Convert anonymous method delegate syntax to lambda expression.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.ConvertIfToAssignment
- Convert 'if' to assignment
- Convert 'if' statement that assigns boolean literals to a simple assignment with the condition expression.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.ConvertInterpolatedStringToConcatenation
- Convert interpolated string to concatenation
- Detect string interpolations that could be simplified to concatenation.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.ExpressionAlwaysTrueOrFalse
- Expression is always true or false
- Simplify
x == xtotrueandx != xtofalse. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.InlineLazyInitialization
- Inline lazy initialization
- Use null-coalescing assignment (??=) for lazy initialization.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.InlineLocalVariable
- Inline local variable
- Inline local variable that is assigned once and used once immediately.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.JoinStringExpressions
- Join string expressions
- Join consecutive string literal concatenations into a single literal.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.MergeElseWithNestedIf
- Merge else with nested if
- Merge
else \{ if (...) \{ \} \}intoelse if (...) \{ \}when the else block contains only a single if statement. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.MergeIfWithParentIf
- Merge if with parent if
- Merge
if (a) \{ if (b) \{ ... \} \}intoif (a && b) \{ ... \}when the outer if body contains only a single nested if without else. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.MergeSwitchSections
- Merge switch sections with equivalent content
- Merge switch case labels that have identical bodies.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.RemoveRedundantBooleanLiteral
- Remove redundant boolean literal
- Remove redundant
== truecomparison from boolean expressions. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.RemoveUnnecessaryBraces
- Remove unnecessary braces
- Remove braces from single-statement blocks where they are optional.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplificationCodeQuality
- Simplification code quality
- Simplify expressions and patterns in C# code.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyArgumentNullCheck
- Simplify argument null check
- Use ArgumentNullException.ThrowIfNull(arg) instead of manual null check.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyBooleanComparison
- Simplify boolean comparison
- Simplify
true == xtox,false == xto!x,true != xto!x, andfalse != xtox. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyCoalesceExpression
- Simplify coalesce expression
- Simplify x ?? x to x.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyCodeBranching
- Simplify code branching
- Simplify code branching patterns such as empty if-else, while(true) with break, and trailing return/continue in if-else.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyConditionalExpression
- Simplify conditional expression
- Simplify
cond ? true : falsetocondandcond ? false : trueto!cond. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyDoWhileToWhile
- Simplify do-while(true) to while(true)
- Convert
do \{ ... \} while (true)towhile (true) \{ ... \}. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyLazyInitialization
- Simplify lazy initialization
- Simplify lazy initialization using ??= operator.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyLogicalNegation
- Simplify logical negation
- Simplify negated comparison expressions. For example,
!(x == y)becomesx != y. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyNegatedIsNull
- Simplify negated is null pattern
- Simplify
!(x is null)tox is not nulland!(x is not null)tox is null. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyNestedUsingStatement
- Simplify nested using statement
- Merge nested
usingstatements into a singleusingdeclaration. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyNullableHasValue
- Simplify Nullable<T>.HasValue
- Replace
x.HasValuewithx != nulland!x.HasValuewithx == null. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyNullableToShorthand
- Simplify Nullable<T> to T?
- Use T? shorthand instead of Nullable<T>.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyNumericComparison
- Simplify numeric comparison
- Simplify
x - y > 0tox > y,x - y < 0tox < y,x - y >= 0tox >= y, andx - y <= 0tox <= y. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyRedundantWhereWhere
- Merge consecutive Where calls
- Detect consecutive
.Where(p).Where(q)calls that could be merged. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UnconstrainedTypeParamNullCheck
- Unconstrained type parameter checked for null
- Find null checks on unconstrained type parameters, which may not be reference types.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UnnecessaryOperator
- Operator is unnecessary
- Remove unnecessary operators such as unary plus.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseAnonymousFunctionOrMethodGroup
- Use anonymous function or method group
- Convert a lambda expression to a method group where appropriate.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseCoalesceExpression
- Use coalesce expression
- Replace
x != null ? x : yandx == null ? y : xwithx ?? y. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseCoalesceExpressionInsteadOfIf
- Use coalesce expression instead of 'if'
- Replace
if (x == null) x = y;withx ??= y. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseCompoundAssignment
- Use compound assignment
- Replace
x = x op ywithx op= yfor arithmetic, bitwise, shift, and null-coalescing operators. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseConditionalAccess
- Use conditional access
- Transform null-check patterns to use conditional access (?.).
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseConditionalAccessInsteadOfIf
- Use conditional access instead of conditional expression
- Transform ternary null-check expressions to use conditional access (?.) with null-coalescing (??) where needed.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseConditionalExpressionForDeclaration
- Use conditional expression in declaration
- Convert
int x; if (cond) x = a; else x = b;toint x = cond ? a : b;. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseConditionalExpressionForReturn
- Use conditional return expression
- Convert
if (c) return a; return b;toreturn c ? a : b;. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseConditionalExpressionForThrow
- Use conditional throw expression
- Detect
if (x == null) throw ...patterns that could usex ?? throw .... - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseDateTimeOffsetUnixEpoch
- Use DateTimeOffset.UnixEpoch
- Replace
new DateTimeOffset(1970, 1, 1, 0, 0, 0, TimeSpan.Zero)withDateTimeOffset.UnixEpoch. Available since .NET 8,DateTimeOffset.UnixEpochis more readable. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseDateTimeUnixEpoch
- Use DateTime.UnixEpoch
- Replace
new DateTime(1970, 1, 1)withDateTime.UnixEpoch. Available since .NET 8,DateTime.UnixEpochis more readable and avoids magic numbers. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseDefaultLiteral
- Use default literal
- Simplify default(T) expressions to default. Note: in rare cases where the type cannot be inferred (e.g., overload resolution), manual review may be needed.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseExceptionFilter
- Use exception filter
- Detect catch blocks with if/throw pattern that could use a when clause.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseExpressionBodiedLambda
- Use expression-bodied lambda
- Convert block-body lambdas with a single statement to expression-body lambdas.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseForInsteadOfWhile
- Use for statement instead of while
- Convert while loops with counter to for loops.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseGuidEmpty
- Use Guid.Empty
- Replace
new Guid()withGuid.Empty. The staticGuid.Emptyfield avoids unnecessary allocations and clearly expresses intent. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseIsOperatorInsteadOfAs
- Use 'is' operator instead of 'as' operator
- Replace 'as' operator followed by null check with 'is' operator.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseIsPatternInsteadOfSequenceEqual
- Use 'is' pattern instead of SequenceEqual
- Replace
span.SequenceEqual("str")withspan is "str". Pattern matching with string constants is more concise for span comparisons. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseNotPattern
- Use 'not' pattern instead of negation
- Detect
!(x is Type)patterns that can usex is not Type. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UsePatternMatchingForEquality
- Use pattern matching for equality comparison
- Replace
x == constantwithx is constantfor improved readability using C# pattern matching. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UsePatternMatchingForInequality
- Use pattern matching for inequality comparison
- Replace
x != constantwithx is not constantfor improved readability using C# pattern matching. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UsePatternMatchingInsteadOfAs
- Use pattern matching instead of as
- Use pattern matching instead of as. Note: Needs type resolution.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UsePatternMatchingInsteadOfHasValue
- Use pattern matching instead of HasValue
- Replace
nullable.HasValuewithnullable is not null. Pattern matching is more idiomatic in modern C#. Note: this recipe uses name-based matching and may match non-Nullable types with aHasValueproperty. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UsePatternMatchingInsteadOfIs
- Use pattern matching instead of is
- Use pattern matching instead of is. Note: Needs type resolution.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UsePatternMatchingNullCheck
- Use pattern matching for null check
- Replace
x == nullwithx is nullandx != nullwithx is not null. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UsePostfixIncrement
- Use postfix increment/decrement
- Replace
x = x + 1withx++andx = x - 1withx--. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseRangeOperator
- Use range operator
- Detect Substring calls that could use C# 8 range syntax.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseShortCircuitOperator
- Use short-circuit operator
- Replace bitwise
&with&&and|with||in boolean contexts. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseStringEndsWith
- Use string.EndsWith
- Detect substring comparison patterns that could use EndsWith.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseStringEquals
- Use string.Equals instead of == for string comparison
- Replace
==string comparisons withstring.Equals(a, b, StringComparison.Ordinal)for explicit comparison semantics. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseStringInterpolation
- Use string interpolation instead of string.Format
- Replace simple
string.Format("\{0\}", x)calls with$"\{x\}". - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseStringInterpolationInsteadOfConcat
- Use string interpolation instead of concatenation
- Replace string.Concat with string interpolation.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseStringStartsWith
- Use string.StartsWith instead of IndexOf comparison
- Replace
s.IndexOf(x) == 0withs.StartsWith(x). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseSwitchExpression
- Use switch expression
- Convert simple switch statements to switch expressions (C# 8+).
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseThrowExpression
- Use throw expression
- Convert null-check-then-throw patterns to throw expressions.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseTimeSpanZero
- Use TimeSpan.Zero
- Replace
new TimeSpan(0)andTimeSpan.FromX(0)withTimeSpan.Zero. The staticTimeSpan.Zerofield is more readable and avoids unnecessary object creation. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Simplification.UseXorForBooleanInequality
- Use ^ operator for boolean inequality
- Replace a != b with a ^ b when both operands are boolean.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.AbstractTypeShouldNotHavePublicConstructors
- Abstract type should not have public constructors
- Change public constructors of abstract types to protected.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.AddParenthesesForClarity
- Add parentheses for clarity
- Add parentheses to expressions where operator precedence might be unclear to improve readability.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.AddParenthesesToConditionalExpression
- Add parentheses to conditional expression condition
- Add or remove parentheses from the condition in a conditional operator.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.AddRemoveTrailingComma
- Add trailing comma to last enum member
- Add trailing comma to the last member of enum declarations for cleaner diffs when adding new members.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.AddStaticToMembersOfStaticClass
- Add static modifier to all members of static class
- Ensure all members of a static class are also declared static.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.AddTrailingComma
- Add trailing comma
- Add trailing commas to multi-line initializers and enum declarations for cleaner diffs.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.AvoidChainOfAssignments
- Avoid chain of assignments
- Flag chained assignment expressions like a = b = c = value.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.AvoidNestingTernary
- Avoid nested ternary operator
- Replace nested ternary expressions with if/else chains for clarity.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.CallExtensionMethodAsInstance
- Call extension method as instance method
- Use instance method syntax instead of static extension method call.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.CompositeEnumContainsUndefinedFlag
- Composite enum value contains undefined flag
- Find composite enum values that contain a flag which is not defined in the enum type.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.ConstantValuesOnRightSide
- Place constant values on right side of comparisons
- Move constant values (literals, null) from the left side of comparisons to the right side for consistency and readability.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.ConvertCommentToDocComment
- Convert comment to documentation comment
- Convert single-line or multi-line comments above declarations to XML documentation comments.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.DeclareEachAttributeSeparately
- Declare each attribute separately
- Declare each attribute in a separate attribute list.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.DeclareEachTypeInSeparateFile
- Declare each type in separate file
- Declare each type in a separate file.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.DeclareEachTypeSeparately
- Declare each type in separate file
- Flag files containing multiple top-level type declarations.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.DeclareEnumMemberWithZeroValue
- Declare enum member with zero value
- Ensure [Flags] enums have a member explicitly assigned the value 0.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.DeclareEnumValueAsCombination
- Declare enum value as combination of names
- Declare Flags enum values as combinations of named values.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.DeclareUsingDirectiveOnTopLevel
- Declare using directive on top level
- Move using directives outside of namespace declarations to the top level of the file.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.DefaultLabelShouldBeLast
- Default label should be last
- Move default label to the last position in switch statement.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.DuplicateEnumValue
- Flag duplicate enum value
- Flag enum members that have the same underlying value.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.DuplicateWordInComment
- Duplicate word in a comment
- Find and fix duplicate consecutive words in comments.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.EnumShouldDeclareExplicitValues
- Enum should declare explicit values
- Add explicit values to enum members that do not have them.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindArgumentExceptionParameterName
- ArgumentException should specify argument name
- When throwing
ArgumentExceptionor derived types, specify the parameter name usingnameof(). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindAsyncMethodReturnsNull
- Find async void method
- Detect
async voidmethods. Useasync Taskinstead so callers can await and exceptions propagate correctly. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindAsyncVoidDelegate
- Find async void delegate
- Detect async lambdas used as delegates where the return type is void. Use
Func<Task>instead ofActionfor async delegates. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindAvoidAnonymousDelegateForUnsubscribe
- Do not use anonymous delegates to unsubscribe from events
- Unsubscribing from events using anonymous delegates or lambdas has no effect because each lambda creates a new delegate instance.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindAwaitTaskBeforeDisposing
- Find unawaited task return in using block
- Detect
returnof a Task inside ausingblock withoutawait. The resource may be disposed before the task completes. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindBothConditionSidesIdentical
- Find binary expression with identical sides
- Detect binary expressions where both sides are identical, e.g.
x == xora && a. This is likely a copy-paste bug. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindClassWithEqualsButNoIEquatable
- Find class with Equals(T) but no IEquatable<T>
- Detect classes that define
Equals(T)but do not implementIEquatable<T>. Implementing the interface ensures consistency and enables value-based equality. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindCompareToWithoutIComparable
- Find CompareTo without IComparable
- Detect classes that provide a
CompareTomethod but do not implementIComparable<T>. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindDangerousThreadingMethods
- Do not use dangerous threading methods
- Avoid
Thread.Abort(),Thread.Suspend(), andThread.Resume(). These methods are unreliable and can corrupt state. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindDefaultParameterValueNeedsOptional
- Find [DefaultParameterValue] without [Optional]
- Detect parameters with
[DefaultParameterValue]that are missing[Optional]. Both attributes are needed for COM interop default parameter behavior. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotCallVirtualMethodInConstructor
- Find virtual method call in constructor
- Detect calls to virtual or abstract methods within constructors. Derived classes may not be fully initialized when these methods execute.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotCompareWithNaN
- Find comparison with NaN
- Detect comparisons with
NaNusing==or!=. Usedouble.IsNaN()orfloat.IsNaN()instead, asx == NaNis always false. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotCreateTypeWithBCLName
- Find type with BCL name
- Detect class declarations that use names from well-known BCL types like
Task,Action,String, which can cause confusion. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotDeclareStaticMembersOnGenericTypes
- Find static members on generic types
- Detect static members declared on generic types. Static members on generic types require specifying type arguments at the call site, reducing discoverability.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotOverwriteParameterValue
- Find overwritten parameter values
- Detect assignments to method parameters, which can mask the original argument and lead to confusion.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotPassNullForCancellationToken
- Find null passed for CancellationToken
- Detect
nullordefaultpassed forCancellationTokenparameters. UseCancellationToken.Noneinstead. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotRaiseApplicationException
- Do not raise ApplicationException
- Avoid throwing
ApplicationException. Use a more specific exception type. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotRaiseNotImplementedException
- Do not throw NotImplementedException
- Throwing
NotImplementedExceptionindicates incomplete implementation. Implement the functionality or throw a more specific exception. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotRaiseReservedExceptionType
- Do not raise reserved exception types
- Avoid throwing
Exception,SystemException, orApplicationException. Use more specific exception types. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotThrowFromFinalizer
- Find throw statements in finalizer
- Detect
throwstatements inside finalizer/destructor methods. Throwing from a finalizer can terminate the process. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotThrowFromFinallyBlock
- Do not throw from finally block
- Throwing from a
finallyblock can mask the original exception and make debugging difficult. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotUseCertificateValidationCallback
- Do not write custom certificate validation
- Custom certificate validation callbacks can introduce security vulnerabilities by accidentally accepting invalid certificates.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotUseEqualityComparerDefaultOfString
- Find EqualityComparer<string>.Default
- Detect
EqualityComparer<string>.Defaultwhich may use different comparison semantics across platforms. Use an explicitStringComparer. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotUseGetHashCodeForString
- Find GetType() on Type instance
- Detect
.GetType()called on an object that is already aSystem.Type. Usetypeof()directly. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotUseObjectToString
- Find ToString on object-typed parameter
- Detect
.ToString()calls onobject-typed parameters. The defaultobject.ToString()returns the type name, which is rarely the intended behavior. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotUseSleep
- Find Thread.Sleep usage
- Detect
Thread.Sleep()which blocks the thread. Useawait Task.Delay()in async contexts instead. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotUseStringGetHashCode
- Find string.GetHashCode() usage
- Detect
string.GetHashCode()which is not stable across runs. UseStringComparer.GetHashCode()orstring.GetHashCode(StringComparison)instead. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindEmbedCaughtExceptionAsInner
- Embed caught exception as inner exception
- When rethrowing a different exception in a catch block, pass the original exception as the inner exception to preserve the stack trace.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindEnumDefaultValueZero
- Find explicit zero initialization in enum
- Detect enum members explicitly initialized to
0. The default value of an enum is already0. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindEqualsWithoutNotNullWhen
- Find Equals without [NotNullWhen(true)]
- Detect
Equals(object?)overrides that are missing[NotNullWhen(true)]on the parameter, which helps nullable analysis. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindEventArgsSenderNotNull
- Find event raised with null EventArgs
- Detect event invocations that pass
nullfor EventArgs. UseEventArgs.Emptyinstead. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindFlowCancellationTokenInAwaitForEach
- Find await foreach without CancellationToken
- Detect
await foreachloops that don't pass aCancellationTokenviaWithCancellation()when one is available in the enclosing method. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindIComparableWithoutComparisonOperators
- Find IComparable without comparison operators
- Detect classes that implement
IComparable<T>but do not override comparison operators (<,>,<=,>=). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindIComparableWithoutIEquatable
- Find IComparable<T> without IEquatable<T>
- Detect classes that implement
IComparable<T>but notIEquatable<T>. Both interfaces should be implemented together for consistent comparison semantics. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindIEquatableWithoutEquals
- Find IEquatable<T> without Equals(object) override
- Detect classes that implement
IEquatable<T>but do not overrideEquals(object), which can lead to inconsistent equality behavior. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindILoggerTypeMismatch
- Find ILogger<T> type parameter mismatch
- Detect
ILogger<T>fields or parameters whereTdoesn't match the containing type name. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindIfElseBranchesIdentical
- Find if/else with identical branches
- Detect
if/elsestatements where both branches contain identical code. This is likely a copy-paste bug. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindImplementNonGenericInterface
- Find missing non-generic interface implementation
- Detect types implementing
IComparable<T>withoutIComparable, orIEquatable<T>without proper Equals override. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindImplicitCultureSensitiveToStringDirect
- Find implicit culture-sensitive ToString in concatenation
- Detect string concatenation with numeric types that implicitly call culture-sensitive
ToString(). Use an explicit format orCultureInfo.InvariantCulture. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindImplicitDateTimeOffsetConversion
- Find implicit DateTime to DateTimeOffset conversion
- Detect implicit conversion from
DateTimetoDateTimeOffsetwhich uses the local time zone and can produce unexpected results. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindInterpolatedStringWithoutParameters
- Find interpolated string without parameters
- Detect interpolated strings (
$"...") that contain no interpolation expressions. Use a regular string literal instead. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindInvalidAttributeArgumentType
- Find potentially invalid attribute argument type
- Detect attribute arguments that use types not valid in attribute constructors (only primitives, string, Type, enums, and arrays of these are allowed).
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindMethodReturningIAsyncEnumerable
- Find IAsyncEnumerable method without Async suffix
- Detect methods returning
IAsyncEnumerable<T>that don't end withAsync. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindMethodTooLong
- Find method that is too long
- Detect methods with more than 60 statements. Long methods are harder to understand and maintain.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindMissingCancellationTokenOverload
- Find async call missing CancellationToken
- Detect async method calls that don't pass a
CancellationTokenwhen the enclosing method has one available as a parameter. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindMissingNamedParameter
- Find boolean literal arguments without parameter name
- Detect method calls passing
trueorfalseliterals as arguments. Using named parameters improves readability. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindMissingParamsInOverride
- Find override method missing params keyword
- Detect override methods that may be missing the
paramskeyword on array parameters that the base method declares asparams. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindMissingStringComparison
- Find string method missing StringComparison
- Detect string methods like
Equals,Contains,StartsWith,EndsWithcalled without an explicitStringComparisonparameter. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindMissingStringEqualityComparer
- Find missing string equality comparer
- Detect
Dictionary<string, T>andHashSet<string>created without an explicitStringComparer. Without a comparer, the default ordinal comparison is used. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindMultiLineXmlComment
- Find multi-line XML doc comments
- Detect
/** */style XML documentation comments that could use the///single-line syntax for consistency. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindNonConstantStaticFieldsVisible
- Non-constant static fields should not be visible
- Public static fields that are not
constorreadonlycan be modified by any code, breaking encapsulation. Make themreadonlyor use a property. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindNonDeterministicEndOfLine
- Find non-deterministic end-of-line in strings
- Detect string literals containing
\nthat may behave differently across platforms. Consider usingEnvironment.NewLineinstead. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindNonFlagsEnumWithFlagsAttribute
- Find non-flags enum with [Flags]
- Detect enums marked with
[Flags]whose values are not powers of two, indicating they are not truly flags enums. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindNotNullIfNotNullAttribute
- Find missing NotNullIfNotNull attribute
- Detect methods with nullable return types depending on nullable parameters that lack
[NotNullIfNotNull]attribute. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindObserveAsyncResult
- Find unobserved async call result
- Detect calls to async methods where the returned Task is not awaited, assigned, or otherwise observed. Unobserved tasks may silently swallow exceptions.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindObsoleteWithoutMessage
- Obsolete attribute should include explanation
- The
[Obsolete]attribute should include a message explaining why the member is obsolete and what to use instead. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindOverrideChangesParameterDefaults
- Find overrides that change parameter defaults
- Detect
overridemethods with default parameter values. Overrides should not change defaults from the base method as this causes confusing behavior depending on the reference type. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindPreferCollectionAbstraction
- Find concrete collection in public API
- Detect public method parameters or return types that use concrete collection types like
List<T>instead ofIList<T>orIEnumerable<T>. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindPrimaryConstructorReadonly
- Find reassigned primary constructor parameter
- Detect primary constructor parameters that are reassigned in the class body. Primary constructor parameters should be treated as readonly.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindRawStringImplicitEndOfLine
- Find raw string with implicit end of line
- Detect raw string literals (
"""...""") that contain implicit end-of-line characters which may behave differently across platforms. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindReadOnlyStructMembers
- Find struct member that could be readonly
- Detect struct methods and properties that don't modify state and could be marked
readonlyto prevent defensive copies. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindRedundantArgumentValue
- Find redundant default argument values
- Detect named arguments that explicitly pass a default value. Removing them simplifies the call.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindSenderNullForStaticEvents
- Find static event with non-null sender
- Detect static event invocations that pass
thisas the sender. Static events should usenullas the sender. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindSingleLineXmlComment
- Find multi-line XML doc comment style
- Detect
/** ... */style XML doc comments. Use///single-line style instead for consistency. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindSpanEqualityOperator
- Find equality operator on Span<T>
- Detect
==or!=operators onSpan<T>orReadOnlySpan<T>. UseSequenceEqualinstead. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindStreamReadIgnored
- Find Stream.Read() return value ignored
- Detect
Stream.Read()calls where the return value (bytes read) is not used. This can lead to incomplete reads. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindStringFormatConstant
- Find non-constant string.Format format string
- Detect non-constant format strings passed to
string.Format. Use a constant to prevent format string injection. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindTaskInUsing
- Find unawaited task in using statement
- Detect
usingstatements where a Task is not awaited, which can cause premature disposal before the task completes. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindThreadStaticOnInstanceField
- Do not use ThreadStatic on instance fields
[ThreadStatic]only works on static fields. Using it on instance fields has no effect.- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindThrowIfNullWithNonNullable
- Find ThrowIfNull with value type argument
- Detect
ArgumentNullException.ThrowIfNullcalled with value type parameters that can never be null. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindTypeNameMatchesNamespace
- Find type name matching namespace
- Detect type names that match their containing namespace, which can cause ambiguous references.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindTypeShouldNotExtendApplicationException
- Types should not extend ApplicationException
- Do not create custom exceptions that inherit from
ApplicationException. Inherit fromExceptionor a more specific exception type. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseCallerArgumentExpression
- Find redundant nameof with CallerArgumentExpression
- Detect
nameof(param)passed to parameters marked with[CallerArgumentExpression]. The attribute fills the value automatically. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseDateTimeOffsetInsteadOfDateTime
- Find DateTime.Now/UtcNow usage
- Detect
DateTime.NowandDateTime.UtcNowusage. UseDateTimeOffsetinstead for unambiguous time representation across time zones. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseDebuggerDisplayAttribute
- Find ToString override without DebuggerDisplay
- Detect classes that override
ToString()but lack[DebuggerDisplay]attribute for debugger integration. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseDefaultParameterValue
- Find [DefaultValue] on parameter
- Detect
[DefaultValue]on method parameters. Use[DefaultParameterValue]instead, as[DefaultValue]is for component model metadata only. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseElementAccessInsteadOfLinq
- Find ElementAt() that could use indexer
- Detect LINQ
.ElementAt(index)calls that could be replaced with direct indexer access[index]. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseEqualsMethodInsteadOfOperator
- Find == comparison that should use Equals()
- Detect
==comparisons on reference types that overrideEquals. Using==may compare references instead of values. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseExplicitEnumValue
- Find integer 0 used instead of named enum value
- Detect usage of integer literal
0where a named enum member should be used for clarity. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseFormatProviderInToString
- Find Parse/ToString without IFormatProvider
- Detect calls to culture-sensitive methods like
int.Parse,double.Parsewithout an explicitIFormatProviderorCultureInfo. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseIFormatProvider
- Find Parse/TryParse without IFormatProvider
- Detect
int.Parse(str)and similar calls without anIFormatProviderparameter. UseCultureInfo.InvariantCulturefor culture-independent parsing. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseLangwordInXmlComment
- Find missing langword in XML comment
- Detect XML doc comments that reference
null,true,falseas plain text instead of using<see langword="..."/>. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseLazyInitializerEnsureInitialize
- Find Interlocked.CompareExchange lazy init pattern
- Detect
Interlocked.CompareExchange(ref field, new T(), null)pattern. UseLazyInitializer.EnsureInitializedfor cleaner lazy initialization. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseListPatternMatching
- Find collection emptiness check
- Detect
.Length == 0or.Count == 0checks that could use list patterns likeis []in C# 11+. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseNamedParameter
- Find boolean literal argument without name
- Detect boolean literal arguments (
true/false) passed without named parameters. Named arguments improve readability. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseOperatingSystemMethods
- Use OperatingSystem methods instead of RuntimeInformation
- Use
OperatingSystem.IsWindows()and similar methods instead ofRuntimeInformation.IsOSPlatform(). The OperatingSystem methods are more concise and can be optimized by the JIT. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseProcessStartWithStartInfo
- Find Process.Start with string argument
- Detect
Process.Start("filename")which should use theProcessStartInfooverload for explicit control overUseShellExecuteand other settings. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseRecordClassExplicitly
- Find implicit record class declaration
- Detect
recorddeclarations that should userecord classexplicitly to clarify that they are reference types. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseRegexOptions
- Find Regex without ExplicitCapture option
- Detect
new Regex()orRegex.IsMatch()withoutRegexOptions.ExplicitCapture. Using this option avoids unnecessary unnamed captures. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseShellExecuteFalseWhenRedirecting
- Find redirect without UseShellExecute=false
- Detect
ProcessStartInfothat setsRedirectStandard*without explicitly settingUseShellExecute = false. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseShellExecuteNotSet
- Find ProcessStartInfo without UseShellExecute
- Detect
new ProcessStartInfo()without explicitly settingUseShellExecute. The default changed between .NET Framework (true) and .NET Core (false). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseStringComparer
- Find Dictionary/HashSet without StringComparer
- Detect
Dictionary<string, T>orHashSet<string>created without an explicitStringComparer. UseStringComparer.OrdinalorStringComparer.OrdinalIgnoreCase. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseStringCreateInsteadOfConcat
- Find FormattableString usage
- Detect
FormattableStringusage. Consider usingString.Createon .NET 6+ for better performance. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseStringEqualsInsteadOfIsPattern
- Find 'is' pattern with string literal
- Detect
x is "literal"patterns that should usestring.Equalswith explicitStringComparisonfor culture-aware or case-insensitive comparisons. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseSystemThreadingLock
- Use System.Threading.Lock instead of object for locking
- In .NET 9+, use
System.Threading.Lockinstead ofobjectfor lock objects. The dedicated Lock type provides better performance. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseTaskUnwrap
- Find double await pattern
- Detect
await awaitpattern which can be replaced with.Unwrap()for clarity. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindUseTimeProviderInsteadOfCustom
- Find custom time abstraction
- Detect interfaces or abstract classes that appear to be custom time providers. Use
System.TimeProvider(available in .NET 8+) instead. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.FindValidateArgumentsBeforeYield
- Find argument validation in iterator method
- Detect iterator methods that validate arguments after
yield return. Argument validation in iterators is deferred until enumeration begins. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.ImplementExceptionConstructors
- Implement exception constructors
- Ensure custom exception classes implement standard constructors.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.ImplementNonGenericCounterpart
- Implement non-generic counterpart
- Implement non-generic interface when implementing generic counterpart.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.InvalidArgumentNullCheck
- Fix invalid argument null check
- Fix invalid argument null check patterns.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.MakeClassSealed
- Make class sealed
- A class that has only private constructors should be marked as sealed.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.MakeClassStatic
- Make class static
- Make classes that contain only static members static.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.MakeFieldReadOnly
- Make field read-only
- Make field read-only when it is only assigned in the constructor or initializer.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.MakeMethodExtensionMethod
- Make method an extension method
- Convert a static method to an extension method where appropriate.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.MarkLocalVariableAsConst
- Mark local variable as const
- Mark local variable as const when its value never changes.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.MarkTypeWithDebuggerDisplay
- Mark type with DebuggerDisplay attribute
- Add DebuggerDisplay attribute to publicly visible types to improve debugging experience.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.MergePreprocessorDirectives
- Merge preprocessor directives
- Merge consecutive preprocessor directives that can be combined into a single directive.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.NormalizeEnumFlagValue
- Normalize format of enum flag value
- Normalize the format of Flags enum values.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.OrderModifiers
- Order modifiers
- Reorder modifiers to the canonical C# order: access, new, abstract/virtual/override/sealed, static, readonly, extern, unsafe, volatile, async, partial, const.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.OrderNamedArguments
- Order named arguments by parameters
- Reorder named arguments to match parameter order.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.OrderTypeParameterConstraints
- Order type parameter constraints
- Order type parameter constraints consistently.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.OverridingMemberShouldNotChangeParams
- Overriding member should not change 'params' modifier
- An overriding member should not add or remove the 'params' modifier compared to its base declaration.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.ParameterNameDiffersFromBase
- Parameter name differs from base
- Rename parameter to match base class or interface definition.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.ParenthesizeNotPattern
- Parenthesize not pattern for clarity
- Add parentheses to
not A or B→(not A) or Bto clarify thatnotbinds tighter thanor. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.PreferNullCheckOverTypeCheck
- Prefer null check over type check
- Replace
x is objectwithx is not nullfor clarity. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.SimplifyBooleanLogic
- Simplify boolean logic with constants
- Simplify
x || truetotrue,x && falsetofalse,x || falsetox, andx && truetox. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.SortEnumMembers
- Sort enum members
- Sort enum members by their resolved constant value.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.SplitVariableDeclaration
- Split variable declaration
- Split multi-variable declarations into separate declarations.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.StaticMemberInGenericType
- Static member in generic type should use a type parameter
- Find static members in generic types that do not use any of the type's type parameters.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.StyleCodeQuality
- Style code quality
- Code style modernization recipes for C#.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UnusedParameter
- Remove unused parameter
- Rename unused lambda parameters to discard (_).
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UnusedTypeParameter
- Remove unused type parameter
- Flag type parameters that are not used.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseAsyncAwait
- Use async/await when necessary
- Add async/await to methods that return Task but don't use await.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseAttributeUsageAttribute
- Use AttributeUsageAttribute
- Add AttributeUsage to custom attribute classes.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseAutoProperty
- Use auto property
- Use auto property instead of property with backing field.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseBlockBodyOrExpressionBody
- Use block body or expression body
- Convert between block body and expression body for members.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseCoalesceExpressionFromNullCheck
- Use coalesce expression
- Convert null-check conditional to null-coalescing expression.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseCollectionExpression
- Use collection expression
- Replace array/list creation with collection expressions (C# 12).
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseConstantInsteadOfField
- Use constant instead of field
- Convert
static readonlyfields with literal initializers toconst. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseElementAccess
- Use element access
- Use indexer instead of First()/Last()/ElementAt() when the collection supports indexer access.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseEnumFieldExplicitly
- Use enum field explicitly
- Use named enum field instead of cast integer value.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseEventArgsEmpty
- Use EventArgs.Empty
- Replace
new EventArgs()withEventArgs.Empty. The staticEventArgs.Emptyfield avoids unnecessary allocations. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseEventArgsEmptyForNull
- Use EventArgs.Empty instead of null
- Replace
nullwithEventArgs.Emptywhen raising events. Passingnullfor EventArgs can cause NullReferenceException in event handlers. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseEventHandlerT
- Use EventHandler<T>
- Use generic EventHandler<T> instead of custom delegate types.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseExplicitTypeInsteadOfVar
- Use explicit type instead of var
- Use explicit type instead of
varwhen the type is not evident. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseExplicitlyTypedArray
- Use explicitly typed array
- Use explicitly or implicitly typed array.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseFileScopedNamespace
- Use file-scoped namespace
- Detect block-scoped namespace declarations that could use file-scoped syntax (C# 10).
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseMethodChaining
- Use method chaining
- Chain consecutive method calls on the same receiver into a fluent chain.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseMethodGroupConversion
- Use method group conversion
- Replace
x => Foo(x)withFoowhere method group conversion applies. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UsePredefinedType
- Use predefined type
- Use predefined type keyword (e.g., int instead of Int32).
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UsePrimaryConstructor
- Use primary constructor
- Convert classes with a single constructor into primary constructor syntax (C# 12).
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseReadOnlyAutoProperty
- Use read-only auto property
- Use read-only auto property when the setter is never used.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseStringContains
- Use string.Contains instead of IndexOf comparison
- Replace
s.IndexOf(x) >= 0withs.Contains(x)ands.IndexOf(x) == -1with!s.Contains(x). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseStringIsNullOrEmpty
- Use string.IsNullOrEmpty method
- Replace
s == null || s == ""ands == null || s.Length == 0withstring.IsNullOrEmpty(s). - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseStringLengthComparison
- Use string.Length instead of comparison with empty string
- Replace
s == ""withs.Length == 0ands != ""withs.Length != 0. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseThisForEventSender
- Use 'this' for event sender
- Replace
nullwiththisas the sender argument when raising instance events. The sender should be the object raising the event. - Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseUsingDeclaration
- Use using declaration
- Convert using statement to using declaration.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseVarInForEach
- Use var instead of explicit type in foreach
- Replace explicit type in foreach with var when type is evident.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.UseVarOrExplicitType
- Use 'var' or explicit type
- Enforce consistent use of 'var' or explicit type in local variable declarations.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.ValidateArgumentsCorrectly
- Validate arguments correctly
- Ensure argument validation in iterator methods runs immediately by flagging iterator methods that contain argument validation.
- Tags: code-quality
- OpenRewrite.Recipes.CodeQuality.Style.ValueTypeIsNeverEqualToNull
- Value type is never equal to null
- Replace null with default in comparisons of value types.
- Tags: code-quality
- org.openrewrite.python.migrate.FindFunctoolsCmpToKey
- Find
functools.cmp_to_key()usage - Find usage of
functools.cmp_to_key()which is a Python 2 compatibility function. Consider using a key function directly. - Tags: code-quality
- Find
- org.openrewrite.python.migrate.FindSocketGetFQDN
- Find
socket.getfqdn()usage - Find usage of
socket.getfqdn()which can be slow and unreliable. Consider usingsocket.gethostname()instead. - Tags: code-quality
- Find
codemods
103 recipes
- org.openrewrite.codemods.ecmascript.5to6.ECMAScript6BestPractices
- Upgrade ECMAScript 5 to ECMAScript 6
- A collection of common ECMAScript 5 to ECMAScript 6 updates.
- org.openrewrite.codemods.ecmascript.5to6.amdToEsm
- Transform AMD style
define()calls to ES6importstatements - Transform AMD style
define()calls to ES6importstatements.
- Transform AMD style
- org.openrewrite.codemods.ecmascript.5to6.cjsToEsm
- Transform CommonJS style
require()calls to ES6importstatements - Transform CommonJS style
require()calls to ES6importstatements.
- Transform CommonJS style
- org.openrewrite.codemods.ecmascript.5to6.namedExportGeneration
- Generate named exports from CommonJS modules
- Generate named exports from CommonJS modules.
- org.openrewrite.codemods.ecmascript.5to6.noStrict
- Remove "use strict" directives
- Remove "use strict" directives.
- org.openrewrite.codemods.ecmascript.5to6.simpleArrow
- Replace all function expressions with only
returnstatement with simple arrow - Replace all function expressions with only
returnstatement with simple arrow function.
- Replace all function expressions with only
- org.openrewrite.codemods.ecmascript.5to6.varToLet
- Convert
vartolet - Convert
vartolet.
- Convert
- org.openrewrite.codemods.ecmascript.ESLintTypeScriptDefaults
- Lint TypeScript code using ESLint
- The default config includes the
@typescript-eslintplugin and the correspondingplugin:@typescript-eslint/recommendedextend.
- org.openrewrite.codemods.ecmascript.ESLintTypeScriptPrettier
- Format TypeScript using ESLint Prettier plugin
- Formats all TypeScript source code using the ESLint Prettier plugin.
- org.openrewrite.codemods.migrate.lodash.LodashUnderscoreArray
- Replace lodash and underscore array functions with native JavaScript
-
_.head(x)->x[0]-_.head(x, n)->x.slice(n)-_.first(alias for_.head) -_.tail(x)->x.slice(1)-_.tail(x, n)->x.slice(n)-_.rest(alias for_.tail) -_.last(x)->x[x.length - 1]-_.last(x, n)->x.slice(x.length - n).
- org.openrewrite.codemods.migrate.lodash.LodashUnderscoreFunction
- Replace lodash and underscore function functions with native JavaScript
-
_.bind(fn, obj, ...x)->fn.bind(obj, ...x)-_.partial(fn, a, b);->(...args) => fn(a, b, ...args).
- org.openrewrite.codemods.migrate.lodash.LodashUnderscoreObjects
- Replace lodash and underscore object functions with native JavaScript
-
_.clone(x)->\{ ...x \}-_.extend(\{\}, x, y)->\{ ...x, ...y \}-_.extend(obj, x, y)->Object.assign(obj, x, y)-_.keys(x)->Object.keys(x)-_.pairs(x)->Object.entries(x)-_.values(x)->Object.values(x).
- org.openrewrite.codemods.migrate.lodash.LodashUnderscoreUtil
- Replace lodash and underscore utility functions with native JavaScript
-
_.isArray(x)->Array.isArray(x)-_.isBoolean(x)->typeof(x) === 'boolean'-_.isFinite(x)->Number.isFinite(x)-_.isFunction(x)->typeof(x) === 'function'-_.isNull(x)->x === null-_.isString(x)->typeof(x) === 'string'-_.isUndefined(x)->typeof(x) === 'undefined'.
- org.openrewrite.codemods.migrate.mui.AdapterV
- Converts components to use the v4 adapter module
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.All
- Combination of all deprecations
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.AutocompleteRenameCloseicon
- Renames
closeIconprop tocloseButtonIcon - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.AutocompleteRenameOption
- Renames
optionprop togetOptionLabel - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.AvatarCircleCircular
- Updates
circleprop tovariant="circular" - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.BadgeOverlapValue
- Updates
overlapprop tovariant="dot" - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.BaseHookImports
- Converts base imports to use React hooks
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.BaseRemoveComponentProp
- Removes
componentprop from base components - See Material UI codemod projects for more details.
- Removes
- org.openrewrite.codemods.migrate.mui.BaseRemoveUnstyledSuffix
- Removes
Unstyledsuffix from base components - See Material UI codemod projects for more details.
- Removes
- org.openrewrite.codemods.migrate.mui.BaseRenameComponentsToSlots
- Renames base components to slots
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.BaseUseNamedExports
- Updates base imports to use named exports
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.BoxBorderradiusValues
- Updates
borderRadiusprop values - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.BoxRenameCss
- Renames CSS properties for Box component
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.BoxRenameGap
- Renames
gapprop tospacing - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.BoxSxProp
- Converts
sxprop tosxstyle prop - See Material UI codemod projects for more details.
- Converts
- org.openrewrite.codemods.migrate.mui.ButtonColorProp
- Renames
colorprop tocolorOverride - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.ChipVariantProp
- Updates
variantprop for Chip component - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.CircularprogressVariant
- Updates
variantprop for CircularProgress component - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.CollapseRenameCollapsedheight
- Renames
collapsedHeightprop totransitionCollapsedHeight - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.ComponentRenameProp
- Renames
componentprop toas - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.CoreStylesImport
- Updates import paths for core styles
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.CreateTheme
- Updates createMuiTheme usage
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.DatePickersMovedToX
- Moves date pickers to
@mui/x-date-picker - See Material UI codemod projects for more details.
- Moves date pickers to
- org.openrewrite.codemods.migrate.mui.DialogProps
- Updates props for Dialog component
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.DialogTitleProps
- Updates props for DialogTitle component
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.EmotionPrependCache
- Prepends emotion cache
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.ExpansionPanelComponent
- Converts ExpansionPanel to use ExpansionPanel component
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.FabVariant
- Updates
variantprop for Fab component - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.FadeRenameAlpha
- Renames
alphaprop toopacity - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.GridJustifyJustifycontent
- Updates
justifyprop tojustifyContentfor Grid component - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.GridListComponent
- Converts GridList to use Grid component
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.GridVProps
- Updates the usage of the
@mui/material/Grid2,@mui/system/Grid, and@mui/joy/Gridcomponents to their updated APIs - See Material UI codemod projects for more details.
- Updates the usage of the
- org.openrewrite.codemods.migrate.mui.HiddenDownProps
- Updates
downprop for Hidden component - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.IconButtonSize
- Updates
sizeprop for IconButton component - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.JoyAvatarRemoveImgprops
- Removes
imgPropsprop from Avatar component - See Material UI codemod projects for more details.
- Removes
- org.openrewrite.codemods.migrate.mui.JoyRenameClassnamePrefix
- Renames
Muiclassname prefix - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.JoyRenameComponentsToSlots
- Renames components to slots
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.JoyRenameRowProp
- Renames
rowprop toflexDirection="row" - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.JoyTextFieldToInput
- Renames
TextFieldtoInput - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.JssToStyled
- Converts JSS styles to styled-components
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.JssToTssReact
- Converts JSS to TypeScript in React components
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.LinkUnderlineHover
- Updates link underline on hover
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.MaterialUiStyles
- Updates usage of
@mui/styles - See Material UI codemod projects for more details.
- Updates usage of
- org.openrewrite.codemods.migrate.mui.MaterialUiTypes
- Updates usage of
@mui/types - See Material UI codemod projects for more details.
- Updates usage of
- org.openrewrite.codemods.migrate.mui.ModalProps
- Updates props for Modal component
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.MovedLabModules
- Moves lab modules to
@mui/material - See Material UI codemod projects for more details.
- Moves lab modules to
- org.openrewrite.codemods.migrate.mui.MuiReplace
- Replaces
@muiimports with@mui/material - See Material UI codemod projects for more details.
- Replaces
- org.openrewrite.codemods.migrate.mui.OptimalImports
- Optimizes imports
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.PaginationRoundCircular
- Updates
circularprop tovariant="circular" - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.PresetSafe
- Ensures presets are safe to use
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.RenameCssVariables
- Renames CSS variables
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.RootRef
- Converts
rootReftoref - See Material UI codemod projects for more details.
- Converts
- org.openrewrite.codemods.migrate.mui.SkeletonVariant
- Updates
variantprop for Skeleton component - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.Styled
- Updates the usage of
styledfrom@mui/system@v5to be compatible with@pigment-css/react - See Material UI codemod projects for more details.
- Updates the usage of
- org.openrewrite.codemods.migrate.mui.StyledEngineProvider
- Updates usage of styled engine provider
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.SxProp
- Update the usage of the
sxprop to be compatible with@pigment-css/react - See Material UI codemod projects for more details.
- Update the usage of the
- org.openrewrite.codemods.migrate.mui.SystemProps
- Remove system props and add them to the
sxprop - See Material UI codemod projects for more details.
- Remove system props and add them to the
- org.openrewrite.codemods.migrate.mui.TableProps
- Updates props for Table component
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.TabsScrollButtons
- Updates scroll buttons for Tabs component
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.TextareaMinmaxRows
- Updates
minRowsandmaxRowsprops for TextareaAutosize component - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.ThemeAugment
- Adds
DefaultThememodule augmentation to typescript projects - See Material UI codemod projects for more details.
- Adds
- org.openrewrite.codemods.migrate.mui.ThemeBreakpoints
- Updates theme breakpoints
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.ThemeBreakpointsWidth
- Updates
widthvalues for theme breakpoints - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.ThemeOptions
- Updates theme options
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.ThemePaletteMode
- Updates theme palette mode
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.ThemeProvider
- Updates usage of ThemeProvider
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.ThemeSpacing
- Updates theme spacing
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.ThemeSpacingApi
- Updates theme spacing API
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.ThemeTypographyRound
- Updates
roundvalues for theme typography - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.ThemeV
- Update the theme creation from
@mui/system@v5to be compatible with@pigment-css/react - See Material UI codemod projects for more details.
- Update the theme creation from
- org.openrewrite.codemods.migrate.mui.TopLevelImports
- Converts all
@mui/materialsubmodule imports to the root module - See Material UI codemod projects for more details.
- Converts all
- org.openrewrite.codemods.migrate.mui.Transitions
- Updates usage of transitions
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.TreeViewMovedToX
- Moves tree view to
@mui/x-tree-view - See Material UI codemod projects for more details.
- Moves tree view to
- org.openrewrite.codemods.migrate.mui.UseAutocomplete
- Updates usage of useAutocomplete
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.UseTransitionprops
- Updates usage of useTransitionProps
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.VariantProp
- Updates
variantprop usage - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.WithMobileDialog
- Updates withMobileDialog higher-order component
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.WithWidth
- Updates withWidth higher-order component
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.nextjs.NextJsCodemods
- Next.js Codemods for API Updates
- Next.js provides Codemod transformations to help upgrade your Next.js codebase when an API is updated or deprecated.
- org.openrewrite.codemods.migrate.nextjs.v10.AddMissingReactImport
- Add React imports
- Transforms files that do not import
Reactto include the import in order for the new React JSX transform to work.
- org.openrewrite.codemods.migrate.nextjs.v11.CraToNext
- Rename Next Image Imports
- Safely renames
next/imageimports in existing Next.js1011or12applications tonext/legacy/imagein Next.js 13. Also renamesnext/future/imagetonext/image.
- org.openrewrite.codemods.migrate.nextjs.v13_0.NewLink
- Remove
<a>Tags From Link Components - Remove
&lt;a&gt;tags inside Link Components or add alegacyBehaviorprop to Links that cannot be auto-fixed.
- Remove
- org.openrewrite.codemods.migrate.nextjs.v13_0.NextImageExperimental
- Migrate to the New Image Component
- Dangerously migrates from
next/legacy/imageto the newnext/imageby adding inline styles and removing unused props.
- org.openrewrite.codemods.migrate.nextjs.v13_0.NextImageToLegacyImage
- Rename Next Image Imports
- Safely renames
next/imageimports in existing Next.js1011or12applications tonext/legacy/imagein Next.js 13. Also renamesnext/future/imagetonext/image.
- org.openrewrite.codemods.migrate.nextjs.v13_2.BuiltInNextFont
- Use Built-in Font
- This codemod uninstalls the
@next/fontpackage and transforms@next/fontimports into the built-innext/font.
- org.openrewrite.codemods.migrate.nextjs.v14_0.MetadataToViewportExport
- Use
viewportexport - This codemod migrates certain viewport metadata to
viewportexport.
- Use
- org.openrewrite.codemods.migrate.nextjs.v14_0.NextOgImport
- Migrate
ImageResponseimports - This codemod moves transforms imports from
next/servertonext/ogfor usage of Dynamic OG Image Generation.
- Migrate
- org.openrewrite.codemods.migrate.nextjs.v6.UrlToWithrouter
- Use
withRouter - Transforms the deprecated automatically injected url property on top-level pages to using
withRouterand therouterproperty it injects. Read more here.
- Use
- org.openrewrite.codemods.migrate.nextjs.v8.WithampToConfig
- Transform AMP HOC into page config
- Transforms the
withAmpHOC into Next.js 9 page configuration.
- org.openrewrite.codemods.migrate.nextjs.v9.NameDefaultComponent
- Transform Anonymous Components into Named Components
- Transforms anonymous components into named components to make sure they work with Fast Refresh. The component will have a camel-cased name based on the name of the file, and it also works with arrow functions.
collections
3 recipes
- org.openrewrite.apache.commons.collections.UpgradeApacheCommonsCollections_3_4
- Migrates to Apache Commons Collections 4.x
- Migrate applications to the latest Apache Commons Collections 4.x release. This recipe modifies application's build files, make changes to deprecated/preferred APIs, and migrates configuration settings that have changes between versions.
- org.openrewrite.java.migrate.util.SequencedCollection
- Adopt
SequencedCollection - Replace older code patterns with
SequencedCollectionmethods, as per https://openjdk.org/jeps/431.
- Adopt
- org.openrewrite.python.migrate.ReplaceCollectionsAbcImports
- Replace
collectionsABC imports withcollections.abc - Migrate deprecated abstract base class imports from
collectionstocollections.abc. These imports were deprecated in Python 3.3 and removed in Python 3.10.
- Replace
commons
14 recipes
- org.openrewrite.apache.commons.codec.ApacheBase64ToJavaBase64
- Prefer
java.util.Base64 - Prefer the Java standard library's
java.util.Base64over third-party usage of apache'sapache.commons.codec.binary.Base64.
- Prefer
- org.openrewrite.apache.commons.collections.UpgradeApacheCommonsCollections_3_4
- Migrates to Apache Commons Collections 4.x
- Migrate applications to the latest Apache Commons Collections 4.x release. This recipe modifies application's build files, make changes to deprecated/preferred APIs, and migrates configuration settings that have changes between versions.
- org.openrewrite.apache.commons.io.ApacheFileUtilsToJavaFiles
- Prefer
java.nio.file.Files - Prefer the Java standard library's
java.nio.file.Filesover third-party usage of apache'sapache.commons.io.FileUtils.
- Prefer
- org.openrewrite.apache.commons.io.ApacheIOUtilsUseExplicitCharset
- Use IOUtils method that include their charset encoding
- Use
IOUtilsmethod invocations that include the charset encoding instead of using the deprecated versions that do not include a charset encoding. (e.g. convertsIOUtils.readLines(inputStream)toIOUtils.readLines(inputStream, StandardCharsets.UTF_8).
- org.openrewrite.apache.commons.io.RelocateApacheCommonsIo
- Relocate
org.apache.commons:commons-iotocommons-io:commons-io - The deployment of
org.apache.commons:commons-iowas a publishing mistake around 2012 which was corrected by changing the deployment GAV to be located undercommons-io:commons-io.
- Relocate
- org.openrewrite.apache.commons.io.UseStandardCharsets
- Prefer
java.nio.charset.StandardCharsets - Prefer the Java standard library's
java.nio.charset.StandardCharsetsover third-party usage of apache'sorg.apache.commons.io.Charsets.
- Prefer
- org.openrewrite.apache.commons.io.UseSystemLineSeparator
- Prefer
System.lineSeparator() - Prefer the Java standard library's
System.lineSeparator()over third-party usage of apache'sIOUtils.LINE_SEPARATOR.
- Prefer
- org.openrewrite.apache.commons.lang.IsNotEmptyToJdk
- Replace any StringUtils#isEmpty(String) and #isNotEmpty(String)
- Replace any
StringUtils#isEmpty(String)and#isNotEmpty(String)withs == null || s.isEmpty()ands != null && !s.isEmpty().
- org.openrewrite.apache.commons.lang.UpgradeApacheCommonsLang_2_3
- Migrates to Apache Commons Lang 3.x
- Migrate applications to the latest Apache Commons Lang 3.x release. This recipe modifies application's build files, and changes the package as per the migration release notes.
- org.openrewrite.apache.commons.lang.WordUtilsToCommonsText
- Migrate
WordUtilsto Apache Commons Text - Migrate
org.apache.commons.lang.WordUtilstoorg.apache.commons.text.WordUtilsand add the Commons Text dependency.
- Migrate
- org.openrewrite.apache.commons.lang3.UseStandardCharsets
- Prefer
java.nio.charset.StandardCharsets - Prefer the Java standard library's
java.nio.charset.StandardCharsetsoverorg.apache.commons.lang3.CharEncoding.
- Prefer
- org.openrewrite.apache.commons.math.UpgradeApacheCommonsMath_2_3
- Migrates to Apache Commons Math 3.x
- Migrate applications to the latest Apache Commons Math 3.x release. This recipe modifies application's build files, make changes to deprecated/preferred APIs, and migrates configuration settings that have changes between versions.
- org.openrewrite.java.logging.log4j.CommonsLoggingToLog4j
- Migrate JCL to Log4j 2.x API
- Transforms code written using Apache Commons Logging to use Log4j 2.x API.
- Tags: commons-logging
- org.openrewrite.java.logging.slf4j.CommonsLogging1ToSlf4j1
- Migrate Apache Commons Logging 1.x to SLF4J 1.x
- Transforms usages of Apache Commons Logging 1.x to leveraging SLF4J 1.x directly.
- Tags: commons-logging
compatibility
1 recipe
- org.openrewrite.quarkus.spring.AddSpringCompatibilityExtensions
- Add Spring compatibility extensions for commonly used annotations
- Adds Quarkus Spring compatibility extensions when Spring annotations are detected in the codebase.
compiler
2 recipes
- io.quarkus.updates.core.quarkus37.JavaVersion17
- Change Maven and Gradle Java version property values to 17
- Change maven.compiler.source and maven.compiler.target values to 17.
- org.apache.camel.upgrade.JavaVersion17
- Change Maven Java version property values to 17
- Change maven.compiler.source and maven.compiler.target values to 17.
compose
1 recipe
- org.openrewrite.kotlin.compose.ReplaceDeprecatedComposeMethods
- Replace deprecated Jetpack Compose methods
- Replace deprecated Jetpack Compose method calls with their recommended replacements, based on
@Deprecated(replaceWith=ReplaceWith(...))annotations.
compression
2 recipes
- OpenRewrite.Recipes.Net9.FindZipArchiveCompressionLevel
- Find
ZipArchive.CreateEntrywithCompressionLevel(bit flag change) - Finds
ZipArchive.CreateEntry()andZipFileExtensions.CreateEntryFromFile()calls with aCompressionLevelparameter. In .NET 9, theCompressionLevelvalue now sets general-purpose bit flags in the ZIP central directory header, which may affect interoperability.
- Find
- OpenRewrite.Recipes.Net9.FindZipArchiveEntryEncoding
- Find
ZipArchiveEntryname/comment UTF-8 encoding change - Finds access to
ZipArchiveEntry.Name,FullName, orCommentproperties. In .NET 9, these now respect the UTF-8 flag in ZIP entries, which may change decoded values.
- Find
config
1 recipe
- org.openrewrite.quarkus.spring.MigrateSpringCloudConfig
- Migrate Spring Cloud Config Client to Quarkus Config
- Migrates Spring Cloud Config Client to Quarkus configuration sources. Converts bootstrap.yml/properties patterns to Quarkus config.
configuration
1 recipe
- org.openrewrite.quarkus.spring.MigrateConfigurationProperties
- Migrate @ConfigurationProperties to Quarkus @ConfigMapping
- Migrates Spring Boot @ConfigurationProperties to Quarkus @ConfigMapping. This recipe converts configuration property classes to the native Quarkus pattern.
connector
2 recipes
- com.oracle.weblogic.rewrite.WebLogicRaXmlNamespace1412
- Migrate xmlns entries in
weblogic-ra.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Resource Adapter schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicRaXmlNamespace1511
- Migrate xmlns entries in
weblogic-ra.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-ra.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
connectors
1 recipe
- com.oracle.weblogic.rewrite.jakarta.JavaxRaXmlToJakarta9RaXml
- Migrate xmlns entries in
ra.xmlfiles (Connectors). - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
core
1 recipe
- com.oracle.weblogic.rewrite.hibernate.AddHibernateOrmCore61
- Add Hibernate ORM Core if has dependencies
- This recipe will add Hibernate ORM Core if has dependencies.
cryptography
9 recipes
- OpenRewrite.Recipes.Net10.FindRfc2898DeriveBytesObsolete
- Find obsolete
Rfc2898DeriveBytesconstructors (SYSLIB0060) - Finds
new Rfc2898DeriveBytes(...)constructor calls which are obsolete in .NET 10. Use the staticRfc2898DeriveBytes.Pbkdf2()method instead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindX500DistinguishedNameValidation
- Find
X500DistinguishedNamestring constructor stricter validation - Finds
new X500DistinguishedName(string, ...)constructor calls which have stricter validation in .NET 10. Non-Windows environments may reject previously accepted values.
- Find
- OpenRewrite.Recipes.Net10.MlDsaSlhDsaSecretKeyToPrivateKey
- Rename MLDsa/SlhDsa
SecretKeymembers toPrivateKey - Renames
SecretKeytoPrivateKeyin MLDsa and SlhDsa post-quantum cryptography APIs to align with .NET 10 naming conventions.
- Rename MLDsa/SlhDsa
- OpenRewrite.Recipes.Net6.FindX509PrivateKey
- Find
X509Certificate2.PrivateKeyusage (SYSLIB0028) - Finds usages of
X509Certificate2.PrivateKeywhich is obsolete (SYSLIB0028). UseGetRSAPrivateKey(),GetECDsaPrivateKey(), or the appropriate algorithm-specific method instead.
- Find
- OpenRewrite.Recipes.Net7.FindRfc2898InsecureCtors
- Find insecure
Rfc2898DeriveBytesconstructors (SYSLIB0041) - Finds
Rfc2898DeriveBytesconstructor calls that use default SHA1 or low iteration counts, which are obsolete in .NET 7 (SYSLIB0041). SpecifyHashAlgorithmNameand at least 600,000 iterations.
- Find insecure
- OpenRewrite.Recipes.Net8.FindAesGcmOldConstructor
- Find
AesGcmconstructor without tag size (SYSLIB0053) - Finds
new AesGcm(key)constructor calls without an explicit tag size parameter. In .NET 8, the single-argument constructor is obsolete (SYSLIB0053). Usenew AesGcm(key, tagSizeInBytes)instead.
- Find
- OpenRewrite.Recipes.Net9.FindSafeEvpPKeyHandleDuplicate
- Find
SafeEvpPKeyHandle.DuplicateHandleup-ref change - Finds calls to
SafeEvpPKeyHandle.DuplicateHandle(). In .NET 9, this method now increments the reference count instead of creating a deep copy, which may affect handle lifetime.
- Find
- OpenRewrite.Recipes.Net9.FindX509CertificateConstructors
- Find obsolete
X509Certificate2/X509Certificateconstructors (SYSLIB0057) - Finds usages of
X509Certificate2andX509Certificateconstructors that accept binary content or file paths, which are obsolete in .NET 9 (SYSLIB0057). UseX509CertificateLoadermethods instead.
- Find obsolete
- OpenRewrite.Recipes.Net9.UseX509CertificateLoader
- Use X509CertificateLoader (SYSLIB0057)
- Replace
new X509Certificate2(path, password)withX509CertificateLoader.LoadPkcs12FromFile(path, password). The two-argument X509Certificate2 constructor is obsolete in .NET 9 (SYSLIB0057).
csharp
480 recipes
- OpenRewrite.Recipes.AspNet.UpgradeAspNetFrameworkToCore
- Migrate ASP.NET Framework to ASP.NET Core
- Migrate ASP.NET Framework (System.Web.Mvc, System.Web.Http) types to their ASP.NET Core equivalents. Based on the .NET Upgrade Assistant's UA0002 and UA0010 diagnostics. See https://learn.microsoft.com/en-us/aspnet/core/migration/proper-to-2x.
- OpenRewrite.Recipes.AspNetCore2.FindBuildWebHost
- Find BuildWebHost method
- Flags
BuildWebHostmethod declarations that should be renamed toCreateWebHostBuilderand refactored for ASP.NET Core 2.1.
- OpenRewrite.Recipes.AspNetCore2.FindIAuthenticationManager
- Find IAuthenticationManager usage
- Flags references to
IAuthenticationManagerwhich was removed in ASP.NET Core 2.0. UseHttpContextextension methods fromMicrosoft.AspNetCore.Authenticationinstead.
- OpenRewrite.Recipes.AspNetCore2.FindLoggerFactoryAddProvider
- Find ILoggerFactory.Add() calls*
- Flags
ILoggerFactory.AddConsole(),AddDebug(), and similar extension methods. In ASP.NET Core 2.2+, logging should be configured viaConfigureLoggingin the host builder.
- OpenRewrite.Recipes.AspNetCore2.FindSetCompatibilityVersion
- Find SetCompatibilityVersion() calls
- Flags
SetCompatibilityVersioncalls. This method is a no-op in ASP.NET Core 3.0+ and should be removed during migration.
- OpenRewrite.Recipes.AspNetCore2.FindUseKestrelWithConfig
- Find UseKestrel() with configuration
- Flags
UseKestrelcalls with configuration lambdas that should be replaced withConfigureKestrelto avoid conflicts with the IIS in-process hosting model.
- OpenRewrite.Recipes.AspNetCore2.UpgradeToAspNetCore20
- Migrate to ASP.NET Core 2.0
- Migrate ASP.NET Core 1.x projects to ASP.NET Core 2.0, applying authentication and Identity changes. See https://learn.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/identity-2x.
- OpenRewrite.Recipes.AspNetCore2.UpgradeToAspNetCore21
- Migrate to ASP.NET Core 2.1
- Migrate ASP.NET Core 2.0 projects to ASP.NET Core 2.1, including host builder changes and obsolete API replacements. See https://learn.microsoft.com/en-us/aspnet/core/migration/20-to-21.
- OpenRewrite.Recipes.AspNetCore2.UpgradeToAspNetCore22
- Migrate to ASP.NET Core 2.2
- Migrate ASP.NET Core 2.1 projects to ASP.NET Core 2.2, including Kestrel configuration and logging changes. See https://learn.microsoft.com/en-us/aspnet/core/migration/21-to-22.
- OpenRewrite.Recipes.AspNetCore2.UseGetExternalAuthenticationSchemesAsync
- Use GetExternalAuthenticationSchemesAsync()
- Replace
GetExternalAuthenticationSchemes()withGetExternalAuthenticationSchemesAsync(). The synchronous method was removed in ASP.NET Core 2.0.
- OpenRewrite.Recipes.AspNetCore2.UseHttpContextAuthExtensions
- Use HttpContext authentication extensions
- Replace
HttpContext.Authentication.Method(...)calls withHttpContext.Method(...)extension methods. TheIAuthenticationManagerinterface was removed in ASP.NET Core 2.0.
- OpenRewrite.Recipes.AspNetCore2.UseUseAuthentication
- Replace UseIdentity() with UseAuthentication()
- Replace
app.UseIdentity()withapp.UseAuthentication(). TheUseIdentitymethod was removed in ASP.NET Core 2.0 in favor ofUseAuthentication.
- OpenRewrite.Recipes.AspNetCore3.FindAddMvc
- Find AddMvc() calls
- Flags
AddMvc()calls that should be replaced with more specific service registrations (AddControllers,AddControllersWithViews, orAddRazorPages) in ASP.NET Core 3.0.
- OpenRewrite.Recipes.AspNetCore3.FindIApplicationLifetime
- Find IApplicationLifetime usage
- Flags usages of
IApplicationLifetimewhich should be replaced withIHostApplicationLifetimein ASP.NET Core 3.0.
- OpenRewrite.Recipes.AspNetCore3.FindIHostingEnvironment
- Find IHostingEnvironment usage
- Flags usages of
IHostingEnvironmentwhich should be replaced withIWebHostEnvironmentin ASP.NET Core 3.0.
- OpenRewrite.Recipes.AspNetCore3.FindNewLoggerFactory
- Find new LoggerFactory() calls
- Flags
new LoggerFactory()calls that should be replaced withLoggerFactory.Create(builder => ...)in .NET Core 3.0+.
- OpenRewrite.Recipes.AspNetCore3.FindNewtonsoftJsonUsage
- Find Newtonsoft.Json usage in ASP.NET Core
- Flags
JsonConvertand otherNewtonsoft.Jsonusage. ASP.NET Core 3.0 usesSystem.Text.Jsonby default.
- OpenRewrite.Recipes.AspNetCore3.FindUseMvcOrUseSignalR
- Find UseMvc()/UseSignalR() calls
- Flags
UseMvc()andUseSignalR()calls that should be replaced with endpoint routing (UseRouting()+UseEndpoints()) in ASP.NET Core 3.0.
- OpenRewrite.Recipes.AspNetCore3.FindWebHostBuilder
- Find WebHostBuilder usage
- Flags
WebHostBuilderandWebHost.CreateDefaultBuilderusage that should migrate to the Generic Host pattern in ASP.NET Core 3.0+.
- OpenRewrite.Recipes.AspNetCore3.UpgradeToAspNetCore30
- Migrate to ASP.NET Core 3.0
- Migrate ASP.NET Core 2.2 projects to ASP.NET Core 3.0, including endpoint routing, Generic Host, and System.Text.Json changes. See https://learn.microsoft.com/en-us/aspnet/core/migration/22-to-30.
- OpenRewrite.Recipes.CodeQuality.CodeQuality
- Code quality
- All C# code quality recipes, organized by category.
- OpenRewrite.Recipes.CodeQuality.Formatting.AddNewLineAfterOpeningBrace
- Add newline after opening brace
- Add newline after opening brace so the first statement starts on its own line.
- OpenRewrite.Recipes.CodeQuality.Formatting.AddNewLineBeforeReturn
- Add newline before return
- Add a blank line before return statements that follow other statements.
- OpenRewrite.Recipes.CodeQuality.Formatting.AddParagraphToDocComment
- Add paragraph to documentation comment
- Format multi-line documentation comments with paragraph elements.
- OpenRewrite.Recipes.CodeQuality.Formatting.AddParameterToDocComment
- Add parameter name to documentation comment
- Add missing param elements to XML documentation comments.
- OpenRewrite.Recipes.CodeQuality.Formatting.AddSummaryElementToDocComment
- Add summary to documentation comment
- Add summary text to documentation comments with empty summary elements.
- OpenRewrite.Recipes.CodeQuality.Formatting.AddSummaryToDocComment
- Add summary element to documentation comment
- Add missing summary element to XML documentation comments.
- OpenRewrite.Recipes.CodeQuality.Formatting.AddTypeParamToDocComment
- Add 'typeparam' element to documentation comment
- Add missing 'typeparam' elements to XML documentation comments.
- OpenRewrite.Recipes.CodeQuality.Formatting.FixDocCommentTag
- Fix documentation comment tag
- Replace inline <code> elements with <c> elements in XML documentation comments.
- OpenRewrite.Recipes.CodeQuality.Formatting.FormatAccessorList
- Format accessor list
- Format property accessor list for consistent whitespace.
- OpenRewrite.Recipes.CodeQuality.Formatting.FormatDocumentationSummary
- Format documentation summary
- Format XML documentation summary on a single line or multiple lines.
- OpenRewrite.Recipes.CodeQuality.Formatting.FormatSwitchSection
- Format switch section
- Ensure consistent formatting of switch sections.
- OpenRewrite.Recipes.CodeQuality.Formatting.FormattingCodeQuality
- Formatting code quality
- Code formatting recipes for C#.
- OpenRewrite.Recipes.CodeQuality.Formatting.InvalidDocCommentReference
- Invalid reference in a documentation comment
- Find invalid cref or paramref references in XML documentation comments.
- OpenRewrite.Recipes.CodeQuality.Formatting.NormalizeWhitespace
- Normalize whitespace
- Normalize whitespace for consistent formatting.
- OpenRewrite.Recipes.CodeQuality.Formatting.OrderDocCommentElements
- Order elements in documentation comment
- Order param/typeparam elements to match declaration order.
- OpenRewrite.Recipes.CodeQuality.Linq.CombineLinqMethods
- Combine LINQ methods
- Combine
.Where(predicate).First()and similar patterns into.First(predicate), and consecutive.Where().Where()calls into a single.Where()with a combined predicate. Eliminating intermediate LINQ calls improves readability.
- OpenRewrite.Recipes.CodeQuality.Linq.FindOptimizeCountUsage
- Find Count() comparison that could be optimized
- Detect
Count(pred) == nandCount() > ncomparisons which could useWhere().Take(n+1).Count()orSkip(n).Any()for better performance.
- OpenRewrite.Recipes.CodeQuality.Linq.FindWhereBeforeOrderBy
- Use Where before OrderBy
- Place
.Where()before.OrderBy()to filter elements before sorting. This reduces the number of items that need to be sorted.
- OpenRewrite.Recipes.CodeQuality.Linq.LinqCodeQuality
- LINQ code quality
- Optimize LINQ method calls for better readability and performance.
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqSelectAverage
- Optimize LINQ Select().Average()
- Replace
items.Select(selector).Average()withitems.Average(selector).
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqSelectMax
- Optimize LINQ Select().Max()
- Replace
items.Select(selector).Max()withitems.Max(selector). Passing the selector directly toMaxavoids an intermediate iterator.
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqSelectMin
- Optimize LINQ Select().Min()
- Replace
items.Select(selector).Min()withitems.Min(selector). Passing the selector directly toMinavoids an intermediate iterator.
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqSelectSum
- Optimize LINQ Select().Sum()
- Replace
items.Select(selector).Sum()withitems.Sum(selector).
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereAny
- Optimize LINQ Where().Any()
- Replace
items.Where(predicate).Any()withitems.Any(predicate). Passing the predicate directly toAnyavoids an intermediate iterator.
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereCount
- Optimize LINQ Where().Count()
- Replace
items.Where(predicate).Count()withitems.Count(predicate). Passing the predicate directly toCountavoids an intermediate iterator.
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereCountLong
- Optimize LINQ Where().LongCount()
- Replace
.Where(predicate).LongCount()with.LongCount(predicate).
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereFirst
- Optimize LINQ Where().First()
- Replace
items.Where(predicate).First()withitems.First(predicate).
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereFirstOrDefault
- Optimize LINQ Where().FirstOrDefault()
- Replace
items.Where(predicate).FirstOrDefault()withitems.FirstOrDefault(predicate).
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereLast
- Optimize LINQ Where().Last()
- Replace
items.Where(predicate).Last()withitems.Last(predicate).
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereLastOrDefault
- Optimize LINQ Where().LastOrDefault()
- Replace
.Where(predicate).LastOrDefault()with.LastOrDefault(predicate).
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereSingle
- Optimize LINQ Where().Single()
- Replace
items.Where(predicate).Single()withitems.Single(predicate).
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereSingleOrDefault
- Optimize LINQ Where().SingleOrDefault()
- Replace
items.Where(predicate).SingleOrDefault()withitems.SingleOrDefault(predicate).
- OpenRewrite.Recipes.CodeQuality.Linq.RemoveUselessOrderBy
- Remove useless OrderBy call
- Replace
.OrderBy(a).OrderBy(b)with.OrderBy(b). A secondOrderBycompletely replaces the first sort, making the first call useless.
- OpenRewrite.Recipes.CodeQuality.Linq.UseAnyInsteadOfCount
- Use Any() instead of Count() > 0
- Replace
.Count() > 0with.Any().Any()short-circuits after the first match, whileCount()enumerates all elements.
- OpenRewrite.Recipes.CodeQuality.Linq.UseCastInsteadOfSelect
- Use Cast<T>() instead of Select with cast
- Replace
.Select(x => (T)x)with.Cast<T>(). TheCast<T>()method is more concise and clearly expresses the intent.
- OpenRewrite.Recipes.CodeQuality.Linq.UseOrderByDescendingThenByDescending
- Use OrderByDescending().ThenByDescending()
- Replace
.OrderByDescending(a).OrderByDescending(b)with.OrderByDescending(a).ThenByDescending(b).
- OpenRewrite.Recipes.CodeQuality.Linq.UseOrderByThenBy
- Use ThenBy instead of second OrderBy
- Replace
items.OrderBy(a).OrderBy(b)withitems.OrderBy(a).ThenBy(b). A secondOrderBydiscards the first sort;ThenBypreserves it as a secondary key.
- OpenRewrite.Recipes.CodeQuality.Linq.UseOrderByThenByDescending
- Use OrderBy().ThenByDescending()
- Replace
.OrderBy(a).OrderByDescending(b)with.OrderBy(a).ThenByDescending(b).
- OpenRewrite.Recipes.CodeQuality.Linq.UseOrderInsteadOfOrderBy
- Use Order() instead of OrderBy() with identity
- Replace
.OrderBy(x => x)with.Order(). TheOrder()method (available since .NET 7) is a cleaner way to sort elements in their natural order.
- OpenRewrite.Recipes.CodeQuality.Naming.AsyncMethodNameShouldEndWithAsync
- Async method name should end with Async
- Rename async methods to end with 'Async' suffix.
- OpenRewrite.Recipes.CodeQuality.Naming.FindAttributeNameShouldEndWithAttribute
- Attribute name should end with 'Attribute'
- Classes that inherit from
System.Attributeshould have names ending with 'Attribute' by convention.
- OpenRewrite.Recipes.CodeQuality.Naming.FindEventArgsNameConvention
- EventArgs name should end with 'EventArgs'
- Classes that inherit from
System.EventArgsshould have names ending with 'EventArgs' by convention.
- OpenRewrite.Recipes.CodeQuality.Naming.FindExceptionNameShouldEndWithException
- Exception name should end with 'Exception'
- Classes that inherit from
System.Exceptionshould have names ending with 'Exception' by convention.
- OpenRewrite.Recipes.CodeQuality.Naming.FindFixTodoComment
- Find TODO/HACK/FIXME comments
- Detect TODO, HACK, UNDONE, and FIXME comments that indicate unfinished work.
- OpenRewrite.Recipes.CodeQuality.Naming.NamingCodeQuality
- Naming code quality
- Naming convention recipes for C# code.
- OpenRewrite.Recipes.CodeQuality.Naming.NonAsyncMethodNameShouldNotEndWithAsync
- Non-async method should not end with Async
- Remove 'Async' suffix from non-async methods.
- OpenRewrite.Recipes.CodeQuality.Naming.ParameterNameMatchesBase
- Parameter name should match base definition
- Ensure parameter names match the names used in base class or interface.
- OpenRewrite.Recipes.CodeQuality.Naming.RenameParameterAccordingToConvention
- Rename parameter to camelCase
- Detect parameters not following camelCase naming convention.
- OpenRewrite.Recipes.CodeQuality.Naming.RenamePrivateFieldAccordingToConvention
- Rename private field according to _camelCase convention
- Detect private fields not following _camelCase naming convention.
- OpenRewrite.Recipes.CodeQuality.Naming.UseNameofOperator
- Use nameof operator
- Use nameof(parameter) instead of string literal for argument exception constructors.
- OpenRewrite.Recipes.CodeQuality.Performance.AvoidBoxingOfValueType
- Avoid boxing of value type
- Avoid boxing of value type by using generic overloads or ToString().
- OpenRewrite.Recipes.CodeQuality.Performance.AvoidLockingOnPubliclyAccessible
- Avoid locking on publicly accessible instance
- Avoid lock(this), lock(typeof(T)), or lock on string literals which can cause deadlocks.
- OpenRewrite.Recipes.CodeQuality.Performance.AvoidNullReferenceException
- Avoid NullReferenceException
- Flag patterns that may throw NullReferenceException, such as using 'as' cast result without null check.
- OpenRewrite.Recipes.CodeQuality.Performance.BitOperationOnEnumWithoutFlags
- Bitwise operation on enum without Flags attribute
- Flag bitwise operations on enums that lack the Flags attribute.
- OpenRewrite.Recipes.CodeQuality.Performance.ConvertHasFlagToBitwiseOperation
- Convert HasFlag to bitwise operation
- Replace flags.HasFlag(value) with (flags & value) != 0.
- OpenRewrite.Recipes.CodeQuality.Performance.DoNotPassNonReadOnlyStructByReadOnlyRef
- Do not pass non-read-only struct by read-only reference
- Remove 'in' modifier from parameters of non-readonly struct type to avoid defensive copies.
- OpenRewrite.Recipes.CodeQuality.Performance.FindAsyncVoid
- Do not use async void
- Async void methods cannot be awaited and exceptions cannot be caught. Use
async Taskinstead, except for event handlers.
- OpenRewrite.Recipes.CodeQuality.Performance.FindAvoidClosureByUsingFactoryArg
- Find closure in GetOrAdd that could use factory argument
- Detect
ConcurrentDictionary.GetOrAddcalls with lambdas that capture variables. Use the overload with a factory argument parameter to avoid allocation.
- OpenRewrite.Recipes.CodeQuality.Performance.FindAvoidClosureInConcurrentDictionary
- Avoid closure when using ConcurrentDictionary
- ConcurrentDictionary methods like
GetOrAddmay evaluate the factory even when the key exists. Use the overload with a factory argument to avoid closure allocation.
- OpenRewrite.Recipes.CodeQuality.Performance.FindAvoidClosureInMethod
- Find closure in GetOrAdd/AddOrUpdate factory
- Detect closures in lambdas passed to
GetOrAddorAddOrUpdate. Use the factory overload that accepts a state argument to avoid allocations.
- OpenRewrite.Recipes.CodeQuality.Performance.FindBlockingCallsInAsync
- Find blocking calls in async methods
- Detect
.Wait(),.Result, and.GetAwaiter().GetResult()calls in async methods. Blocking calls in async methods can cause deadlocks.
- OpenRewrite.Recipes.CodeQuality.Performance.FindDoNotUseBlockingCall
- Do not use blocking calls on tasks
- Avoid
.Wait(),.Result, and.GetAwaiter().GetResult()on tasks. These can cause deadlocks. Useawaitinstead.
- OpenRewrite.Recipes.CodeQuality.Performance.FindDoNotUseToStringIfObject
- Do not use ToString on GetType result
- Using
.GetType().ToString()returns the full type name. Consider using.GetType().Nameor.GetType().FullNameinstead for clarity.
- OpenRewrite.Recipes.CodeQuality.Performance.FindEqualityComparerDefaultOfString
- Find EqualityComparer<string>.Default usage
- Detect
EqualityComparer<string>.Defaultwhich uses ordinal comparison. Consider using an explicitStringComparerinstead.
- OpenRewrite.Recipes.CodeQuality.Performance.FindGetTypeOnSystemType
- Find GetType() called on System.Type
- Detect
typeof(T).GetType()which returnsSystem.RuntimeTypeinstead of the expectedSystem.Type. Usetypeof(T)directly.
- OpenRewrite.Recipes.CodeQuality.Performance.FindImplicitCultureSensitiveMethods
- Find implicit culture-sensitive string methods
- Detect calls to
ToLower()andToUpper()without culture parameters. These methods use the current thread culture, which may cause unexpected behavior.
- OpenRewrite.Recipes.CodeQuality.Performance.FindImplicitCultureSensitiveToString
- Find implicit culture-sensitive ToString calls
- Detect
.ToString()calls without format arguments. On numeric and DateTime types, these use the current thread culture.
- OpenRewrite.Recipes.CodeQuality.Performance.FindLinqOnDirectMethods
- Find LINQ methods replaceable with direct methods
- Detect LINQ methods like
.Count()that could be replaced with direct collection properties. Direct access avoids enumeration overhead.
- OpenRewrite.Recipes.CodeQuality.Performance.FindMakeMethodStatic
- Find methods that could be static
- Detect private methods that don't appear to use instance members and could be marked
staticfor clarity and performance.
- OpenRewrite.Recipes.CodeQuality.Performance.FindMissingCancellationToken
- Find methods not forwarding CancellationToken
- Detect calls to async methods that may have CancellationToken overloads but are called without one. Uses name-based heuristics.
- OpenRewrite.Recipes.CodeQuality.Performance.FindMissingStructLayout
- Find structs without StructLayout attribute
- Detect struct declarations without
[StructLayout]attribute. Adding[StructLayout(LayoutKind.Auto)]allows the CLR to optimize field layout for better memory usage.
- OpenRewrite.Recipes.CodeQuality.Performance.FindMissingTimeoutForRegex
- Add timeout to Regex
- Regex without a timeout can be vulnerable to ReDoS attacks. Specify a
TimeSpantimeout or useRegexOptions.NonBacktracking.
- OpenRewrite.Recipes.CodeQuality.Performance.FindMissingWithCancellation
- Find missing WithCancellation on async enumerables
- Detect async enumerable iteration without
.WithCancellation(). Async enumerables should forward CancellationToken via WithCancellation.
- OpenRewrite.Recipes.CodeQuality.Performance.FindNaNComparison
- Do not use NaN in comparisons
- Comparing with
NaNusing==always returns false. Usedouble.IsNaN(x)instead.
- OpenRewrite.Recipes.CodeQuality.Performance.FindOptimizeEnumerableCountVsAny
- Find LINQ Count() on materialized collection
- Detect LINQ
Count()orAny()on types that have aCountorLengthproperty. Use the property directly for O(1) performance.
- OpenRewrite.Recipes.CodeQuality.Performance.FindOptimizeGuidCreation
- Find Guid.Parse with constant string
- Detect
Guid.Parse("...")with constant strings. Consider usingnew Guid("...")or a static readonly field for better performance.
- OpenRewrite.Recipes.CodeQuality.Performance.FindOptimizeStartsWith
- Use char overload for single-character string methods
- Convert string methods with single-character string literals to use char overloads for better performance.
- OpenRewrite.Recipes.CodeQuality.Performance.FindSequenceEqualForSpan
- Find Span<char> equality that should use SequenceEqual
- Detect
==and!=operators onSpan<char>orReadOnlySpan<char>which compare references. UseSequenceEqualfor content comparison.
- OpenRewrite.Recipes.CodeQuality.Performance.FindSimplifyStringCreate
- Find simplifiable string.Create calls
- Detect
string.Create(CultureInfo.InvariantCulture, ...)calls that could be simplified to string interpolation when all parameters are culture-invariant.
- OpenRewrite.Recipes.CodeQuality.Performance.FindStreamReadResultNotUsed
- Find unused Stream.Read return value
- Detect calls to
Stream.ReadorStream.ReadAsyncwhere the return value is discarded. The return value indicates how many bytes were actually read.
- OpenRewrite.Recipes.CodeQuality.Performance.FindStringCreateInsteadOfFormattable
- Find FormattableString that could use string.Create
- Detect
FormattableStringusage wherestring.Createwith anIFormatProvidercould be used for better performance.
- OpenRewrite.Recipes.CodeQuality.Performance.FindStringFormatShouldBeConstant
- String.Format format string should be constant
- The format string passed to
string.Formatshould be a compile-time constant to enable analysis and avoid runtime format errors.
- OpenRewrite.Recipes.CodeQuality.Performance.FindStringGetHashCode
- Find string.GetHashCode() without StringComparer
- Detect calls to
string.GetHashCode()without aStringComparer. The defaultGetHashCode()may produce different results across platforms.
- OpenRewrite.Recipes.CodeQuality.Performance.FindStructWithDefaultEqualsAsKey
- Find Dictionary/HashSet with struct key type
- Detect
DictionaryorHashSetusage with struct types as keys. Structs without overriddenEquals/GetHashCodeuse slow reflection-based comparison.
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseAttributeIsDefined
- Find GetCustomAttributes that could use Attribute.IsDefined
- Detect
GetCustomAttributes().Any()or similar patterns whereAttribute.IsDefinedwould be more efficient.
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseContainsKeyInsteadOfTryGetValue
- Use ContainsKey instead of TryGetValue with discard
- When only checking if a key exists, use
ContainsKeyinstead ofTryGetValuewith a discarded out parameter.
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseExplicitCaptureRegexOption
- Use RegexOptions.ExplicitCapture
- Use
RegexOptions.ExplicitCaptureto avoid capturing unnamed groups, which improves performance.
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseIndexerInsteadOfLinq
- Find LINQ methods replaceable with indexer
- Detect LINQ methods like
.First()and.Last()that could be replaced with direct indexer access for better performance.
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseRegexSourceGenerator
- Find Regex that could use source generator
- Detect
new Regex(...)calls that could benefit from the[GeneratedRegex]source generator attribute for better performance (.NET 7+).
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseTimeProviderOverload
- Find calls that could use TimeProvider
- Detect
DateTime.UtcNow,DateTimeOffset.UtcNow, andTask.Delaycalls that could use aTimeProviderparameter for better testability (.NET 8+).
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseValuesContainsInsteadOfValues
- Find Values.Contains() instead of ContainsValue()
- Detect
.Values.Contains(value)on dictionaries. Use.ContainsValue(value)instead.
- OpenRewrite.Recipes.CodeQuality.Performance.MakeParameterRefReadOnly
- Make parameter ref read-only
- Use in parameter modifier for large struct parameters.
- OpenRewrite.Recipes.CodeQuality.Performance.OptimizeMethodCall
- Optimize method call
- Replace inefficient method calls with more optimal equivalents.
- OpenRewrite.Recipes.CodeQuality.Performance.OptimizeStringBuilderAppend
- Optimize StringBuilder.Append usage
- Optimize StringBuilder method calls: use char overloads for single-character strings, remove redundant ToString() calls, replace string.Format with AppendFormat, and split string concatenation into chained Append calls.
- OpenRewrite.Recipes.CodeQuality.Performance.PerformanceCodeQuality
- Performance code quality
- Performance optimization recipes for C# code.
- OpenRewrite.Recipes.CodeQuality.Performance.ReplaceEnumToStringWithNameof
- Replace Enum.ToString() with nameof
- Replace
MyEnum.Value.ToString()withnameof(MyEnum.Value). Thenameofoperator is evaluated at compile time, avoiding runtime reflection.
- OpenRewrite.Recipes.CodeQuality.Performance.ReturnCompletedTask
- Return completed task instead of null
- Replace return null in Task-returning methods with return Task.CompletedTask.
- OpenRewrite.Recipes.CodeQuality.Performance.ThrowingNotImplementedException
- Throwing of new NotImplementedException
- Find code that throws new NotImplementedException, which may indicate unfinished implementation.
- OpenRewrite.Recipes.CodeQuality.Performance.UnnecessaryExplicitEnumerator
- Remove unnecessary explicit enumerator
- Use foreach instead of explicit enumerator pattern.
- OpenRewrite.Recipes.CodeQuality.Performance.UseArrayEmpty
- Use Array.Empty<T>() instead of new T[0]
- Use Array.Empty<T>() instead of allocating empty arrays.
- OpenRewrite.Recipes.CodeQuality.Performance.UseContainsKey
- Use ContainsKey instead of Keys.Contains
- Replace
.Keys.Contains(key)with.ContainsKey(key)on dictionaries for O(1) performance.
- OpenRewrite.Recipes.CodeQuality.Performance.UseCountProperty
- Use Count/Length property instead of Count()
- Replace collection.Count() with collection.Count when available.
- OpenRewrite.Recipes.CodeQuality.Performance.UseRegexIsMatch
- Use Regex.IsMatch
- Replace Regex.Match(s, p).Success with Regex.IsMatch(s, p).
- OpenRewrite.Recipes.CodeQuality.Performance.UseStringBuilderAppendLine
- Use StringBuilder.AppendLine
- Replace
sb.Append("\n")withsb.AppendLine().
- OpenRewrite.Recipes.CodeQuality.Performance.UseStringComparison
- Use StringComparison
- Replace case-insensitive string comparisons using
ToLower()/ToUpper()with overloads that acceptStringComparison.OrdinalIgnoreCase.
- OpenRewrite.Recipes.CodeQuality.Performance.UseStringConcatInsteadOfJoin
- Use string.Concat instead of string.Join
- Replace
string.Join("", args)withstring.Concat(args).
- OpenRewrite.Recipes.CodeQuality.Redundancy.FileContainsNoCode
- File contains no code
- Find files that contain no code, only using directives, comments, or whitespace.
- OpenRewrite.Recipes.CodeQuality.Redundancy.FindUnusedInternalType
- Find internal types that may be unused
- Detect
internal(non-public) classes that may be unused. Review these types and remove them if they are no longer needed.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RedundancyCodeQuality
- Redundancy code quality
- Remove redundant code from C# sources.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveArgumentListFromAttribute
- Remove argument list from attribute
- Remove empty argument list from attribute.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveBracesFromRecordDeclaration
- Remove braces from record declaration
- Remove unnecessary braces from record declarations with no body.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveEmptyCatchClause
- Remove empty catch clause
- Remove empty catch clauses that silently swallow exceptions without any logging or handling.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveEmptyDestructor
- Remove empty destructor
- Remove destructors (finalizers) with empty bodies.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveEmptyFinallyClause
- Remove empty finally clause
- Remove
finally \{ \}clauses that contain no statements. An empty finally block serves no purpose.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveEmptyForBody
- Flag empty for loop body
- Flag
forloops with empty bodies as potential dead code.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveEmptyForEachBody
- Remove empty foreach body
- Remove
foreachloops with empty bodies, which iterate without effect.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveEmptySyntax
- Remove empty syntax
- Remove empty namespace, class, struct, interface, and enum declarations.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveEmptyWhileBody
- Remove empty while body
- Remove
while (cond) \{ \}loops with empty bodies as they serve no purpose.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveEnumDefaultUnderlyingType
- Remove enum default underlying type
- Remove : int from enum declaration since int is the default.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveExplicitClassFromRecord
- Remove explicit 'class' from record
- Remove the redundant
classkeyword fromrecord classdeclarations. Records are reference types by default.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemovePartialModifierFromSinglePart
- Remove partial modifier from single-part type
- Remove
partialmodifier from types that have only one part.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantAsOperator
- Remove redundant as operator
- Remove redundant 'as' operator when the expression already has the target type.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantAssignment
- Remove redundant assignment
- Remove assignments where the value is immediately returned.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantAsyncAwait
- Remove redundant async/await
- Remove redundant async/await when a Task can be returned directly.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantAutoPropertyInit
- Remove redundant constructor
- Remove empty parameterless constructors that duplicate the implicit default.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantAutoPropertyInitialization
- Remove redundant auto-property initialization
- Remove auto-property initializers that assign the default value.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantBaseConstructorCall
- Remove redundant base constructor call
- Remove
: base()parameterless base constructor call since it's implicit.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantBaseInterface
- Remove redundant base interface
- Remove interface that is already inherited by another implemented interface.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantCast
- Remove redundant cast
- Remove unnecessary casts when the expression already has the target type.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantCatchBlock
- Remove redundant catch block
- Remove try-catch blocks where every catch clause only rethrows the exception.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantComma
- Remove redundant comma
- Remove redundant trailing comma in enum declarations.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantDefaultFieldInitialization
- Remove redundant default field initialization
- Remove field initializations that assign the default value (e.g.,
int x = 0,bool b = false,string s = null,object o = default).
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantDefaultSwitchSection
- Remove redundant default switch section
- Remove default switch section that only contains break.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantDelegateCreation
- Remove redundant delegate creation
- Remove unnecessary
new EventHandler(M)whenMcan be used directly.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantDisposeOrClose
- Remove redundant Dispose/Close call
- Remove Dispose/Close calls on objects already in a using block.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantOverridingMember
- Remove redundant overriding member
- Remove overriding member that only calls the base implementation.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantParentheses
- Remove redundant parentheses
- Remove unnecessary parentheses around expressions in return statements and assignments.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantRegion
- Remove redundant region
- Remove #region/#endregion directives.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantSealedModifier
- Remove redundant sealed modifier
- Remove
sealedmodifier on members of sealed classes, since it's redundant.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantSealedModifierFromOverride
- Remove redundant 'sealed' modifier from override
- Remove redundant 'sealed' modifier from an overriding member in a sealed class.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantStatement
- Remove redundant statement
- Remove redundant
return;at end of void method orcontinue;at end of loop body.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantStringToCharArrayCall
- Remove redundant ToCharArray() call
- Remove
ToCharArray()calls in foreach loops where iterating over the string directly produces the same result.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveRedundantToStringCall
- Remove redundant ToString() call
- Remove
ToString()calls on expressions that are already strings.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveUnnecessaryCaseLabel
- Remove unnecessary case label
- Remove case labels from switch section that has default label.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveUnnecessaryElse
- Remove unnecessary else clause
- Remove
elseclause when theifbody always terminates withreturn,throw,break,continue, orgoto.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveUnnecessarySemicolon
- Remove unnecessary semicolon at end of declaration
- Remove unnecessary semicolon at the end of a declaration.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveUnusedDocCommentElement
- Unused element in documentation comment
- Remove unused param/typeparam elements from XML documentation.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveUnusedMemberDeclaration
- Remove unused member declaration
- Remove member declarations that are never referenced.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveUnusedThisParameter
- Unused 'this' parameter
- Remove unused 'this' parameter from extension methods.
- OpenRewrite.Recipes.CodeQuality.Redundancy.ResourceCanBeDisposedAsynchronously
- Resource can be disposed asynchronously
- Use
await usinginstead ofusingwhen the resource implements IAsyncDisposable.
- OpenRewrite.Recipes.CodeQuality.Redundancy.UnnecessaryEnumFlag
- Unnecessary enum flag
- Remove unnecessary enum flag value that is a combination of other flags.
- OpenRewrite.Recipes.CodeQuality.Redundancy.UnnecessaryInterpolatedString
- Remove unnecessary interpolated string
- Replace interpolated strings with no interpolations with regular strings.
- OpenRewrite.Recipes.CodeQuality.Redundancy.UnnecessaryInterpolation
- Unnecessary interpolation
- Remove unnecessary string interpolation, for example simplifying
$"\{x\}"tox.ToString().
- OpenRewrite.Recipes.CodeQuality.Redundancy.UnnecessaryNullCheck
- Remove unnecessary null check
- Remove null check that is unnecessary because the value is known to be non-null.
- OpenRewrite.Recipes.CodeQuality.Redundancy.UnnecessaryNullForgivingOperator
- Remove unnecessary null-forgiving operator
- Remove ! operator where expression is already non-nullable.
- OpenRewrite.Recipes.CodeQuality.Redundancy.UnnecessaryRawStringLiteral
- Remove unnecessary raw string literal
- Convert raw string literal to regular string when not needed.
- OpenRewrite.Recipes.CodeQuality.Redundancy.UnnecessaryUnsafeContext
- Remove unnecessary unsafe context
- Remove unsafe blocks that do not contain unsafe code.
- OpenRewrite.Recipes.CodeQuality.Redundancy.UnnecessaryVerbatimStringLiteral
- Remove unnecessary verbatim string literal
- Remove @ prefix from string literals that do not contain escape sequences.
- OpenRewrite.Recipes.CodeQuality.Redundancy.UseRethrow
- Use rethrow instead of throw ex
- Replace
throw ex;withthrow;inside catch clauses whenexis the caught exception variable. A barethrowpreserves the original stack trace.
- OpenRewrite.Recipes.CodeQuality.Simplification.CombineWhereMethodChain
- Combine 'Enumerable.Where' method chain
- Combine consecutive Enumerable.Where method calls into a single call with a combined predicate.
- OpenRewrite.Recipes.CodeQuality.Simplification.ConvertAnonymousMethodToLambda
- Convert anonymous method to lambda
- Convert anonymous method delegate syntax to lambda expression.
- OpenRewrite.Recipes.CodeQuality.Simplification.ConvertIfToAssignment
- Convert 'if' to assignment
- Convert 'if' statement that assigns boolean literals to a simple assignment with the condition expression.
- OpenRewrite.Recipes.CodeQuality.Simplification.ConvertInterpolatedStringToConcatenation
- Convert interpolated string to concatenation
- Detect string interpolations that could be simplified to concatenation.
- OpenRewrite.Recipes.CodeQuality.Simplification.ExpressionAlwaysTrueOrFalse
- Expression is always true or false
- Simplify
x == xtotrueandx != xtofalse.
- OpenRewrite.Recipes.CodeQuality.Simplification.InlineLazyInitialization
- Inline lazy initialization
- Use null-coalescing assignment (??=) for lazy initialization.
- OpenRewrite.Recipes.CodeQuality.Simplification.InlineLocalVariable
- Inline local variable
- Inline local variable that is assigned once and used once immediately.
- OpenRewrite.Recipes.CodeQuality.Simplification.JoinStringExpressions
- Join string expressions
- Join consecutive string literal concatenations into a single literal.
- OpenRewrite.Recipes.CodeQuality.Simplification.MergeElseWithNestedIf
- Merge else with nested if
- Merge
else \{ if (...) \{ \} \}intoelse if (...) \{ \}when the else block contains only a single if statement.
- OpenRewrite.Recipes.CodeQuality.Simplification.MergeIfWithParentIf
- Merge if with parent if
- Merge
if (a) \{ if (b) \{ ... \} \}intoif (a && b) \{ ... \}when the outer if body contains only a single nested if without else.
- OpenRewrite.Recipes.CodeQuality.Simplification.MergeSwitchSections
- Merge switch sections with equivalent content
- Merge switch case labels that have identical bodies.
- OpenRewrite.Recipes.CodeQuality.Simplification.RemoveRedundantBooleanLiteral
- Remove redundant boolean literal
- Remove redundant
== truecomparison from boolean expressions.
- OpenRewrite.Recipes.CodeQuality.Simplification.RemoveUnnecessaryBraces
- Remove unnecessary braces
- Remove braces from single-statement blocks where they are optional.
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplificationCodeQuality
- Simplification code quality
- Simplify expressions and patterns in C# code.
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyArgumentNullCheck
- Simplify argument null check
- Use ArgumentNullException.ThrowIfNull(arg) instead of manual null check.
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyBooleanComparison
- Simplify boolean comparison
- Simplify
true == xtox,false == xto!x,true != xto!x, andfalse != xtox.
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyCoalesceExpression
- Simplify coalesce expression
- Simplify x ?? x to x.
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyCodeBranching
- Simplify code branching
- Simplify code branching patterns such as empty if-else, while(true) with break, and trailing return/continue in if-else.
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyConditionalExpression
- Simplify conditional expression
- Simplify
cond ? true : falsetocondandcond ? false : trueto!cond.
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyDoWhileToWhile
- Simplify do-while(true) to while(true)
- Convert
do \{ ... \} while (true)towhile (true) \{ ... \}.
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyLazyInitialization
- Simplify lazy initialization
- Simplify lazy initialization using ??= operator.
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyLogicalNegation
- Simplify logical negation
- Simplify negated comparison expressions. For example,
!(x == y)becomesx != y.
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyNegatedIsNull
- Simplify negated is null pattern
- Simplify
!(x is null)tox is not nulland!(x is not null)tox is null.
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyNestedUsingStatement
- Simplify nested using statement
- Merge nested
usingstatements into a singleusingdeclaration.
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyNullableHasValue
- Simplify Nullable<T>.HasValue
- Replace
x.HasValuewithx != nulland!x.HasValuewithx == null.
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyNullableToShorthand
- Simplify Nullable<T> to T?
- Use T? shorthand instead of Nullable<T>.
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyNumericComparison
- Simplify numeric comparison
- Simplify
x - y > 0tox > y,x - y < 0tox < y,x - y >= 0tox >= y, andx - y <= 0tox <= y.
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplifyRedundantWhereWhere
- Merge consecutive Where calls
- Detect consecutive
.Where(p).Where(q)calls that could be merged.
- OpenRewrite.Recipes.CodeQuality.Simplification.UnconstrainedTypeParamNullCheck
- Unconstrained type parameter checked for null
- Find null checks on unconstrained type parameters, which may not be reference types.
- OpenRewrite.Recipes.CodeQuality.Simplification.UnnecessaryOperator
- Operator is unnecessary
- Remove unnecessary operators such as unary plus.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseAnonymousFunctionOrMethodGroup
- Use anonymous function or method group
- Convert a lambda expression to a method group where appropriate.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseCoalesceExpression
- Use coalesce expression
- Replace
x != null ? x : yandx == null ? y : xwithx ?? y.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseCoalesceExpressionInsteadOfIf
- Use coalesce expression instead of 'if'
- Replace
if (x == null) x = y;withx ??= y.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseCompoundAssignment
- Use compound assignment
- Replace
x = x op ywithx op= yfor arithmetic, bitwise, shift, and null-coalescing operators.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseConditionalAccess
- Use conditional access
- Transform null-check patterns to use conditional access (?.).
- OpenRewrite.Recipes.CodeQuality.Simplification.UseConditionalAccessInsteadOfIf
- Use conditional access instead of conditional expression
- Transform ternary null-check expressions to use conditional access (?.) with null-coalescing (??) where needed.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseConditionalExpressionForDeclaration
- Use conditional expression in declaration
- Convert
int x; if (cond) x = a; else x = b;toint x = cond ? a : b;.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseConditionalExpressionForReturn
- Use conditional return expression
- Convert
if (c) return a; return b;toreturn c ? a : b;.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseConditionalExpressionForThrow
- Use conditional throw expression
- Detect
if (x == null) throw ...patterns that could usex ?? throw ....
- OpenRewrite.Recipes.CodeQuality.Simplification.UseDateTimeOffsetUnixEpoch
- Use DateTimeOffset.UnixEpoch
- Replace
new DateTimeOffset(1970, 1, 1, 0, 0, 0, TimeSpan.Zero)withDateTimeOffset.UnixEpoch. Available since .NET 8,DateTimeOffset.UnixEpochis more readable.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseDateTimeUnixEpoch
- Use DateTime.UnixEpoch
- Replace
new DateTime(1970, 1, 1)withDateTime.UnixEpoch. Available since .NET 8,DateTime.UnixEpochis more readable and avoids magic numbers.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseDefaultLiteral
- Use default literal
- Simplify default(T) expressions to default. Note: in rare cases where the type cannot be inferred (e.g., overload resolution), manual review may be needed.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseExceptionFilter
- Use exception filter
- Detect catch blocks with if/throw pattern that could use a when clause.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseExpressionBodiedLambda
- Use expression-bodied lambda
- Convert block-body lambdas with a single statement to expression-body lambdas.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseForInsteadOfWhile
- Use for statement instead of while
- Convert while loops with counter to for loops.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseGuidEmpty
- Use Guid.Empty
- Replace
new Guid()withGuid.Empty. The staticGuid.Emptyfield avoids unnecessary allocations and clearly expresses intent.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseIsOperatorInsteadOfAs
- Use 'is' operator instead of 'as' operator
- Replace 'as' operator followed by null check with 'is' operator.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseIsPatternInsteadOfSequenceEqual
- Use 'is' pattern instead of SequenceEqual
- Replace
span.SequenceEqual("str")withspan is "str". Pattern matching with string constants is more concise for span comparisons.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseNotPattern
- Use 'not' pattern instead of negation
- Detect
!(x is Type)patterns that can usex is not Type.
- OpenRewrite.Recipes.CodeQuality.Simplification.UsePatternMatchingForEquality
- Use pattern matching for equality comparison
- Replace
x == constantwithx is constantfor improved readability using C# pattern matching.
- OpenRewrite.Recipes.CodeQuality.Simplification.UsePatternMatchingForInequality
- Use pattern matching for inequality comparison
- Replace
x != constantwithx is not constantfor improved readability using C# pattern matching.
- OpenRewrite.Recipes.CodeQuality.Simplification.UsePatternMatchingInsteadOfAs
- Use pattern matching instead of as
- Use pattern matching instead of as. Note: Needs type resolution.
- OpenRewrite.Recipes.CodeQuality.Simplification.UsePatternMatchingInsteadOfHasValue
- Use pattern matching instead of HasValue
- Replace
nullable.HasValuewithnullable is not null. Pattern matching is more idiomatic in modern C#. Note: this recipe uses name-based matching and may match non-Nullable types with aHasValueproperty.
- OpenRewrite.Recipes.CodeQuality.Simplification.UsePatternMatchingInsteadOfIs
- Use pattern matching instead of is
- Use pattern matching instead of is. Note: Needs type resolution.
- OpenRewrite.Recipes.CodeQuality.Simplification.UsePatternMatchingNullCheck
- Use pattern matching for null check
- Replace
x == nullwithx is nullandx != nullwithx is not null.
- OpenRewrite.Recipes.CodeQuality.Simplification.UsePostfixIncrement
- Use postfix increment/decrement
- Replace
x = x + 1withx++andx = x - 1withx--.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseRangeOperator
- Use range operator
- Detect Substring calls that could use C# 8 range syntax.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseShortCircuitOperator
- Use short-circuit operator
- Replace bitwise
&with&&and|with||in boolean contexts.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseStringEndsWith
- Use string.EndsWith
- Detect substring comparison patterns that could use EndsWith.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseStringEquals
- Use string.Equals instead of == for string comparison
- Replace
==string comparisons withstring.Equals(a, b, StringComparison.Ordinal)for explicit comparison semantics.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseStringInterpolation
- Use string interpolation instead of string.Format
- Replace simple
string.Format("\{0\}", x)calls with$"\{x\}".
- OpenRewrite.Recipes.CodeQuality.Simplification.UseStringInterpolationInsteadOfConcat
- Use string interpolation instead of concatenation
- Replace string.Concat with string interpolation.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseStringStartsWith
- Use string.StartsWith instead of IndexOf comparison
- Replace
s.IndexOf(x) == 0withs.StartsWith(x).
- OpenRewrite.Recipes.CodeQuality.Simplification.UseSwitchExpression
- Use switch expression
- Convert simple switch statements to switch expressions (C# 8+).
- OpenRewrite.Recipes.CodeQuality.Simplification.UseThrowExpression
- Use throw expression
- Convert null-check-then-throw patterns to throw expressions.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseTimeSpanZero
- Use TimeSpan.Zero
- Replace
new TimeSpan(0)andTimeSpan.FromX(0)withTimeSpan.Zero. The staticTimeSpan.Zerofield is more readable and avoids unnecessary object creation.
- OpenRewrite.Recipes.CodeQuality.Simplification.UseXorForBooleanInequality
- Use ^ operator for boolean inequality
- Replace a != b with a ^ b when both operands are boolean.
- OpenRewrite.Recipes.CodeQuality.Style.AbstractTypeShouldNotHavePublicConstructors
- Abstract type should not have public constructors
- Change public constructors of abstract types to protected.
- OpenRewrite.Recipes.CodeQuality.Style.AddParenthesesForClarity
- Add parentheses for clarity
- Add parentheses to expressions where operator precedence might be unclear to improve readability.
- OpenRewrite.Recipes.CodeQuality.Style.AddParenthesesToConditionalExpression
- Add parentheses to conditional expression condition
- Add or remove parentheses from the condition in a conditional operator.
- OpenRewrite.Recipes.CodeQuality.Style.AddRemoveTrailingComma
- Add trailing comma to last enum member
- Add trailing comma to the last member of enum declarations for cleaner diffs when adding new members.
- OpenRewrite.Recipes.CodeQuality.Style.AddStaticToMembersOfStaticClass
- Add static modifier to all members of static class
- Ensure all members of a static class are also declared static.
- OpenRewrite.Recipes.CodeQuality.Style.AddTrailingComma
- Add trailing comma
- Add trailing commas to multi-line initializers and enum declarations for cleaner diffs.
- OpenRewrite.Recipes.CodeQuality.Style.AvoidChainOfAssignments
- Avoid chain of assignments
- Flag chained assignment expressions like a = b = c = value.
- OpenRewrite.Recipes.CodeQuality.Style.AvoidNestingTernary
- Avoid nested ternary operator
- Replace nested ternary expressions with if/else chains for clarity.
- OpenRewrite.Recipes.CodeQuality.Style.CallExtensionMethodAsInstance
- Call extension method as instance method
- Use instance method syntax instead of static extension method call.
- OpenRewrite.Recipes.CodeQuality.Style.CompositeEnumContainsUndefinedFlag
- Composite enum value contains undefined flag
- Find composite enum values that contain a flag which is not defined in the enum type.
- OpenRewrite.Recipes.CodeQuality.Style.ConstantValuesOnRightSide
- Place constant values on right side of comparisons
- Move constant values (literals, null) from the left side of comparisons to the right side for consistency and readability.
- OpenRewrite.Recipes.CodeQuality.Style.ConvertCommentToDocComment
- Convert comment to documentation comment
- Convert single-line or multi-line comments above declarations to XML documentation comments.
- OpenRewrite.Recipes.CodeQuality.Style.DeclareEachAttributeSeparately
- Declare each attribute separately
- Declare each attribute in a separate attribute list.
- OpenRewrite.Recipes.CodeQuality.Style.DeclareEachTypeInSeparateFile
- Declare each type in separate file
- Declare each type in a separate file.
- OpenRewrite.Recipes.CodeQuality.Style.DeclareEachTypeSeparately
- Declare each type in separate file
- Flag files containing multiple top-level type declarations.
- OpenRewrite.Recipes.CodeQuality.Style.DeclareEnumMemberWithZeroValue
- Declare enum member with zero value
- Ensure [Flags] enums have a member explicitly assigned the value 0.
- OpenRewrite.Recipes.CodeQuality.Style.DeclareEnumValueAsCombination
- Declare enum value as combination of names
- Declare Flags enum values as combinations of named values.
- OpenRewrite.Recipes.CodeQuality.Style.DeclareUsingDirectiveOnTopLevel
- Declare using directive on top level
- Move using directives outside of namespace declarations to the top level of the file.
- OpenRewrite.Recipes.CodeQuality.Style.DefaultLabelShouldBeLast
- Default label should be last
- Move default label to the last position in switch statement.
- OpenRewrite.Recipes.CodeQuality.Style.DuplicateEnumValue
- Flag duplicate enum value
- Flag enum members that have the same underlying value.
- OpenRewrite.Recipes.CodeQuality.Style.DuplicateWordInComment
- Duplicate word in a comment
- Find and fix duplicate consecutive words in comments.
- OpenRewrite.Recipes.CodeQuality.Style.EnumShouldDeclareExplicitValues
- Enum should declare explicit values
- Add explicit values to enum members that do not have them.
- OpenRewrite.Recipes.CodeQuality.Style.FindArgumentExceptionParameterName
- ArgumentException should specify argument name
- When throwing
ArgumentExceptionor derived types, specify the parameter name usingnameof().
- OpenRewrite.Recipes.CodeQuality.Style.FindAsyncMethodReturnsNull
- Find async void method
- Detect
async voidmethods. Useasync Taskinstead so callers can await and exceptions propagate correctly.
- OpenRewrite.Recipes.CodeQuality.Style.FindAsyncVoidDelegate
- Find async void delegate
- Detect async lambdas used as delegates where the return type is void. Use
Func<Task>instead ofActionfor async delegates.
- OpenRewrite.Recipes.CodeQuality.Style.FindAvoidAnonymousDelegateForUnsubscribe
- Do not use anonymous delegates to unsubscribe from events
- Unsubscribing from events using anonymous delegates or lambdas has no effect because each lambda creates a new delegate instance.
- OpenRewrite.Recipes.CodeQuality.Style.FindAwaitTaskBeforeDisposing
- Find unawaited task return in using block
- Detect
returnof a Task inside ausingblock withoutawait. The resource may be disposed before the task completes.
- OpenRewrite.Recipes.CodeQuality.Style.FindBothConditionSidesIdentical
- Find binary expression with identical sides
- Detect binary expressions where both sides are identical, e.g.
x == xora && a. This is likely a copy-paste bug.
- OpenRewrite.Recipes.CodeQuality.Style.FindClassWithEqualsButNoIEquatable
- Find class with Equals(T) but no IEquatable<T>
- Detect classes that define
Equals(T)but do not implementIEquatable<T>. Implementing the interface ensures consistency and enables value-based equality.
- OpenRewrite.Recipes.CodeQuality.Style.FindCompareToWithoutIComparable
- Find CompareTo without IComparable
- Detect classes that provide a
CompareTomethod but do not implementIComparable<T>.
- OpenRewrite.Recipes.CodeQuality.Style.FindDangerousThreadingMethods
- Do not use dangerous threading methods
- Avoid
Thread.Abort(),Thread.Suspend(), andThread.Resume(). These methods are unreliable and can corrupt state.
- OpenRewrite.Recipes.CodeQuality.Style.FindDefaultParameterValueNeedsOptional
- Find [DefaultParameterValue] without [Optional]
- Detect parameters with
[DefaultParameterValue]that are missing[Optional]. Both attributes are needed for COM interop default parameter behavior.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotCallVirtualMethodInConstructor
- Find virtual method call in constructor
- Detect calls to virtual or abstract methods within constructors. Derived classes may not be fully initialized when these methods execute.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotCompareWithNaN
- Find comparison with NaN
- Detect comparisons with
NaNusing==or!=. Usedouble.IsNaN()orfloat.IsNaN()instead, asx == NaNis always false.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotCreateTypeWithBCLName
- Find type with BCL name
- Detect class declarations that use names from well-known BCL types like
Task,Action,String, which can cause confusion.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotDeclareStaticMembersOnGenericTypes
- Find static members on generic types
- Detect static members declared on generic types. Static members on generic types require specifying type arguments at the call site, reducing discoverability.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotOverwriteParameterValue
- Find overwritten parameter values
- Detect assignments to method parameters, which can mask the original argument and lead to confusion.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotPassNullForCancellationToken
- Find null passed for CancellationToken
- Detect
nullordefaultpassed forCancellationTokenparameters. UseCancellationToken.Noneinstead.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotRaiseApplicationException
- Do not raise ApplicationException
- Avoid throwing
ApplicationException. Use a more specific exception type.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotRaiseNotImplementedException
- Do not throw NotImplementedException
- Throwing
NotImplementedExceptionindicates incomplete implementation. Implement the functionality or throw a more specific exception.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotRaiseReservedExceptionType
- Do not raise reserved exception types
- Avoid throwing
Exception,SystemException, orApplicationException. Use more specific exception types.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotThrowFromFinalizer
- Find throw statements in finalizer
- Detect
throwstatements inside finalizer/destructor methods. Throwing from a finalizer can terminate the process.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotThrowFromFinallyBlock
- Do not throw from finally block
- Throwing from a
finallyblock can mask the original exception and make debugging difficult.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotUseCertificateValidationCallback
- Do not write custom certificate validation
- Custom certificate validation callbacks can introduce security vulnerabilities by accidentally accepting invalid certificates.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotUseEqualityComparerDefaultOfString
- Find EqualityComparer<string>.Default
- Detect
EqualityComparer<string>.Defaultwhich may use different comparison semantics across platforms. Use an explicitStringComparer.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotUseGetHashCodeForString
- Find GetType() on Type instance
- Detect
.GetType()called on an object that is already aSystem.Type. Usetypeof()directly.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotUseObjectToString
- Find ToString on object-typed parameter
- Detect
.ToString()calls onobject-typed parameters. The defaultobject.ToString()returns the type name, which is rarely the intended behavior.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotUseSleep
- Find Thread.Sleep usage
- Detect
Thread.Sleep()which blocks the thread. Useawait Task.Delay()in async contexts instead.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotUseStringGetHashCode
- Find string.GetHashCode() usage
- Detect
string.GetHashCode()which is not stable across runs. UseStringComparer.GetHashCode()orstring.GetHashCode(StringComparison)instead.
- OpenRewrite.Recipes.CodeQuality.Style.FindEmbedCaughtExceptionAsInner
- Embed caught exception as inner exception
- When rethrowing a different exception in a catch block, pass the original exception as the inner exception to preserve the stack trace.
- OpenRewrite.Recipes.CodeQuality.Style.FindEnumDefaultValueZero
- Find explicit zero initialization in enum
- Detect enum members explicitly initialized to
0. The default value of an enum is already0.
- OpenRewrite.Recipes.CodeQuality.Style.FindEqualsWithoutNotNullWhen
- Find Equals without [NotNullWhen(true)]
- Detect
Equals(object?)overrides that are missing[NotNullWhen(true)]on the parameter, which helps nullable analysis.
- OpenRewrite.Recipes.CodeQuality.Style.FindEventArgsSenderNotNull
- Find event raised with null EventArgs
- Detect event invocations that pass
nullfor EventArgs. UseEventArgs.Emptyinstead.
- OpenRewrite.Recipes.CodeQuality.Style.FindFlowCancellationTokenInAwaitForEach
- Find await foreach without CancellationToken
- Detect
await foreachloops that don't pass aCancellationTokenviaWithCancellation()when one is available in the enclosing method.
- OpenRewrite.Recipes.CodeQuality.Style.FindIComparableWithoutComparisonOperators
- Find IComparable without comparison operators
- Detect classes that implement
IComparable<T>but do not override comparison operators (<,>,<=,>=).
- OpenRewrite.Recipes.CodeQuality.Style.FindIComparableWithoutIEquatable
- Find IComparable<T> without IEquatable<T>
- Detect classes that implement
IComparable<T>but notIEquatable<T>. Both interfaces should be implemented together for consistent comparison semantics.
- OpenRewrite.Recipes.CodeQuality.Style.FindIEquatableWithoutEquals
- Find IEquatable<T> without Equals(object) override
- Detect classes that implement
IEquatable<T>but do not overrideEquals(object), which can lead to inconsistent equality behavior.
- OpenRewrite.Recipes.CodeQuality.Style.FindILoggerTypeMismatch
- Find ILogger<T> type parameter mismatch
- Detect
ILogger<T>fields or parameters whereTdoesn't match the containing type name.
- OpenRewrite.Recipes.CodeQuality.Style.FindIfElseBranchesIdentical
- Find if/else with identical branches
- Detect
if/elsestatements where both branches contain identical code. This is likely a copy-paste bug.
- OpenRewrite.Recipes.CodeQuality.Style.FindImplementNonGenericInterface
- Find missing non-generic interface implementation
- Detect types implementing
IComparable<T>withoutIComparable, orIEquatable<T>without proper Equals override.
- OpenRewrite.Recipes.CodeQuality.Style.FindImplicitCultureSensitiveToStringDirect
- Find implicit culture-sensitive ToString in concatenation
- Detect string concatenation with numeric types that implicitly call culture-sensitive
ToString(). Use an explicit format orCultureInfo.InvariantCulture.
- OpenRewrite.Recipes.CodeQuality.Style.FindImplicitDateTimeOffsetConversion
- Find implicit DateTime to DateTimeOffset conversion
- Detect implicit conversion from
DateTimetoDateTimeOffsetwhich uses the local time zone and can produce unexpected results.
- OpenRewrite.Recipes.CodeQuality.Style.FindInterpolatedStringWithoutParameters
- Find interpolated string without parameters
- Detect interpolated strings (
$"...") that contain no interpolation expressions. Use a regular string literal instead.
- OpenRewrite.Recipes.CodeQuality.Style.FindInvalidAttributeArgumentType
- Find potentially invalid attribute argument type
- Detect attribute arguments that use types not valid in attribute constructors (only primitives, string, Type, enums, and arrays of these are allowed).
- OpenRewrite.Recipes.CodeQuality.Style.FindMethodReturningIAsyncEnumerable
- Find IAsyncEnumerable method without Async suffix
- Detect methods returning
IAsyncEnumerable<T>that don't end withAsync.
- OpenRewrite.Recipes.CodeQuality.Style.FindMethodTooLong
- Find method that is too long
- Detect methods with more than 60 statements. Long methods are harder to understand and maintain.
- OpenRewrite.Recipes.CodeQuality.Style.FindMissingCancellationTokenOverload
- Find async call missing CancellationToken
- Detect async method calls that don't pass a
CancellationTokenwhen the enclosing method has one available as a parameter.
- OpenRewrite.Recipes.CodeQuality.Style.FindMissingNamedParameter
- Find boolean literal arguments without parameter name
- Detect method calls passing
trueorfalseliterals as arguments. Using named parameters improves readability.
- OpenRewrite.Recipes.CodeQuality.Style.FindMissingParamsInOverride
- Find override method missing params keyword
- Detect override methods that may be missing the
paramskeyword on array parameters that the base method declares asparams.
- OpenRewrite.Recipes.CodeQuality.Style.FindMissingStringComparison
- Find string method missing StringComparison
- Detect string methods like
Equals,Contains,StartsWith,EndsWithcalled without an explicitStringComparisonparameter.
- OpenRewrite.Recipes.CodeQuality.Style.FindMissingStringEqualityComparer
- Find missing string equality comparer
- Detect
Dictionary<string, T>andHashSet<string>created without an explicitStringComparer. Without a comparer, the default ordinal comparison is used.
- OpenRewrite.Recipes.CodeQuality.Style.FindMultiLineXmlComment
- Find multi-line XML doc comments
- Detect
/** */style XML documentation comments that could use the///single-line syntax for consistency.
- OpenRewrite.Recipes.CodeQuality.Style.FindNonConstantStaticFieldsVisible
- Non-constant static fields should not be visible
- Public static fields that are not
constorreadonlycan be modified by any code, breaking encapsulation. Make themreadonlyor use a property.
- OpenRewrite.Recipes.CodeQuality.Style.FindNonDeterministicEndOfLine
- Find non-deterministic end-of-line in strings
- Detect string literals containing
\nthat may behave differently across platforms. Consider usingEnvironment.NewLineinstead.
- OpenRewrite.Recipes.CodeQuality.Style.FindNonFlagsEnumWithFlagsAttribute
- Find non-flags enum with [Flags]
- Detect enums marked with
[Flags]whose values are not powers of two, indicating they are not truly flags enums.
- OpenRewrite.Recipes.CodeQuality.Style.FindNotNullIfNotNullAttribute
- Find missing NotNullIfNotNull attribute
- Detect methods with nullable return types depending on nullable parameters that lack
[NotNullIfNotNull]attribute.
- OpenRewrite.Recipes.CodeQuality.Style.FindObserveAsyncResult
- Find unobserved async call result
- Detect calls to async methods where the returned Task is not awaited, assigned, or otherwise observed. Unobserved tasks may silently swallow exceptions.
- OpenRewrite.Recipes.CodeQuality.Style.FindObsoleteWithoutMessage
- Obsolete attribute should include explanation
- The
[Obsolete]attribute should include a message explaining why the member is obsolete and what to use instead.
- OpenRewrite.Recipes.CodeQuality.Style.FindOverrideChangesParameterDefaults
- Find overrides that change parameter defaults
- Detect
overridemethods with default parameter values. Overrides should not change defaults from the base method as this causes confusing behavior depending on the reference type.
- OpenRewrite.Recipes.CodeQuality.Style.FindPreferCollectionAbstraction
- Find concrete collection in public API
- Detect public method parameters or return types that use concrete collection types like
List<T>instead ofIList<T>orIEnumerable<T>.
- OpenRewrite.Recipes.CodeQuality.Style.FindPrimaryConstructorReadonly
- Find reassigned primary constructor parameter
- Detect primary constructor parameters that are reassigned in the class body. Primary constructor parameters should be treated as readonly.
- OpenRewrite.Recipes.CodeQuality.Style.FindRawStringImplicitEndOfLine
- Find raw string with implicit end of line
- Detect raw string literals (
"""...""") that contain implicit end-of-line characters which may behave differently across platforms.
- OpenRewrite.Recipes.CodeQuality.Style.FindReadOnlyStructMembers
- Find struct member that could be readonly
- Detect struct methods and properties that don't modify state and could be marked
readonlyto prevent defensive copies.
- OpenRewrite.Recipes.CodeQuality.Style.FindRedundantArgumentValue
- Find redundant default argument values
- Detect named arguments that explicitly pass a default value. Removing them simplifies the call.
- OpenRewrite.Recipes.CodeQuality.Style.FindSenderNullForStaticEvents
- Find static event with non-null sender
- Detect static event invocations that pass
thisas the sender. Static events should usenullas the sender.
- OpenRewrite.Recipes.CodeQuality.Style.FindSingleLineXmlComment
- Find multi-line XML doc comment style
- Detect
/** ... */style XML doc comments. Use///single-line style instead for consistency.
- OpenRewrite.Recipes.CodeQuality.Style.FindSpanEqualityOperator
- Find equality operator on Span<T>
- Detect
==or!=operators onSpan<T>orReadOnlySpan<T>. UseSequenceEqualinstead.
- OpenRewrite.Recipes.CodeQuality.Style.FindStreamReadIgnored
- Find Stream.Read() return value ignored
- Detect
Stream.Read()calls where the return value (bytes read) is not used. This can lead to incomplete reads.
- OpenRewrite.Recipes.CodeQuality.Style.FindStringFormatConstant
- Find non-constant string.Format format string
- Detect non-constant format strings passed to
string.Format. Use a constant to prevent format string injection.
- OpenRewrite.Recipes.CodeQuality.Style.FindTaskInUsing
- Find unawaited task in using statement
- Detect
usingstatements where a Task is not awaited, which can cause premature disposal before the task completes.
- OpenRewrite.Recipes.CodeQuality.Style.FindThreadStaticOnInstanceField
- Do not use ThreadStatic on instance fields
[ThreadStatic]only works on static fields. Using it on instance fields has no effect.
- OpenRewrite.Recipes.CodeQuality.Style.FindThrowIfNullWithNonNullable
- Find ThrowIfNull with value type argument
- Detect
ArgumentNullException.ThrowIfNullcalled with value type parameters that can never be null.
- OpenRewrite.Recipes.CodeQuality.Style.FindTypeNameMatchesNamespace
- Find type name matching namespace
- Detect type names that match their containing namespace, which can cause ambiguous references.
- OpenRewrite.Recipes.CodeQuality.Style.FindTypeShouldNotExtendApplicationException
- Types should not extend ApplicationException
- Do not create custom exceptions that inherit from
ApplicationException. Inherit fromExceptionor a more specific exception type.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseCallerArgumentExpression
- Find redundant nameof with CallerArgumentExpression
- Detect
nameof(param)passed to parameters marked with[CallerArgumentExpression]. The attribute fills the value automatically.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseDateTimeOffsetInsteadOfDateTime
- Find DateTime.Now/UtcNow usage
- Detect
DateTime.NowandDateTime.UtcNowusage. UseDateTimeOffsetinstead for unambiguous time representation across time zones.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseDebuggerDisplayAttribute
- Find ToString override without DebuggerDisplay
- Detect classes that override
ToString()but lack[DebuggerDisplay]attribute for debugger integration.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseDefaultParameterValue
- Find [DefaultValue] on parameter
- Detect
[DefaultValue]on method parameters. Use[DefaultParameterValue]instead, as[DefaultValue]is for component model metadata only.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseElementAccessInsteadOfLinq
- Find ElementAt() that could use indexer
- Detect LINQ
.ElementAt(index)calls that could be replaced with direct indexer access[index].
- OpenRewrite.Recipes.CodeQuality.Style.FindUseEqualsMethodInsteadOfOperator
- Find == comparison that should use Equals()
- Detect
==comparisons on reference types that overrideEquals. Using==may compare references instead of values.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseExplicitEnumValue
- Find integer 0 used instead of named enum value
- Detect usage of integer literal
0where a named enum member should be used for clarity.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseFormatProviderInToString
- Find Parse/ToString without IFormatProvider
- Detect calls to culture-sensitive methods like
int.Parse,double.Parsewithout an explicitIFormatProviderorCultureInfo.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseIFormatProvider
- Find Parse/TryParse without IFormatProvider
- Detect
int.Parse(str)and similar calls without anIFormatProviderparameter. UseCultureInfo.InvariantCulturefor culture-independent parsing.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseLangwordInXmlComment
- Find missing langword in XML comment
- Detect XML doc comments that reference
null,true,falseas plain text instead of using<see langword="..."/>.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseLazyInitializerEnsureInitialize
- Find Interlocked.CompareExchange lazy init pattern
- Detect
Interlocked.CompareExchange(ref field, new T(), null)pattern. UseLazyInitializer.EnsureInitializedfor cleaner lazy initialization.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseListPatternMatching
- Find collection emptiness check
- Detect
.Length == 0or.Count == 0checks that could use list patterns likeis []in C# 11+.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseNamedParameter
- Find boolean literal argument without name
- Detect boolean literal arguments (
true/false) passed without named parameters. Named arguments improve readability.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseOperatingSystemMethods
- Use OperatingSystem methods instead of RuntimeInformation
- Use
OperatingSystem.IsWindows()and similar methods instead ofRuntimeInformation.IsOSPlatform(). The OperatingSystem methods are more concise and can be optimized by the JIT.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseProcessStartWithStartInfo
- Find Process.Start with string argument
- Detect
Process.Start("filename")which should use theProcessStartInfooverload for explicit control overUseShellExecuteand other settings.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseRecordClassExplicitly
- Find implicit record class declaration
- Detect
recorddeclarations that should userecord classexplicitly to clarify that they are reference types.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseRegexOptions
- Find Regex without ExplicitCapture option
- Detect
new Regex()orRegex.IsMatch()withoutRegexOptions.ExplicitCapture. Using this option avoids unnecessary unnamed captures.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseShellExecuteFalseWhenRedirecting
- Find redirect without UseShellExecute=false
- Detect
ProcessStartInfothat setsRedirectStandard*without explicitly settingUseShellExecute = false.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseShellExecuteNotSet
- Find ProcessStartInfo without UseShellExecute
- Detect
new ProcessStartInfo()without explicitly settingUseShellExecute. The default changed between .NET Framework (true) and .NET Core (false).
- OpenRewrite.Recipes.CodeQuality.Style.FindUseStringComparer
- Find Dictionary/HashSet without StringComparer
- Detect
Dictionary<string, T>orHashSet<string>created without an explicitStringComparer. UseStringComparer.OrdinalorStringComparer.OrdinalIgnoreCase.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseStringCreateInsteadOfConcat
- Find FormattableString usage
- Detect
FormattableStringusage. Consider usingString.Createon .NET 6+ for better performance.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseStringEqualsInsteadOfIsPattern
- Find 'is' pattern with string literal
- Detect
x is "literal"patterns that should usestring.Equalswith explicitStringComparisonfor culture-aware or case-insensitive comparisons.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseSystemThreadingLock
- Use System.Threading.Lock instead of object for locking
- In .NET 9+, use
System.Threading.Lockinstead ofobjectfor lock objects. The dedicated Lock type provides better performance.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseTaskUnwrap
- Find double await pattern
- Detect
await awaitpattern which can be replaced with.Unwrap()for clarity.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseTimeProviderInsteadOfCustom
- Find custom time abstraction
- Detect interfaces or abstract classes that appear to be custom time providers. Use
System.TimeProvider(available in .NET 8+) instead.
- OpenRewrite.Recipes.CodeQuality.Style.FindValidateArgumentsBeforeYield
- Find argument validation in iterator method
- Detect iterator methods that validate arguments after
yield return. Argument validation in iterators is deferred until enumeration begins.
- OpenRewrite.Recipes.CodeQuality.Style.ImplementExceptionConstructors
- Implement exception constructors
- Ensure custom exception classes implement standard constructors.
- OpenRewrite.Recipes.CodeQuality.Style.ImplementNonGenericCounterpart
- Implement non-generic counterpart
- Implement non-generic interface when implementing generic counterpart.
- OpenRewrite.Recipes.CodeQuality.Style.InvalidArgumentNullCheck
- Fix invalid argument null check
- Fix invalid argument null check patterns.
- OpenRewrite.Recipes.CodeQuality.Style.MakeClassSealed
- Make class sealed
- A class that has only private constructors should be marked as sealed.
- OpenRewrite.Recipes.CodeQuality.Style.MakeClassStatic
- Make class static
- Make classes that contain only static members static.
- OpenRewrite.Recipes.CodeQuality.Style.MakeFieldReadOnly
- Make field read-only
- Make field read-only when it is only assigned in the constructor or initializer.
- OpenRewrite.Recipes.CodeQuality.Style.MakeMethodExtensionMethod
- Make method an extension method
- Convert a static method to an extension method where appropriate.
- OpenRewrite.Recipes.CodeQuality.Style.MarkLocalVariableAsConst
- Mark local variable as const
- Mark local variable as const when its value never changes.
- OpenRewrite.Recipes.CodeQuality.Style.MarkTypeWithDebuggerDisplay
- Mark type with DebuggerDisplay attribute
- Add DebuggerDisplay attribute to publicly visible types to improve debugging experience.
- OpenRewrite.Recipes.CodeQuality.Style.MergePreprocessorDirectives
- Merge preprocessor directives
- Merge consecutive preprocessor directives that can be combined into a single directive.
- OpenRewrite.Recipes.CodeQuality.Style.NormalizeEnumFlagValue
- Normalize format of enum flag value
- Normalize the format of Flags enum values.
- OpenRewrite.Recipes.CodeQuality.Style.OrderModifiers
- Order modifiers
- Reorder modifiers to the canonical C# order: access, new, abstract/virtual/override/sealed, static, readonly, extern, unsafe, volatile, async, partial, const.
- OpenRewrite.Recipes.CodeQuality.Style.OrderNamedArguments
- Order named arguments by parameters
- Reorder named arguments to match parameter order.
- OpenRewrite.Recipes.CodeQuality.Style.OrderTypeParameterConstraints
- Order type parameter constraints
- Order type parameter constraints consistently.
- OpenRewrite.Recipes.CodeQuality.Style.OverridingMemberShouldNotChangeParams
- Overriding member should not change 'params' modifier
- An overriding member should not add or remove the 'params' modifier compared to its base declaration.
- OpenRewrite.Recipes.CodeQuality.Style.ParameterNameDiffersFromBase
- Parameter name differs from base
- Rename parameter to match base class or interface definition.
- OpenRewrite.Recipes.CodeQuality.Style.ParenthesizeNotPattern
- Parenthesize not pattern for clarity
- Add parentheses to
not A or B→(not A) or Bto clarify thatnotbinds tighter thanor.
- OpenRewrite.Recipes.CodeQuality.Style.PreferNullCheckOverTypeCheck
- Prefer null check over type check
- Replace
x is objectwithx is not nullfor clarity.
- OpenRewrite.Recipes.CodeQuality.Style.SimplifyBooleanLogic
- Simplify boolean logic with constants
- Simplify
x || truetotrue,x && falsetofalse,x || falsetox, andx && truetox.
- OpenRewrite.Recipes.CodeQuality.Style.SortEnumMembers
- Sort enum members
- Sort enum members by their resolved constant value.
- OpenRewrite.Recipes.CodeQuality.Style.SplitVariableDeclaration
- Split variable declaration
- Split multi-variable declarations into separate declarations.
- OpenRewrite.Recipes.CodeQuality.Style.StaticMemberInGenericType
- Static member in generic type should use a type parameter
- Find static members in generic types that do not use any of the type's type parameters.
- OpenRewrite.Recipes.CodeQuality.Style.StyleCodeQuality
- Style code quality
- Code style modernization recipes for C#.
- OpenRewrite.Recipes.CodeQuality.Style.UnusedParameter
- Remove unused parameter
- Rename unused lambda parameters to discard (_).
- OpenRewrite.Recipes.CodeQuality.Style.UnusedTypeParameter
- Remove unused type parameter
- Flag type parameters that are not used.
- OpenRewrite.Recipes.CodeQuality.Style.UseAsyncAwait
- Use async/await when necessary
- Add async/await to methods that return Task but don't use await.
- OpenRewrite.Recipes.CodeQuality.Style.UseAttributeUsageAttribute
- Use AttributeUsageAttribute
- Add AttributeUsage to custom attribute classes.
- OpenRewrite.Recipes.CodeQuality.Style.UseAutoProperty
- Use auto property
- Use auto property instead of property with backing field.
- OpenRewrite.Recipes.CodeQuality.Style.UseBlockBodyOrExpressionBody
- Use block body or expression body
- Convert between block body and expression body for members.
- OpenRewrite.Recipes.CodeQuality.Style.UseCoalesceExpressionFromNullCheck
- Use coalesce expression
- Convert null-check conditional to null-coalescing expression.
- OpenRewrite.Recipes.CodeQuality.Style.UseCollectionExpression
- Use collection expression
- Replace array/list creation with collection expressions (C# 12).
- OpenRewrite.Recipes.CodeQuality.Style.UseConstantInsteadOfField
- Use constant instead of field
- Convert
static readonlyfields with literal initializers toconst.
- OpenRewrite.Recipes.CodeQuality.Style.UseElementAccess
- Use element access
- Use indexer instead of First()/Last()/ElementAt() when the collection supports indexer access.
- OpenRewrite.Recipes.CodeQuality.Style.UseEnumFieldExplicitly
- Use enum field explicitly
- Use named enum field instead of cast integer value.
- OpenRewrite.Recipes.CodeQuality.Style.UseEventArgsEmpty
- Use EventArgs.Empty
- Replace
new EventArgs()withEventArgs.Empty. The staticEventArgs.Emptyfield avoids unnecessary allocations.
- OpenRewrite.Recipes.CodeQuality.Style.UseEventArgsEmptyForNull
- Use EventArgs.Empty instead of null
- Replace
nullwithEventArgs.Emptywhen raising events. Passingnullfor EventArgs can cause NullReferenceException in event handlers.
- OpenRewrite.Recipes.CodeQuality.Style.UseEventHandlerT
- Use EventHandler<T>
- Use generic EventHandler<T> instead of custom delegate types.
- OpenRewrite.Recipes.CodeQuality.Style.UseExplicitTypeInsteadOfVar
- Use explicit type instead of var
- Use explicit type instead of
varwhen the type is not evident.
- OpenRewrite.Recipes.CodeQuality.Style.UseExplicitlyTypedArray
- Use explicitly typed array
- Use explicitly or implicitly typed array.
- OpenRewrite.Recipes.CodeQuality.Style.UseFileScopedNamespace
- Use file-scoped namespace
- Detect block-scoped namespace declarations that could use file-scoped syntax (C# 10).
- OpenRewrite.Recipes.CodeQuality.Style.UseMethodChaining
- Use method chaining
- Chain consecutive method calls on the same receiver into a fluent chain.
- OpenRewrite.Recipes.CodeQuality.Style.UseMethodGroupConversion
- Use method group conversion
- Replace
x => Foo(x)withFoowhere method group conversion applies.
- OpenRewrite.Recipes.CodeQuality.Style.UsePredefinedType
- Use predefined type
- Use predefined type keyword (e.g., int instead of Int32).
- OpenRewrite.Recipes.CodeQuality.Style.UsePrimaryConstructor
- Use primary constructor
- Convert classes with a single constructor into primary constructor syntax (C# 12).
- OpenRewrite.Recipes.CodeQuality.Style.UseReadOnlyAutoProperty
- Use read-only auto property
- Use read-only auto property when the setter is never used.
- OpenRewrite.Recipes.CodeQuality.Style.UseStringContains
- Use string.Contains instead of IndexOf comparison
- Replace
s.IndexOf(x) >= 0withs.Contains(x)ands.IndexOf(x) == -1with!s.Contains(x).
- OpenRewrite.Recipes.CodeQuality.Style.UseStringIsNullOrEmpty
- Use string.IsNullOrEmpty method
- Replace
s == null || s == ""ands == null || s.Length == 0withstring.IsNullOrEmpty(s).
- OpenRewrite.Recipes.CodeQuality.Style.UseStringLengthComparison
- Use string.Length instead of comparison with empty string
- Replace
s == ""withs.Length == 0ands != ""withs.Length != 0.
- OpenRewrite.Recipes.CodeQuality.Style.UseThisForEventSender
- Use 'this' for event sender
- Replace
nullwiththisas the sender argument when raising instance events. The sender should be the object raising the event.
- OpenRewrite.Recipes.CodeQuality.Style.UseUsingDeclaration
- Use using declaration
- Convert using statement to using declaration.
- OpenRewrite.Recipes.CodeQuality.Style.UseVarInForEach
- Use var instead of explicit type in foreach
- Replace explicit type in foreach with var when type is evident.
- OpenRewrite.Recipes.CodeQuality.Style.UseVarOrExplicitType
- Use 'var' or explicit type
- Enforce consistent use of 'var' or explicit type in local variable declarations.
- OpenRewrite.Recipes.CodeQuality.Style.ValidateArgumentsCorrectly
- Validate arguments correctly
- Ensure argument validation in iterator methods runs immediately by flagging iterator methods that contain argument validation.
- OpenRewrite.Recipes.CodeQuality.Style.ValueTypeIsNeverEqualToNull
- Value type is never equal to null
- Replace null with default in comparisons of value types.
- OpenRewrite.Recipes.Net10.UpgradeToDotNet10
- Migrate to .NET 10
- Migrate C# projects to .NET 10, applying necessary API changes. Includes all .NET 9 (and earlier) migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/10.0.
- OpenRewrite.Recipes.Net3_0.UpgradeToDotNet3_0
- Migrate to .NET Core 3.0
- Migrate C# projects from .NET Core 2.x to .NET Core 3.0, applying necessary API changes for removed and replaced types. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/3.0.
- OpenRewrite.Recipes.Net3_0.UseApiControllerBase
- Migrate ApiController to ControllerBase
- Replace
ApiControllerbase class (from the removed WebApiCompatShim) withControllerBaseand add the[ApiController]attribute. The shim was removed in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_1.UpgradeToDotNet3_1
- Migrate to .NET Core 3.1
- Migrate C# projects from .NET Core 3.0 to .NET Core 3.1. Includes all .NET Core 3.0 migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/3.1.
- OpenRewrite.Recipes.Net5.UpgradeToDotNet5
- Migrate to .NET 5
- Migrate C# projects from .NET Core 3.1 to .NET 5.0. Includes all .NET Core 3.0 and 3.1 migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/5.0.
- OpenRewrite.Recipes.Net6.UpgradeToDotNet6
- Migrate to .NET 6
- Migrate C# projects to .NET 6, applying necessary API changes for obsoleted cryptographic types and other breaking changes. Includes all .NET Core 3.0, 3.1, and .NET 5 migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/6.0.
- OpenRewrite.Recipes.Net6.UseEnvironmentCurrentManagedThreadId
- Use Environment.CurrentManagedThreadId
- Replace
Thread.CurrentThread.ManagedThreadIdwithEnvironment.CurrentManagedThreadId(CA1840). Available since .NET 6.
- OpenRewrite.Recipes.Net6.UseEnvironmentProcessId
- Use Environment.ProcessId
- Replace
Process.GetCurrentProcess().IdwithEnvironment.ProcessId(CA1837). Available since .NET 6.
- OpenRewrite.Recipes.Net6.UseEnvironmentProcessPath
- Use Environment.ProcessPath
- Replace
Process.GetCurrentProcess().MainModule.FileNamewithEnvironment.ProcessPath(CA1839). Available since .NET 6.
- OpenRewrite.Recipes.Net6.UseLinqDistinctBy
- Use LINQ DistinctBy()
- Replace
collection.GroupBy(selector).Select(g => g.First())withcollection.DistinctBy(selector). Available since .NET 6.
- OpenRewrite.Recipes.Net6.UseLinqMaxMinBy
- Use LINQ MaxBy() and MinBy()
- Replace
collection.OrderByDescending(selector).First()withcollection.MaxBy(selector)andcollection.OrderBy(selector).First()withcollection.MinBy(selector). Also handles.Last()variants (OrderBy().Last() → MaxBy, OrderByDescending().Last() → MinBy). Note: MinBy/MaxBy return default for empty reference-type sequences instead of throwing. Available since .NET 6.
- OpenRewrite.Recipes.Net6.UseRandomShared
- Use Random.Shared
- Replace
new Random().Method(...)withRandom.Shared.Method(...). Available since .NET 6.
- OpenRewrite.Recipes.Net6.UseStringContainsChar
- Use string.Contains(char) overload
- Finds calls to
string.Contains("x")with a single-character string literal that could use thestring.Contains('x')overload for better performance.
- OpenRewrite.Recipes.Net6.UseStringStartsEndsWithChar
- Use string.StartsWith(char)/EndsWith(char) overload
- Finds calls to
string.StartsWith("x")andstring.EndsWith("x")with a single-character string literal that could use the char overload for better performance.
- OpenRewrite.Recipes.Net6.UseThrowIfNull
- Use ArgumentNullException.ThrowIfNull()
- Replace
if (x == null) throw new ArgumentNullException(nameof(x))guard clauses withArgumentNullException.ThrowIfNull(x)(CA1510). Handles== null,is null, reversednull ==, string literal param names, and braced then-blocks. Available since .NET 6.
- OpenRewrite.Recipes.Net7.UpgradeToDotNet7
- Migrate to .NET 7
- Migrate C# projects to .NET 7, applying necessary API changes. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/7.0.
- OpenRewrite.Recipes.Net7.UseLinqOrder
- Use LINQ Order() and OrderDescending()
- Replace
collection.OrderBy(x => x)withcollection.Order()andcollection.OrderByDescending(x => x)withcollection.OrderDescending(). Available since .NET 7.
- OpenRewrite.Recipes.Net7.UseThrowIfNegative
- Use ArgumentOutOfRangeException.ThrowIfNegative()
- Replace
if (value < 0) throw new ArgumentOutOfRangeException(nameof(value))guard clauses withArgumentOutOfRangeException.ThrowIfNegative(value). Also handles reversed0 > value. Available since .NET 7.
- OpenRewrite.Recipes.Net7.UseThrowIfNegativeOrZero
- Use ArgumentOutOfRangeException.ThrowIfNegativeOrZero()
- Replace
if (value <= 0) throw new ArgumentOutOfRangeException(nameof(value))guard clauses withArgumentOutOfRangeException.ThrowIfNegativeOrZero(value). Also handles reversed0 >= value. Available since .NET 7.
- OpenRewrite.Recipes.Net7.UseThrowIfNullOrEmpty
- Use ArgumentException.ThrowIfNullOrEmpty()
- Replace
if (string.IsNullOrEmpty(s)) throw new ArgumentException("...", nameof(s))guard clauses withArgumentException.ThrowIfNullOrEmpty(s). Available since .NET 7.
- OpenRewrite.Recipes.Net8.UpgradeToDotNet8
- Migrate to .NET 8
- Migrate C# projects to .NET 8, applying necessary API changes. Includes all .NET 7 migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/8.0.
- OpenRewrite.Recipes.Net8.UseThrowIfGreaterThan
- Use ArgumentOutOfRangeException.ThrowIfGreaterThan()
- Replace
if (value > other) throw new ArgumentOutOfRangeException(nameof(value))guard clauses withArgumentOutOfRangeException.ThrowIfGreaterThan(value, other). Also handles reversedother < valueand>=/ThrowIfGreaterThanOrEqual. Available since .NET 8.
- OpenRewrite.Recipes.Net8.UseThrowIfLessThan
- Use ArgumentOutOfRangeException.ThrowIfLessThan()
- Replace
if (value < other) throw new ArgumentOutOfRangeException(nameof(value))guard clauses withArgumentOutOfRangeException.ThrowIfLessThan(value, other). Also handles reversedother > valueand<=/ThrowIfLessThanOrEqual. Available since .NET 8.
- OpenRewrite.Recipes.Net8.UseThrowIfNullOrWhiteSpace
- Use ArgumentException.ThrowIfNullOrWhiteSpace()
- Replace
if (string.IsNullOrWhiteSpace(s)) throw new ArgumentException("...", nameof(s))guard clauses withArgumentException.ThrowIfNullOrWhiteSpace(s). Available since .NET 8.
- OpenRewrite.Recipes.Net8.UseThrowIfZero
- Use ArgumentOutOfRangeException.ThrowIfZero()
- Replace
if (value == 0) throw new ArgumentOutOfRangeException(nameof(value))guard clauses withArgumentOutOfRangeException.ThrowIfZero(value). Also handles reversed0 == value. Available since .NET 8.
- OpenRewrite.Recipes.Net8.UseTimeProvider
- Use TimeProvider instead of DateTime/DateTimeOffset static properties
- Replace
DateTime.UtcNow,DateTime.Now,DateTimeOffset.UtcNow, andDateTimeOffset.NowwithTimeProvider.System.GetUtcNow()/GetLocalNow()equivalents. TimeProvider enables testability and consistent time sources. Available since .NET 8.
- OpenRewrite.Recipes.Net9.MigrateSwashbuckleToOpenApi
- Migrate Swashbuckle to built-in OpenAPI
- Migrate from Swashbuckle to the built-in OpenAPI support in ASP.NET Core 9. Replaces
AddSwaggerGen()withAddOpenApi(),UseSwaggerUI()withMapOpenApi(), removesUseSwagger(), removes Swashbuckle packages, and addsMicrosoft.AspNetCore.OpenApi.
- OpenRewrite.Recipes.Net9.RemoveConfigureAwaitFalse
- Remove ConfigureAwait(false)
- Remove
.ConfigureAwait(false)calls that are unnecessary in ASP.NET Core and modern .NET applications (no SynchronizationContext). Do not apply to library code targeting .NET Framework.
- OpenRewrite.Recipes.Net9.UpgradeToDotNet9
- Migrate to .NET 9
- Migrate C# projects to .NET 9, applying necessary API changes. Includes all .NET 7 and .NET 8 migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/9.0.
- OpenRewrite.Recipes.Net9.UseEscapeSequenceE
- Use \e escape sequence
- Replace
\u001band\x1bescape sequences with\e. C# 13 introduced\eas a dedicated escape sequence for the escape character (U+001B).
- OpenRewrite.Recipes.Net9.UseFrozenCollections
- Use Frozen collections instead of Immutable
- Replace
ToImmutableDictionary()withToFrozenDictionary()andToImmutableHashSet()withToFrozenSet(). Frozen collections (.NET 8+) provide better read performance for collections populated once and read many times.
- OpenRewrite.Recipes.Net9.UseGuidCreateVersion7
- Use Guid.CreateVersion7()
- Replace
Guid.NewGuid()withGuid.CreateVersion7(). Version 7 GUIDs are time-ordered and better for database primary keys, indexing, and sorting. Available since .NET 9.
- OpenRewrite.Recipes.Net9.UseLinqAggregateBy
- Use LINQ AggregateBy()
- Replace
collection.GroupBy(keySelector).ToDictionary(g => g.Key, g => g.Aggregate(seed, func))withcollection.AggregateBy(keySelector, seed, func).ToDictionary(). Available since .NET 9.
- OpenRewrite.Recipes.Net9.UseLinqCountBy
- Use LINQ CountBy()
- Replace
collection.GroupBy(selector).Select(g => g.Count())withcollection.CountBy(selector). Available since .NET 9.
- OpenRewrite.Recipes.Net9.UseLinqIndex
- Use LINQ Index()
- Replace
collection.Select((item, index) => (index, item))withcollection.Index(). Available since .NET 9.
- OpenRewrite.Recipes.Net9.UseLockObject
- Use System.Threading.Lock for lock fields
- Replace
objectfields initialized withnew object()withSystem.Threading.Lockinitialized withnew(). The Lock type provides better performance with the lock statement. Available since .NET 9.
- OpenRewrite.Recipes.Net9.UseMapStaticAssets
- Use MapStaticAssets()
- Replace
UseStaticFiles()withMapStaticAssets()for ASP.NET Core 9. Only applies when the receiver supportsIEndpointRouteBuilder(WebApplication / minimal hosting). Skips Startup.cs patterns usingIApplicationBuilderwhereMapStaticAssetsis not available.
- OpenRewrite.Recipes.Net9.UseTaskCompletedTask
- Use Task.CompletedTask
- Replace
Task.FromResult(0),Task.FromResult(true), andTask.FromResult(false)withTask.CompletedTaskwhen the return type isTask(notTask<T>).
- OpenRewrite.Recipes.Net9.UseVolatileReadWrite
- Use Volatile.Read/Write (SYSLIB0054)
- Replace
Thread.VolatileReadandThread.VolatileWritewithVolatile.ReadandVolatile.Write. The Thread methods are obsolete in .NET 9 (SYSLIB0054).
- OpenRewrite.Recipes.Net9.UseX509CertificateLoader
- Use X509CertificateLoader (SYSLIB0057)
- Replace
new X509Certificate2(path, password)withX509CertificateLoader.LoadPkcs12FromFile(path, password). The two-argument X509Certificate2 constructor is obsolete in .NET 9 (SYSLIB0057).
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.AsyncLifetimeToBeforeAfterTest
- Find
IAsyncLifetimeneeding TUnit migration - Find classes implementing
IAsyncLifetimethat should use[Before(Test)]and[After(Test)]for TUnit.
- Find
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.ChangeXUnitUsings
- Change xUnit using directives to TUnit
- Replace
using Xunit;withusing TUnit.Core;andusing TUnit.Assertions;, and removeusing Xunit.Abstractions;andusing Xunit.Sdk;.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.ClassFixtureToClassDataSource
- Find
IClassFixture<T>needing TUnit migration - Find classes implementing
IClassFixture<T>that should use[ClassDataSource<T>]for TUnit.
- Find
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.CollectionToNotInParallel
- Replace
[Collection]with[NotInParallel] - Replace the xUnit
[Collection("name")]attribute with the TUnit[NotInParallel("name")]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.ConstructorToBeforeTest
- Find test constructors needing
[Before(Test)] - Find constructors in test classes that should be converted to
[Before(Test)]methods for TUnit.
- Find test constructors needing
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.DisposableToAfterTest
- Replace
IDisposablewith[After(Test)] - Remove
IDisposablefrom the base type list and add[After(Test)]to theDispose()method.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.FactSkipToSkipAttribute
- Extract
Skipinto[Skip]attribute - Extract the
Skipargument from[Fact(Skip = "...")]or[Theory(Skip = "...")]into a separate TUnit[Skip("...")]attribute.
- Extract
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.FactTimeoutToTimeoutAttribute
- Extract
Timeoutinto[Timeout]attribute - Extract the
Timeoutargument from[Fact(Timeout = ...)]or[Theory(Timeout = ...)]into a separate TUnit[Timeout(...)]attribute.
- Extract
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.FactToTest
- Replace
[Fact]with[Test] - Replace the xUnit
[Fact]attribute with the TUnit[Test]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.InlineDataToArguments
- Replace
[InlineData]with[Arguments] - Replace the xUnit
[InlineData]attribute with the TUnit[Arguments]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MemberDataToMethodDataSource
- Replace
[MemberData]with[MethodDataSource] - Replace the xUnit
[MemberData]attribute with the TUnit[MethodDataSource]attribute. Fields and properties referenced by MemberData are converted to methods.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateFromXUnit
- Migrate from xUnit to TUnit
- Migrate xUnit test attributes, assertions, and lifecycle patterns to their TUnit equivalents.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateFromXUnitAttributes
- Migrate xUnit attributes to TUnit
- Replace xUnit test attributes ([Fact], [Theory], [InlineData], etc.) with their TUnit equivalents.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateXUnitAssertions
- Migrate xUnit assertions to TUnit
- Replace xUnit
Assert.*calls with TUnit's fluentawait Assert.That(...).Is*()assertions. Note: test methods may need to be changed toasync Taskseparately.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateXUnitDependencies
- Migrate xUnit NuGet dependencies to TUnit
- Remove xUnit NuGet package references, add TUnit, and upgrade the target framework to at least .NET 9.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TestOutputHelperToTestContext
- Find
ITestOutputHelperneeding TUnit migration - Find usages of xUnit's
ITestOutputHelperthat should be replaced with TUnit'sTestContext.
- Find
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TheoryToTest
- Replace
[Theory]with[Test] - Replace the xUnit
[Theory]attribute with the TUnit[Test]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TraitCategoryToCategory
- Replace
[Trait("Category", ...)]with[Category] - Replace xUnit
[Trait("Category", "X")]with TUnit's dedicated[Category("X")]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TraitToProperty
- Replace
[Trait]with[Property] - Replace the xUnit
[Trait]attribute with the TUnit[Property]attribute.
- Replace
cucumber
5 recipes
- org.openrewrite.cucumber.jvm.CucumberJava8ToJava
- Migrate
cucumber-java8tocucumber-java - Migrates
cucumber-java8step definitions andLambdaGluehooks tocucumber-javaannotated methods.
- Migrate
- org.openrewrite.cucumber.jvm.CucumberToJunitPlatformSuite
- Cucumber to JUnit test
@Suite - Migrates Cucumber tests to JUnit test
@Suite.
- Cucumber to JUnit test
- org.openrewrite.cucumber.jvm.UpgradeCucumber2x
- Upgrade to Cucumber-JVM 2.x
- Upgrade to Cucumber-JVM 2.x from any previous version.
- org.openrewrite.cucumber.jvm.UpgradeCucumber5x
- Upgrade to Cucumber-JVM 5.x
- Upgrade to Cucumber-JVM 5.x from any previous version.
- org.openrewrite.cucumber.jvm.UpgradeCucumber7x
- Upgrade to Cucumber-JVM 7.x
- Upgrade to Cucumber-JVM 7.x from any previous version.
CVE
3 recipes
- org.openrewrite.java.logging.log4j.UpgradeLog4J2DependencyVersion
- Upgrade Log4j 2.x dependency version
- Upgrades the Log4j 2.x dependencies to the latest 2.x version. Mitigates the Log4Shell and other Log4j2-related vulnerabilities.
- Tags: CVE-2021-44228
- org.openrewrite.java.security.FindTextDirectionChanges
- Find text-direction changes
- Finds unicode control characters which can change the direction text is displayed in. These control characters can alter how source code is presented to a human reader without affecting its interpretation by tools like compilers. So a malicious patch could pass code review while introducing vulnerabilities. Note that text direction-changing unicode control characters aren't inherently malicious. These characters can appear for legitimate reasons in code written in or dealing with right-to-left languages. See: https://trojansource.codes/ for more information.
- Tags: CVE-2021-42574
- org.openrewrite.java.security.spring.InsecureSpringServiceExporter
- Secure Spring service exporters
- The default Java deserialization mechanism is available via
ObjectInputStreamclass. This mechanism is known to be vulnerable. If an attacker can make an application deserialize malicious data, it may result in arbitrary code execution. Spring’sRemoteInvocationSerializingExporteruses the default Java deserialization mechanism to parse data. As a result, all classes that extend it are vulnerable to deserialization attacks. The Spring Framework contains at leastHttpInvokerServiceExporterandSimpleHttpInvokerServiceExporterthat extendRemoteInvocationSerializingExporter. These exporters parse data from the HTTP body using the unsafe Java deserialization mechanism. See the full blog post by Artem Smotrakov on CVE-2016-1000027 from which the above description is excerpted. - Tags: CVE-2016-1000027
CWE
28 recipes
- org.openrewrite.apache.httpclient4.MigrateDefaultHttpClient
- Migrates deprecated
DefaultHttpClient - Since
DefaultHttpClientis deprecated, we need to change it to theCloseableHttpClient. It only covers the default scenario with no customHttpParamsorConnectionManager. Of note: theDefaultHttpClientdoes not support TLS 1.2. References: - Find Sec Bugs. - IBM Support Pages. - Tags: CWE-326
- Migrates deprecated
- org.openrewrite.java.security.FixCwe338
- Fix CWE-338 with
SecureRandom - Use a cryptographically strong pseudo-random number generator (PRNG).
- Tags: CWE-338
- Fix CWE-338 with
- org.openrewrite.java.security.FixCwe918
- Remediate server-side request forgery (SSRF)
- Inserts a guard that validates URLs constructed from user-controlled input do not target internal network addresses, blocking server-side request forgery (SSRF) attacks.
- Tags: CWE-918
- org.openrewrite.java.security.ImproperPrivilegeManagement
- Improper privilege management
- Marking code as privileged enables a piece of trusted code to temporarily enable access to more resources than are available directly to the code that called it.
- Tags: CWE-269
- org.openrewrite.java.security.Owasp2025A03
- Remediate OWASP A03:2025 Software supply chain failures
- OWASP A03:2025 describes failures related to the software supply chain, including vulnerable and outdated components. Expanded from A06:2021 Vulnerable and Outdated Components.
- Tags: CWE-1104, CWE-1395, CWE-477
- org.openrewrite.java.security.Owasp2025A04
- Remediate OWASP A04:2025 Cryptographic failures
- OWASP A04:2025 describes failures related to cryptography (or lack thereof), which often lead to exposure of sensitive data. Previously A02:2021.
- Tags: CWE-326, CWE-327, CWE-329, CWE-330, CWE-338, CWE-759, CWE-760, CWE-780, CWE-916
- org.openrewrite.java.security.PartialPathTraversalVulnerability
- Partial path traversal vulnerability
- Replaces
dir.getCanonicalPath().startsWith(parent.getCanonicalPath(), which is vulnerable to partial path traversal attacks, with the more securedir.getCanonicalFile().toPath().startsWith(parent.getCanonicalFile().toPath()). To demonstrate this vulnerability, consider"/usr/outnot".startsWith("/usr/out"). The check is bypassed although/outnotis not under the/outdirectory. It's important to understand that the terminating slash may be removed when using variousStringrepresentations of theFileobject. For example, on Linux,println(new File("/var"))will print/var, butprintln(new File("/var", "/")will print/var/; however,println(new File("/var", "/").getCanonicalPath())will print/var. - Tags: CWE-22
- org.openrewrite.java.security.SecureTempFileCreation
- Use secure temporary file creation
java.io.File.createTempFile()has exploitable default file permissions. This recipe migrates to the more securejava.nio.file.Files.createTempFile().- Tags: CWE-377
- org.openrewrite.java.security.UseFilesCreateTempDirectory
- Use
Files#createTempDirectory - Use
Files#createTempDirectorywhen the sequenceFile#createTempFile(..)->File#delete()->File#mkdir()is used for creating a temp directory. - Tags: CWE-377, CWE-379
- Use
- org.openrewrite.java.security.XmlParserXXEVulnerability
- XML parser XXE vulnerability
- Avoid exposing dangerous features of the XML parser by updating certain factory settings.
- Tags: CWE-611
- org.openrewrite.java.security.ZipSlip
- Zip slip
- Zip slip is an arbitrary file overwrite critical vulnerability, which typically results in remote command execution. A fuller description of this vulnerability is available in the Snyk documentation on it.
- Tags: CWE-22
- org.openrewrite.java.security.marshalling.InsecureJmsDeserialization
- Insecure JMS deserialization
- JMS
Objectmessages depend on Java Serialization for marshalling/unmarshalling of the message payload whenObjectMessage#getObjectis called. Deserialization of untrusted data can lead to security flaws. - Tags: CWE-502
- org.openrewrite.java.security.marshalling.SecureJacksonDefaultTyping
- Secure the use of Jackson default typing
- See the blog post on this subject.
- Tags: CWE-502, CWE-94
- org.openrewrite.java.security.marshalling.SecureSnakeYamlConstructor
- Secure the use of SnakeYAML's constructor
- See the paper on this subject.
- Tags: CWE-502, CWE-94
- org.openrewrite.java.security.search.FindHardcodedIv
- Find hardcoded initialization vectors
- Finds
IvParameterSpecconstructed with hardcoded byte arrays or string literals. A static IV makes CBC and other modes deterministic, enabling chosen-plaintext attacks. IVs should be generated randomly usingSecureRandomfor each encryption operation. - Tags: CWE-329
- org.openrewrite.java.security.search.FindInadequateKeySize
- Find inadequate cryptographic key sizes
- Finds cryptographic key generation with inadequate key sizes. RSA keys should be at least 2048 bits, DSA keys at least 2048 bits, EC keys at least 256 bits, and symmetric keys (AES) at least 128 bits. NIST recommends RSA-2048+ and AES-128+ as minimum for all new applications.
- Tags: CWE-326
- org.openrewrite.java.security.search.FindPermissiveCorsConfiguration
- Find permissive CORS configuration
- Finds overly permissive CORS configurations that allow all origins, which can expose the application to cross-domain attacks.
- Tags: CWE-942
- org.openrewrite.java.security.search.FindPredictableSalt
- Find predictable cryptographic salts
- Finds
PBEParameterSpecandPBEKeySpecconstructed with hardcoded salt byte arrays. A predictable salt undermines the purpose of salting, making rainbow table and precomputation attacks feasible. Salts should be generated randomly usingSecureRandom. - Tags: CWE-760
- org.openrewrite.java.security.search.FindRsaWithoutOaep
- Find RSA encryption without OAEP padding
- Finds uses of RSA encryption with PKCS#1 v1.5 padding or no padding specification. RSA without OAEP padding is vulnerable to padding oracle attacks. Use
RSA/ECB/OAEPWithSHA-256AndMGF1Paddingor equivalent OAEP mode instead. - Tags: CWE-780
- org.openrewrite.java.security.search.FindWeakCryptoAlgorithm
- Find weak cryptographic algorithms
- Finds uses of broken or risky cryptographic algorithms such as MD5, SHA-1, DES, DESede (3DES), RC2, RC4, and Blowfish in calls to
Cipher.getInstance(),MessageDigest.getInstance(),Mac.getInstance(),KeyGenerator.getInstance(), andSecretKeyFactory.getInstance(). - Tags: CWE-327, CWE-328
- org.openrewrite.java.security.search.FindWeakPasswordHashing
- Find weak password hashing
- Finds uses of
MessageDigest.getInstance()with algorithms unsuitable for password hashing (MD5, SHA-1, SHA-256, SHA-384, SHA-512). Passwords should be hashed with a purpose-built password hashing function such as bcrypt, scrypt, Argon2, or PBKDF2 that includes a salt and a tunable work factor. - Tags: CWE-759, CWE-916
- org.openrewrite.java.security.servlet.CookieSetHttpOnly
- Cookies missing HttpOnly flag
- Check for use of cookies without the HttpOnly flag. Cookies should be marked as HttpOnly to prevent client-side scripts from accessing them, reducing the risk of cross-site scripting (XSS) attacks.
- Tags: CWE-1004
- org.openrewrite.java.security.servlet.CookieSetSecure
- Insecure cookies
- Check for use of insecure cookies. Cookies should be marked as secure. This ensures that the cookie is sent only over HTTPS to prevent cross-site scripting attacks.
- Tags: CWE-614
- org.openrewrite.java.security.spring.CsrfProtection
- Enable CSRF attack prevention
- Cross-Site Request Forgery (CSRF) is a type of attack that occurs when a malicious web site, email, blog, instant message, or program causes a user's web browser to perform an unwanted action on a trusted site when the user is authenticated. See the full OWASP cheatsheet.
- Tags: CWE-352
- org.openrewrite.java.security.spring.PreventClickjacking
- Prevent clickjacking
- The
frame-ancestorsdirective can be used in a Content-Security-Policy HTTP response header to indicate whether or not a browser should be allowed to render a page in a<frame>or<iframe>. Sites can use this to avoid Clickjacking attacks by ensuring that their content is not embedded into other sites. - Tags: CWE-1021
- org.openrewrite.java.security.spring.RemoveEnableWebSecurityDebug
- Remove debug mode from Spring Security
- Removes the debug attribute from @EnableWebSecurity annotations to prevent sensitive security information from being logged in production.
- Tags: CWE-489
- org.openrewrite.maven.security.UseHttpsForRepositories
- Use HTTPS for repositories
- Use HTTPS for repository URLs.
- Tags: CWE-829
- org.openrewrite.staticanalysis.OnlyCatchDeclaredExceptions
- Replace
catch(Exception)with specific declared exceptions thrown in the try block - Replaces
catch(Exception e)blocks with a multi-catch block (catch (SpecificException1 | SpecificException2 e)) containing only the exceptions declared thrown by method or constructor invocations within thetryblock that are not already caught by more specificcatchclauses. - Tags: CWE-396
- Replace
CycloneDX
1 recipe
- org.openrewrite.java.dependencies.SoftwareBillOfMaterials
- Software bill of materials
- Produces a software bill of materials (SBOM) for a project. An SBOM is a complete list of all dependencies used in a project, including transitive dependencies. The produced SBOM is in the CycloneDX XML format. Supports Gradle and Maven. Places a file named sbom.xml adjacent to the Gradle or Maven build file.
data
5 recipes
- org.openrewrite.quarkus.spring.SpringBootDataJpaToQuarkus
- Replace Spring Boot Data JPA with Quarkus Hibernate ORM Panache
- Migrates
spring-boot-starter-data-jpatoquarkus-hibernate-orm-panache.
- org.openrewrite.quarkus.spring.SpringBootDataMongoToQuarkus
- Replace Spring Boot Data MongoDB with Quarkus MongoDB Panache
- Migrates
spring-boot-starter-data-mongodbtoquarkus-mongodb-panache.
- org.openrewrite.quarkus.spring.SpringBootDataRedisToQuarkus
- Replace Spring Boot Data Redis with Quarkus Redis Client
- Migrates
spring-boot-starter-data-redistoquarkus-redis-client.
- org.openrewrite.quarkus.spring.SpringBootDataRestToQuarkus
- Replace Spring Boot Data REST with Quarkus REST
- Migrates
spring-boot-starter-data-resttoquarkus-rest-jackson.
- org.openrewrite.quarkus.spring.SpringBootElasticsearchToQuarkus
- Replace Spring Boot Elasticsearch with Quarkus Elasticsearch REST Client
- Migrates
spring-boot-starter-data-elasticsearchtoquarkus-elasticsearch-rest-client.
database
5 recipes
- org.openrewrite.quarkus.spring.DerbyDriverToQuarkus
- Replace Derby driver with Quarkus JDBC Derby
- Migrates
org.apache.derby:derbyorderbyclienttoio.quarkus:quarkus-jdbc-derby(excludes test scope).
- org.openrewrite.quarkus.spring.DerbyTestDriverToQuarkus
- Replace Derby test driver with Quarkus JDBC Derby (test scope)
- Migrates
org.apache.derby:derbywith test scope toio.quarkus:quarkus-jdbc-derbywith test scope.
- org.openrewrite.quarkus.spring.H2DriverToQuarkus
- Replace H2 driver with Quarkus JDBC H2
- Migrates
com.h2database:h2toio.quarkus:quarkus-jdbc-h2(excludes test scope).
- org.openrewrite.quarkus.spring.H2TestDriverToQuarkus
- Replace H2 test driver with Quarkus JDBC H2 (test scope)
- Migrates
com.h2database:h2with test scope toio.quarkus:quarkus-jdbc-h2with test scope.
- org.openrewrite.quarkus.spring.MigrateDatabaseDrivers
- Migrate database drivers to Quarkus JDBC extensions
- Replaces Spring Boot database driver dependencies with their Quarkus JDBC extension equivalents.
datadog
1 recipe
- org.openrewrite.java.spring.opentelemetry.MigrateDatadogToOpenTelemetry
- Migrate Datadog tracing to OpenTelemetry
- Migrate from Datadog Java tracing annotations to OpenTelemetry annotations. Replace Datadog @Trace annotations with @WithSpan annotations.
datanucleus
4 recipes
- org.openrewrite.java.migrate.datanucleus.UpgradeDataNucleus_4_0
- Migrate to DataNucleus 4.0
- Migrate DataNucleus 3.x applications to 4.0. This recipe handles package relocations, type renames, property key changes, and dependency updates introduced in AccessPlatform 4.0.
- org.openrewrite.java.migrate.datanucleus.UpgradeDataNucleus_5_0
- Migrate to DataNucleus 5.0
- Migrate DataNucleus 4.x applications to 5.0. This recipe handles package relocations, type renames, property key changes, and dependency updates.
- org.openrewrite.java.migrate.datanucleus.UpgradeDataNucleus_5_1
- Migrate to DataNucleus 5.1
- Migrate DataNucleus applications to 5.1. This recipe first applies the 5.0 migration, then handles the transaction namespace reorganization and other property renames introduced in 5.1.
- org.openrewrite.java.migrate.datanucleus.UpgradeDataNucleus_5_2
- Migrate to DataNucleus 5.2
- Migrate DataNucleus applications to 5.2. This recipe first applies the 5.1 migration, then handles the column mapping package move and query-related property renames introduced in 5.2.
datasource
1 recipe
- org.openrewrite.quarkus.spring.SpringBootJdbcToQuarkus
- Replace Spring Boot JDBC with Quarkus Agroal
- Migrates
spring-boot-starter-jdbctoquarkus-agroal.
dbrider
1 recipe
- org.openrewrite.java.testing.dbrider.MigrateDbRiderSpringToDbRiderJUnit5
- Migrate rider-spring (JUnit4) to rider-junit5 (JUnit5)
- This recipe will migrate the necessary dependencies and annotations from DbRider with JUnit4 to JUnit5 in a Spring application.
default
1 recipe
- com.oracle.weblogic.rewrite.spring.framework.DefaultServletHandler
- Update Default Servlet Handler for Spring Framework if empty
- This recipe will update Spring Framework default servlet handler if empty, as noted in the Spring Framework 6.2 documentation.
- Tags: default-servlet-handler
demo
2 recipes
- org.openrewrite.github.DependabotCheckForGithubActionsUpdatesDaily
- Check for github-actions updates daily
- Set dependabot to check for github-actions updates daily.
- org.openrewrite.github.DependabotCheckForGithubActionsUpdatesWeekly
- Check for github-actions updates weekly
- Set dependabot to check for github-actions updates weekly.
DEP0030
1 recipe
- org.openrewrite.node.migrate.buffer.replace-slow-buffer
- Replace deprecated
SlowBufferwithBuffer.allocUnsafeSlow() - Replace deprecated
new SlowBuffer(size)calls withBuffer.allocUnsafeSlow(size). SlowBuffer was used to create un-pooled Buffer instances, but has been removed in favor of the explicit Buffer.allocUnsafeSlow() method.
- Replace deprecated
DEP0040
1 recipe
- org.openrewrite.node.migrate.find-punycode-usage
- Find deprecated
punycodemodule usage - The
punycodebuilt-in module was deprecated in Node.js 21 (DEP0040). Use the userlandpunycodepackage from npm orurl.domainToASCII/url.domainToUnicodeinstead.
- Find deprecated
DEP0043
1 recipe
- org.openrewrite.node.migrate.tls.find-tls-secure-pair
- Find deprecated
tls.SecurePairandtls.createSecurePair()usage tls.SecurePair(DEP0043) andtls.createSecurePair()(DEP0064) were deprecated and removed in Node.js 24. Usetls.TLSSocketinstead.
- Find deprecated
DEP0044
1 recipe
- org.openrewrite.node.migrate.util.use-native-type-checking-methods
- Replace deprecated
util.isX()methods with native JavaScript - The
utilmodule's type-checking methods have been removed in Node 22.
- Replace deprecated
DEP0045
1 recipe
- org.openrewrite.node.migrate.util.use-native-type-checking-methods
- Replace deprecated
util.isX()methods with native JavaScript - The
utilmodule's type-checking methods have been removed in Node 22.
- Replace deprecated
DEP0046
1 recipe
- org.openrewrite.node.migrate.util.use-native-type-checking-methods
- Replace deprecated
util.isX()methods with native JavaScript - The
utilmodule's type-checking methods have been removed in Node 22.
- Replace deprecated
DEP0047
1 recipe
- org.openrewrite.node.migrate.util.use-native-type-checking-methods
- Replace deprecated
util.isX()methods with native JavaScript - The
utilmodule's type-checking methods have been removed in Node 22.
- Replace deprecated
DEP0048
1 recipe
- org.openrewrite.node.migrate.util.use-native-type-checking-methods
- Replace deprecated
util.isX()methods with native JavaScript - The
utilmodule's type-checking methods have been removed in Node 22.
- Replace deprecated
DEP0049
1 recipe
- org.openrewrite.node.migrate.util.use-native-type-checking-methods
- Replace deprecated
util.isX()methods with native JavaScript - The
utilmodule's type-checking methods have been removed in Node 22.
- Replace deprecated
DEP0050
1 recipe
- org.openrewrite.node.migrate.util.use-native-type-checking-methods
- Replace deprecated
util.isX()methods with native JavaScript - The
utilmodule's type-checking methods have been removed in Node 22.
- Replace deprecated
DEP0051
1 recipe
- org.openrewrite.node.migrate.util.use-native-type-checking-methods
- Replace deprecated
util.isX()methods with native JavaScript - The
utilmodule's type-checking methods have been removed in Node 22.
- Replace deprecated
DEP0052
1 recipe
- org.openrewrite.node.migrate.util.use-native-type-checking-methods
- Replace deprecated
util.isX()methods with native JavaScript - The
utilmodule's type-checking methods have been removed in Node 22.
- Replace deprecated
DEP0053
1 recipe
- org.openrewrite.node.migrate.util.use-native-type-checking-methods
- Replace deprecated
util.isX()methods with native JavaScript - The
utilmodule's type-checking methods have been removed in Node 22.
- Replace deprecated
DEP0054
1 recipe
- org.openrewrite.node.migrate.util.use-native-type-checking-methods
- Replace deprecated
util.isX()methods with native JavaScript - The
utilmodule's type-checking methods have been removed in Node 22.
- Replace deprecated
DEP0055
1 recipe
- org.openrewrite.node.migrate.util.use-native-type-checking-methods
- Replace deprecated
util.isX()methods with native JavaScript - The
utilmodule's type-checking methods have been removed in Node 22.
- Replace deprecated
DEP0056
1 recipe
- org.openrewrite.node.migrate.util.use-native-type-checking-methods
- Replace deprecated
util.isX()methods with native JavaScript - The
utilmodule's type-checking methods have been removed in Node 22.
- Replace deprecated
DEP0057
1 recipe
- org.openrewrite.node.migrate.util.use-native-type-checking-methods
- Replace deprecated
util.isX()methods with native JavaScript - The
utilmodule's type-checking methods have been removed in Node 22.
- Replace deprecated
DEP0058
1 recipe
- org.openrewrite.node.migrate.util.use-native-type-checking-methods
- Replace deprecated
util.isX()methods with native JavaScript - The
utilmodule's type-checking methods have been removed in Node 22.
- Replace deprecated
DEP0059
1 recipe
- org.openrewrite.node.migrate.util.replace-util-log
- Replace deprecated
util.log()withconsole.log() - Replace deprecated
util.log()calls withconsole.log(). Note:util.log()included timestamps, butconsole.log()does not.
- Replace deprecated
DEP0060
1 recipe
- org.openrewrite.node.migrate.util.replace-util-extend
- Replace deprecated
util._extend()withObject.assign() - Replace deprecated
util._extend(target, source)calls withObject.assign(target, source)which preserves the mutation behavior.
- Replace deprecated
DEP0064
1 recipe
- org.openrewrite.node.migrate.tls.find-tls-secure-pair
- Find deprecated
tls.SecurePairandtls.createSecurePair()usage tls.SecurePair(DEP0043) andtls.createSecurePair()(DEP0064) were deprecated and removed in Node.js 24. Usetls.TLSSocketinstead.
- Find deprecated
DEP0066
1 recipe
- org.openrewrite.node.migrate.http.replace-outgoing-message-headers
- Replace
OutgoingMessage._headersand._headerNameswith public methods - Replace deprecated
OutgoingMessage.prototype._headerswithgetHeaders(),setHeader(),removeHeader()andOutgoingMessage.prototype._headerNameswithgetHeaderNames()to address DEP0066 deprecation.
- Replace
DEP0081
1 recipe
- org.openrewrite.node.migrate.fs.replace-fs-truncate-fd
- Replace
fs.truncate()with file descriptor tofs.ftruncate() - Replace deprecated
fs.truncate(fd, ...)andfs.truncateSync(fd, ...)calls withfs.ftruncate(fd, ...)andfs.ftruncateSync(fd, ...)when the first argument is a file descriptor (number).
- Replace
DEP0093
1 recipe
- org.openrewrite.node.migrate.crypto.replace-crypto-fips
- Replace deprecated
crypto.fipswithcrypto.getFips()andcrypto.setFips() - Replace deprecated
crypto.fipsproperty access withcrypto.getFips()for reads andcrypto.setFips(value)for writes.
- Replace deprecated
DEP0100
1 recipe
- org.openrewrite.node.migrate.find-process-assert
- Find deprecated
process.assert()usage process.assert()was deprecated in Node.js 10 (DEP0100) and removed in Node.js 23. Use theassertmodule instead.
- Find deprecated
DEP0106
1 recipe
- org.openrewrite.node.migrate.crypto.find-create-cipher
- Find deprecated
crypto.createCipher()andcrypto.createDecipher()usage crypto.createCipher()andcrypto.createDecipher()were deprecated in Node.js 10 (DEP0106) and removed in Node.js 22. Usecrypto.createCipheriv()andcrypto.createDecipheriv()instead.
- Find deprecated
DEP0108
1 recipe
- org.openrewrite.node.migrate.zlib.replace-bytes-read
- Replace deprecated
zlib.bytesReadwithzlib.bytesWritten - Replace deprecated
bytesReadproperty on zlib streams withbytesWritten.
- Replace deprecated
DEP0121
1 recipe
- org.openrewrite.node.migrate.net.remove-set-simultaneous-accepts
- Remove deprecated
net._setSimultaneousAccepts() - Remove calls to deprecated
net._setSimultaneousAccepts()which was an undocumented internal function that is no longer necessary.
- Remove deprecated
DEP0126
1 recipe
- org.openrewrite.node.migrate.timers.find-timers-active
- Find deprecated
timers.active()andtimers._unrefActive()usage timers.active()(DEP0126) andtimers._unrefActive()(DEP0127) were deprecated and removed in Node.js 24. Usetimeout.refresh()instead.
- Find deprecated
DEP0127
1 recipe
- org.openrewrite.node.migrate.timers.find-timers-active
- Find deprecated
timers.active()andtimers._unrefActive()usage timers.active()(DEP0126) andtimers._unrefActive()(DEP0127) were deprecated and removed in Node.js 24. Usetimeout.refresh()instead.
- Find deprecated
DEP0158
1 recipe
- org.openrewrite.node.migrate.buffer.replace-deprecated-slice
- Replace deprecated
Buffer.slice()withBuffer.subarray() - Replace deprecated
buffer.slice()calls withbuffer.subarray()for compatibility with Uint8Array.prototype.slice().
- Replace deprecated
DEP0164
1 recipe
- org.openrewrite.node.migrate.process.coerce-process-exit-code
- Coerce
process.exit()andprocess.exitCodeto integer - Wraps non-integer values passed to
process.exit()or assigned toprocess.exitCodewithMath.trunc()to avoid the DEP0164 deprecation warning about implicit coercion to integer.
- Coerce
DEP0174
1 recipe
- org.openrewrite.node.migrate.util.remove-promisify-on-promise
- Remove unnecessary
util.promisify()on Promise-returning functions - Removes
util.promisify()calls on functions that already return a Promise. Since Node.js v17.0.0, calling promisify on a function that returns a Promise emits a runtime deprecation warning (DEP0174).
- Remove unnecessary
DEP0176
1 recipe
- org.openrewrite.node.migrate.fs.replace-fs-access-constants
- Replace deprecated
fs.F_OK,fs.R_OK,fs.W_OK,fs.X_OKwithfs.constants.* - Replace deprecated file access constants (
fs.F_OK,fs.R_OK,fs.W_OK,fs.X_OK) with their equivalents fromfs.constants. These constants were removed in Node.js v24+ and should be accessed through the constants namespace.
- Replace deprecated
DEP0177
1 recipe
- org.openrewrite.node.migrate.util.replace-is-webassembly-compiled-module
- Replace deprecated
util.types.isWebAssemblyCompiledModule() - Replace
util.types.isWebAssemblyCompiledModule(value)withvalue instanceof WebAssembly.Module.
- Replace deprecated
DEP0178
1 recipe
- org.openrewrite.node.migrate.fs.replace-dirent-path
- Replace
dirent.pathwithdirent.parentPath - Replaces deprecated
dirent.pathproperty access withdirent.parentPathonfs.Direntinstances to address DEP0178 deprecation.
- Replace
DEP0179
1 recipe
- org.openrewrite.node.migrate.crypto.replace-hash-constructor
- Replace deprecated
new crypto.Hash()andnew crypto.Hmac()with factory methods - Replace deprecated
new crypto.Hash(algorithm)constructor calls withcrypto.createHash(algorithm)andnew crypto.Hmac(algorithm, key)withcrypto.createHmac(algorithm, key)factory methods.
- Replace deprecated
DEP0180
1 recipe
- org.openrewrite.node.migrate.fs.replace-stats-constructor
- Replace deprecated
fs.Statsconstructor with object literal - Replace deprecated
new fs.Stats()constructor calls with an object literal containing Stats properties initialized to undefined.
- Replace deprecated
DEP0181
1 recipe
- org.openrewrite.node.migrate.crypto.replace-hash-constructor
- Replace deprecated
new crypto.Hash()andnew crypto.Hmac()with factory methods - Replace deprecated
new crypto.Hash(algorithm)constructor calls withcrypto.createHash(algorithm)andnew crypto.Hmac(algorithm, key)withcrypto.createHmac(algorithm, key)factory methods.
- Replace deprecated
DEP0189
1 recipe
- org.openrewrite.node.migrate.process.remove-usage-of-features-tls-underscore_constants
- Remove usage of deprecated
process.features.tls_*properties - Remove references to deprecated
process.features.tls_*properties, replace withprocess.features.tls.
- Remove usage of deprecated
DEP0192
1 recipe
- org.openrewrite.node.migrate.tls.replace-internal-modules
- Replace deprecated
node:_tls_commonandnode:_tls_wrapwithnode:tls - Replace deprecated internal TLS module imports
require('node:_tls_common')andrequire('node:_tls_wrap')with the publicnode:tlsmodule.
- Replace deprecated
DEP0193
1 recipe
- org.openrewrite.node.migrate.stream.replace-internal-modules
- Replace deprecated
node:_stream_*withnode:stream - Replace deprecated internal stream module imports like
require('node:_stream_readable')with the publicnode:streammodule.
- Replace deprecated
dependabot
4 recipes
- org.openrewrite.github.AddDependabotCooldown
- Add cooldown periods to Dependabot configuration
- Adds a
cooldownsection to each update configuration in Dependabot files. Supportsdefault-days,semver-major-days,semver-minor-days,semver-patch-days,include, andexcludeoptions. This implements a security best practice where dependencies are not immediately adopted upon release, allowing time for security vendors to identify potential supply chain compromises. Cooldown applies only to version updates, not security updates. Read more about dependency cooldowns. The available configuration options for dependabot are listed on GitHub.
- org.openrewrite.github.ChangeDependabotScheduleInterval
- Change dependabot schedule interval
- Change the schedule interval for a given package-ecosystem in a
dependabot.ymlconfiguration file. The available configuration options for dependabot are listed on GitHub.
- org.openrewrite.github.DependabotCheckForGithubActionsUpdatesDaily
- Check for github-actions updates daily
- Set dependabot to check for github-actions updates daily.
- org.openrewrite.github.DependabotCheckForGithubActionsUpdatesWeekly
- Check for github-actions updates weekly
- Set dependabot to check for github-actions updates weekly.
dependencies
7 recipes
- com.oracle.weblogic.rewrite.jakarta.UpdateJakartaPlatform9_1
- Update Jakarta EE Platform Dependencies to 9.1.0
- Update Jakarta EE Platform Dependencies to 9.1.0
- com.oracle.weblogic.rewrite.jakarta.UpgradeMavenPluginConfigurationArtifacts
- Change artifacts for a Maven plugin configuration
- Change artifacts for a Maven plugin configuration artifacts.
- org.openrewrite.github.AddDependabotCooldown
- Add cooldown periods to Dependabot configuration
- Adds a
cooldownsection to each update configuration in Dependabot files. Supportsdefault-days,semver-major-days,semver-minor-days,semver-patch-days,include, andexcludeoptions. This implements a security best practice where dependencies are not immediately adopted upon release, allowing time for security vendors to identify potential supply chain compromises. Cooldown applies only to version updates, not security updates. Read more about dependency cooldowns. The available configuration options for dependabot are listed on GitHub.
- org.openrewrite.github.ChangeDependabotScheduleInterval
- Change dependabot schedule interval
- Change the schedule interval for a given package-ecosystem in a
dependabot.ymlconfiguration file. The available configuration options for dependabot are listed on GitHub.
- org.openrewrite.github.DependabotCheckForGithubActionsUpdatesDaily
- Check for github-actions updates daily
- Set dependabot to check for github-actions updates daily.
- org.openrewrite.github.DependabotCheckForGithubActionsUpdatesWeekly
- Check for github-actions updates weekly
- Set dependabot to check for github-actions updates weekly.
- org.openrewrite.quarkus.spring.MigrateBootStarters
- Replace Spring Boot starter dependencies with Quarkus equivalents
- Migrates Spring Boot starter dependencies to their Quarkus equivalents, removing version tags as Quarkus manages versions through its BOM.
deployment
2 recipes
- com.oracle.weblogic.rewrite.WebLogicPlanXmlNamespace1412
- Migrate xmlns entries in
plan.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Plan schema files to WebLogic 14.1.2
- Tags: deployment-plan
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicPlanXmlNamespace1511
- Migrate xmlns entries in
plan.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inplan.xmlfiles to WebLogic 15.1.1 - Tags: deployment-plan
- Migrate xmlns entries in
deprecated
18 recipes
- org.openrewrite.java.migrate.Java8toJava11
- Migrate to Java 11
- This recipe will apply changes commonly needed when upgrading to Java 11. Specifically, for those applications that are built on Java 8, this recipe will update and add dependencies on J2EE libraries that are no longer directly bundled with the JDK. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 11 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 11.
- org.openrewrite.java.migrate.jakarta.UpdateJakartaAnnotations2
- Update Jakarta EE annotation Dependencies to 2.1.x
- Update Jakarta EE annotation Dependencies to 2.1.x.
- org.openrewrite.java.migrate.javaee6
- Migrate to JavaEE6
- These recipes help with the Migration to Java EE 6, flagging and updating deprecated methods.
- org.openrewrite.java.migrate.javaee7
- Migrate to JavaEE7
- These recipes help with the Migration to Java EE 7, flagging and updating deprecated methods.
- org.openrewrite.java.migrate.javaee8
- Migrate to JavaEE8
- These recipes help with the Migration to Java EE 8, flagging and updating deprecated methods.
- org.openrewrite.java.migrate.javax.openJPAToEclipseLink
- Migrate from OpenJPA to EclipseLink JPA
- These recipes help migrate Java Persistence applications using OpenJPA to EclipseLink JPA.
- org.openrewrite.java.migrate.lang.MigrateClassLoaderDefineClass
- Use
ClassLoader#defineClass(String, byte[], int, int) - Use
ClassLoader#defineClass(String, byte[], int, int)instead of the deprecatedClassLoader#defineClass(byte[], int, int)in Java 1.1 or higher.
- Use
- org.openrewrite.java.migrate.lang.MigrateClassNewInstanceToGetDeclaredConstructorNewInstance
- Use
Class#getDeclaredConstructor().newInstance() - Use
Class#getDeclaredConstructor().newInstance()instead of the deprecatedClass#newInstance()in Java 9 or higher.
- Use
- org.openrewrite.java.migrate.lang.MigrateSecurityManagerMulticast
- Use
SecurityManager#checkMulticast(InetAddress) - Use
SecurityManager#checkMulticast(InetAddress)instead of the deprecatedSecurityManager#checkMulticast(InetAddress, byte)in Java 1.4 or higher.
- Use
- org.openrewrite.java.migrate.logging.MigrateGetLoggingMXBeanToGetPlatformMXBean
- Use
ManagementFactory#getPlatformMXBean(PlatformLoggingMXBean.class) - Use
ManagementFactory#getPlatformMXBean(PlatformLoggingMXBean.class)instead of the deprecatedLogManager#getLoggingMXBean()in Java 9 or higher.
- Use
- org.openrewrite.java.migrate.logging.MigrateLogRecordSetMillisToSetInstant
- Use
LogRecord#setInstant(Instant) - Use
LogRecord#setInstant(Instant)instead of the deprecatedLogRecord#setMillis(long)in Java 9 or higher.
- Use
- org.openrewrite.java.migrate.logging.MigrateLoggerLogrbToUseResourceBundle
- Use
Logger#logrb(.., ResourceBundle bundleName, ..) - Use
Logger#logrb(.., ResourceBundle bundleName, ..)instead of the deprecatedjava.util.logging.Logger#logrb(.., String bundleName, ..)in Java 8 or higher.
- Use
- org.openrewrite.java.migrate.net.MigrateHttpURLConnectionHttpServerErrorToHttpInternalError
- Use
java.net.HttpURLConnection.HTTP_INTERNAL_ERROR - Use
java.net.HttpURLConnection.HTTP_INTERNAL_ERRORinstead of the deprecatedjava.net.HttpURLConnection.HTTP_SERVER_ERROR.
- Use
- org.openrewrite.java.migrate.net.MigrateMulticastSocketSetTTLToSetTimeToLive
- Use
java.net.MulticastSocket#setTimeToLive(int) - Use
java.net.MulticastSocket#setTimeToLive(int)instead of the deprecatedjava.net.MulticastSocket#setTTL(byte)in Java 1.2 or higher.
- Use
- org.openrewrite.java.migrate.net.MigrateURLDecoderDecode
- Use
java.net.URLDecoder#decode(String, StandardCharsets.UTF_8) - Use
java.net.URLDecoder#decode(String, StandardCharsets.UTF_8)instead of the deprecatedjava.net.URLDecoder#decode(String)in Java 10 or higher.
- Use
- org.openrewrite.java.migrate.net.MigrateURLEncoderEncode
- Use
java.net.URLEncoder#encode(String, StandardCharsets.UTF_8) - Use
java.net.URLEncoder#encode(String, StandardCharsets.UTF_8)instead of the deprecatedjava.net.URLEncoder#encode(String)in Java 10 or higher.
- Use
- org.openrewrite.java.migrate.sql.MigrateDriverManagerSetLogStream
- Use
DriverManager#setLogWriter(java.io.PrintWriter) - Use
DriverManager#setLogWriter(java.io.PrintWriter)instead of the deprecatedDriverManager#setLogStream(java.io.PrintStream)in Java 1.2 or higher.
- Use
- org.openrewrite.kotlin.replace.ReplaceKotlinMethod
- Replace Kotlin method
- Replaces Kotlin method calls based on
@Deprecated(replaceWith=ReplaceWith(...))annotations.
deprecation
5 recipes
- org.openrewrite.github.SetupNodeUpgradeNodeVersion
- Upgrade
actions/setup-nodenode-version - Update the Node.js version used by
actions/setup-nodeif it is below the expected version number.
- Upgrade
- org.openrewrite.java.migrate.AccessController
- Remove Security AccessController
- The Security Manager API is unsupported in Java 24. This recipe will remove the usage of
java.security.AccessController.
- org.openrewrite.java.migrate.RemoveSecurityManager
- Remove Security SecurityManager
- The Security Manager API is unsupported in Java 24. This recipe will remove the usage of
java.security.SecurityManager.
- org.openrewrite.java.migrate.RemoveSecurityPolicy
- Remove Security Policy
- The Security Manager API is unsupported in Java 24. This recipe will remove the use of
java.security.Policy.
- org.openrewrite.java.migrate.SystemGetSecurityManagerToNull
- Replace
System.getSecurityManager()withnull - The Security Manager API is unsupported in Java 24. This recipe will replace
System.getSecurityManager()withnullto make its behavior more obvious and try to simplify execution paths afterwards.
- Replace
derby
2 recipes
- org.openrewrite.quarkus.spring.DerbyDriverToQuarkus
- Replace Derby driver with Quarkus JDBC Derby
- Migrates
org.apache.derby:derbyorderbyclienttoio.quarkus:quarkus-jdbc-derby(excludes test scope).
- org.openrewrite.quarkus.spring.DerbyTestDriverToQuarkus
- Replace Derby test driver with Quarkus JDBC Derby (test scope)
- Migrates
org.apache.derby:derbywith test scope toio.quarkus:quarkus-jdbc-derbywith test scope.
descriptors
2 recipes
- com.oracle.weblogic.rewrite.MigrateWebLogicSchemasTo1412
- Migrate WebLogic Schemas to 14.1.2
- This recipe will migrate WebLogic schemas to 14.1.2
- com.oracle.weblogic.rewrite.MigrateWebLogicSchemasTo1511
- Migrate WebLogic Schemas to 15.1.1
- This recipe will migrate WebLogic schemas to 15.1.1
devtools
1 recipe
- org.openrewrite.quarkus.spring.MigrateSpringBootDevTools
- Remove Spring Boot DevTools
- Removes Spring Boot DevTools dependency and configuration. Quarkus has built-in dev mode with hot reload that replaces DevTools functionality.
di
1 recipe
- OpenRewrite.Recipes.Net10.FindKeyedServiceAnyKey
- Find
KeyedService.AnyKeybehavior change - Finds usages of
KeyedService.AnyKeywhich has changed behavior in .NET 10.GetKeyedService(AnyKey)now throwsInvalidOperationExceptionandGetKeyedServices(AnyKey)no longer returns AnyKey registrations.
- Find
diagnostics
3 recipes
- OpenRewrite.Recipes.Net10.FindActivitySampling
- Find
ActivitySamplingResult.PropagationDatabehavior change - Finds usages of
ActivitySamplingResult.PropagationDatawhich has changed behavior in .NET 10. Activities with a recorded parent and PropagationData sampling no longer setActivity.Recorded = true.
- Find
- OpenRewrite.Recipes.Net10.FindDistributedContextPropagator
- Find
DistributedContextPropagatordefault propagator change - Finds usages of
DistributedContextPropagator.CurrentandDistributedContextPropagator.CreateDefaultPropagator()which now default to W3C format in .NET 10. The 'baggage' header is used instead of 'Correlation-Context'.
- Find
- OpenRewrite.Recipes.Net9.FindIncrementingPollingCounter
- Find
IncrementingPollingCounterasync callback change - Finds
new IncrementingPollingCounter()constructor calls. In .NET 9, the initial callback invocation is asynchronous instead of synchronous, which may change timing behavior.
- Find
docker
3 recipes
- org.openrewrite.docker.DockerBestPractices
- Apply Docker best practices
- Apply a set of Docker best practices to Dockerfiles. This recipe applies security hardening, build optimization, and maintainability improvements based on CIS Docker Benchmark and industry best practices.
- org.openrewrite.docker.DockerBuildOptimization
- Optimize Docker builds
- Apply build optimization best practices to Dockerfiles. This includes combining RUN instructions to reduce layers and adding cleanup commands to reduce image size.
- org.openrewrite.docker.DockerSecurityBestPractices
- Apply Docker security best practices
- Apply security-focused Docker best practices to Dockerfiles. This includes running as a non-root user (CIS 4.1) and using COPY instead of ADD where appropriate (CIS 4.9).
dotnet
122 recipes
- OpenRewrite.Recipes.AspNet.UpgradeAspNetFrameworkToCore
- Migrate ASP.NET Framework to ASP.NET Core
- Migrate ASP.NET Framework (System.Web.Mvc, System.Web.Http) types to their ASP.NET Core equivalents. Based on the .NET Upgrade Assistant's UA0002 and UA0010 diagnostics. See https://learn.microsoft.com/en-us/aspnet/core/migration/proper-to-2x.
- OpenRewrite.Recipes.Net10.FindActionContextAccessorObsolete
- Find obsolete
IActionContextAccessor/ActionContextAccessor(ASPDEPR006) - Finds usages of
IActionContextAccessorandActionContextAccessorwhich are obsolete in .NET 10. UseIHttpContextAccessorandHttpContext.GetEndpoint()instead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindActivitySampling
- Find
ActivitySamplingResult.PropagationDatabehavior change - Finds usages of
ActivitySamplingResult.PropagationDatawhich has changed behavior in .NET 10. Activities with a recorded parent and PropagationData sampling no longer setActivity.Recorded = true.
- Find
- OpenRewrite.Recipes.Net10.FindBackgroundServiceExecuteAsync
- Find
BackgroundService.ExecuteAsyncbehavior change - Finds methods that override
ExecuteAsyncfromBackgroundService. In .NET 10, the entire method runs on a background thread; synchronous code before the firstawaitno longer blocks host startup.
- Find
- OpenRewrite.Recipes.Net10.FindBufferedStreamWriteByte
- Find
BufferedStream.WriteByteimplicit flush behavior change - Finds calls to
BufferedStream.WriteByte()which no longer performs an implicit flush when the internal buffer is full in .NET 10. CallFlush()explicitly if needed.
- Find
- OpenRewrite.Recipes.Net10.FindClipboardGetData
- Find obsolete
Clipboard.GetDatacalls (WFDEV005) - Finds calls to
Clipboard.GetData(string). In .NET 10, this method is obsolete (WFDEV005). UseClipboard.TryGetDatamethods instead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindDistributedContextPropagator
- Find
DistributedContextPropagatordefault propagator change - Finds usages of
DistributedContextPropagator.CurrentandDistributedContextPropagator.CreateDefaultPropagator()which now default to W3C format in .NET 10. The 'baggage' header is used instead of 'Correlation-Context'.
- Find
- OpenRewrite.Recipes.Net10.FindDllImportSearchPath
- Find
DllImportSearchPath.AssemblyDirectorybehavior change - Finds usages of
DllImportSearchPath.AssemblyDirectorywhich has changed behavior in .NET 10. Specifying onlyAssemblyDirectoryno longer falls back to OS default search paths.
- Find
- OpenRewrite.Recipes.Net10.FindDriveInfoDriveFormat
- Find
DriveInfo.DriveFormatbehavior change - Finds usages of
DriveInfo.DriveFormatwhich returns Linux kernel filesystem type strings instead of mapped names in .NET 10. Verify that comparisons match the new format.
- Find
- OpenRewrite.Recipes.Net10.FindFormOnClosingObsolete
- Find obsolete
Form.OnClosing/OnClosedusage (WFDEV004) - Finds usage of
Form.OnClosing,Form.OnClosed, and theClosing/Closedevents. In .NET 10, these are obsolete (WFDEV004). UseOnFormClosing/OnFormClosedandFormClosing/FormClosedinstead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindGnuTarPaxTarEntry
- Find
GnuTarEntry/PaxTarEntrydefault timestamp change - Finds
new GnuTarEntry(...)andnew PaxTarEntry(...)constructor calls. In .NET 10, these no longer set atime and ctime by default. SetAccessTime/ChangeTimeexplicitly if needed.
- Find
- OpenRewrite.Recipes.Net10.FindIpNetworkObsolete
- Find obsolete
IPNetwork/KnownNetworks(ASPDEPR005) - Finds usages of
Microsoft.AspNetCore.HttpOverrides.IPNetworkandForwardedHeadersOptions.KnownNetworkswhich are obsolete in .NET 10. UseSystem.Net.IPNetworkandKnownIPNetworksinstead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindKeyedServiceAnyKey
- Find
KeyedService.AnyKeybehavior change - Finds usages of
KeyedService.AnyKeywhich has changed behavior in .NET 10.GetKeyedService(AnyKey)now throwsInvalidOperationExceptionandGetKeyedServices(AnyKey)no longer returns AnyKey registrations.
- Find
- OpenRewrite.Recipes.Net10.FindMakeGenericSignatureType
- Find
Type.MakeGenericSignatureTypevalidation change - Finds calls to
Type.MakeGenericSignatureType()which now validates that the first argument is a generic type definition in .NET 10.
- Find
- OpenRewrite.Recipes.Net10.FindQueryableMaxByMinByObsolete
- Find obsolete
Queryable.MaxBy/MinBywithIComparer<TSource>(SYSLIB0061) - Finds
Queryable.MaxByandQueryable.MinByoverloads takingIComparer<TSource>which are obsolete in .NET 10. Use the overloads takingIComparer<TKey>instead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindRazorRuntimeCompilationObsolete
- Find obsolete
AddRazorRuntimeCompilationcalls (ASPDEPR003) - Finds calls to
AddRazorRuntimeCompilationwhich is obsolete in .NET 10. Use Hot Reload instead for development scenarios.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindRfc2898DeriveBytesObsolete
- Find obsolete
Rfc2898DeriveBytesconstructors (SYSLIB0060) - Finds
new Rfc2898DeriveBytes(...)constructor calls which are obsolete in .NET 10. Use the staticRfc2898DeriveBytes.Pbkdf2()method instead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindSslAuthEnumTypes
- Find obsolete SSL authentication enum types
- Finds usage of
ExchangeAlgorithmType,CipherAlgorithmType, andHashAlgorithmTypefromSystem.Security.Authentication. These enum types are obsolete in .NET 10 (SYSLIB0058). UseSslStream.NegotiatedCipherSuiteinstead.
- OpenRewrite.Recipes.Net10.FindSslStreamObsoleteProperties
- Find obsolete
SslStreamcipher properties (SYSLIB0058) - Finds usages of
SslStream.KeyExchangeAlgorithm,KeyExchangeStrength,CipherAlgorithm,CipherStrength,HashAlgorithm, andHashStrengthwhich are obsolete in .NET 10. UseSslStream.NegotiatedCipherSuiteinstead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindSystemDrawingExceptionChange
- Find
catch (OutOfMemoryException)that may needExternalException - In .NET 10, System.Drawing GDI+ errors now throw
ExternalExceptioninstead ofOutOfMemoryException. This recipe finds catch blocks that catchOutOfMemoryExceptionwhich may need to also catchExternalException.
- Find
- OpenRewrite.Recipes.Net10.FindSystemEventsThreadShutdownObsolete
- Find obsolete
SystemEvents.EventsThreadShutdown(SYSLIB0059) - Finds usages of
SystemEvents.EventsThreadShutdownwhich is obsolete in .NET 10. UseAppDomain.ProcessExitinstead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindWebHostBuilderObsolete
- Find obsolete
WebHostBuilder/IWebHost/WebHostusage (ASPDEPR004/ASPDEPR008) - Finds usages of
WebHostBuilder,IWebHost, andWebHostwhich are obsolete in .NET 10. Migrate toHostBuilderorWebApplicationBuilderinstead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindWinFormsObsoleteApis
- Find obsolete Windows Forms APIs (WFDEV004/005/006)
- Finds usages of Windows Forms APIs that are obsolete in .NET 10, including
Form.OnClosing/OnClosed(WFDEV004),Clipboard.GetData(WFDEV005), and legacy controls likeContextMenu,DataGrid,MainMenu(WFDEV006).
- OpenRewrite.Recipes.Net10.FindWithOpenApiDeprecated
- Find deprecated
WithOpenApicalls (ASPDEPR002) - Finds calls to
.WithOpenApi()which is deprecated in .NET 10. Remove the call or useAddOpenApiOperationTransformerinstead.
- Find deprecated
- OpenRewrite.Recipes.Net10.FindX500DistinguishedNameValidation
- Find
X500DistinguishedNamestring constructor stricter validation - Finds
new X500DistinguishedName(string, ...)constructor calls which have stricter validation in .NET 10. Non-Windows environments may reject previously accepted values.
- Find
- OpenRewrite.Recipes.Net10.FindXsltSettingsEnableScriptObsolete
- Find obsolete
XsltSettings.EnableScript(SYSLIB0062) - Finds usages of
XsltSettings.EnableScriptwhich is obsolete in .NET 10.
- Find obsolete
- OpenRewrite.Recipes.Net10.FormOnClosingRename
- Rename
Form.OnClosing/OnClosedtoOnFormClosing/OnFormClosed(WFDEV004) - Renames
Form.OnClosingtoOnFormClosingandForm.OnClosedtoOnFormClosedfor .NET 10 compatibility. Parameter type changes (CancelEventArgs→FormClosingEventArgs,EventArgs→FormClosedEventArgs) must be updated manually.
- Rename
- OpenRewrite.Recipes.Net10.InsertAdjacentElementOrientParameterRename
- Rename
orientparameter toorientationinHtmlElement.InsertAdjacentElement - The
orientparameter ofHtmlElement.InsertAdjacentElementwas renamed toorientationin .NET 10. This recipe updates named arguments in method calls to use the new parameter name.
- Rename
- OpenRewrite.Recipes.Net10.KnownNetworksRename
- Rename
KnownNetworkstoKnownIPNetworks(ASPDEPR005) - Renames
ForwardedHeadersOptions.KnownNetworkstoKnownIPNetworksfor .NET 10 compatibility.
- Rename
- OpenRewrite.Recipes.Net10.MlDsaSlhDsaSecretKeyToPrivateKey
- Rename MLDsa/SlhDsa
SecretKeymembers toPrivateKey - Renames
SecretKeytoPrivateKeyin MLDsa and SlhDsa post-quantum cryptography APIs to align with .NET 10 naming conventions.
- Rename MLDsa/SlhDsa
- OpenRewrite.Recipes.Net10.RazorRuntimeCompilationObsolete
- Remove obsolete
AddRazorRuntimeCompilationcalls (ASPDEPR003) - Removes
AddRazorRuntimeCompilation()calls which are obsolete in .NET 10. Use Hot Reload instead for development scenarios.
- Remove obsolete
- OpenRewrite.Recipes.Net10.UpgradeToDotNet10
- Migrate to .NET 10
- Migrate C# projects to .NET 10, applying necessary API changes. Includes all .NET 9 (and earlier) migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/10.0.
- OpenRewrite.Recipes.Net10.WithOpenApiDeprecated
- Remove deprecated
WithOpenApicalls (ASPDEPR002) - Removes
.WithOpenApi()calls which are deprecated in .NET 10. The call is removed from fluent method chains.
- Remove deprecated
- OpenRewrite.Recipes.Net3_0.FindCompactOnMemoryPressure
- Find
CompactOnMemoryPressureusage (removed in ASP.NET Core 3.0) - Finds usages of
CompactOnMemoryPressurewhich was removed fromMemoryCacheOptionsin ASP.NET Core 3.0.
- Find
- OpenRewrite.Recipes.Net3_0.FindConnectionAdapter
- Find
IConnectionAdapterusage (removed in ASP.NET Core 3.0) - Finds usages of
IConnectionAdapterwhich was removed from Kestrel in ASP.NET Core 3.0. Use Connection Middleware instead.
- Find
- OpenRewrite.Recipes.Net3_0.FindHttpContextAuthentication
- Find
HttpContext.Authenticationusage (removed in ASP.NET Core 3.0) - Finds usages of
HttpContext.Authenticationwhich was removed in ASP.NET Core 3.0. Use dependency injection to getIAuthenticationServiceinstead.
- Find
- OpenRewrite.Recipes.Net3_0.FindNewtonsoftJson
- Find Newtonsoft.Json usage
- Finds usages of Newtonsoft.Json types (
JObject,JArray,JToken,JsonConvert) that should be migrated toSystem.Text.Jsonor explicitly preserved viaMicrosoft.AspNetCore.Mvc.NewtonsoftJsonin ASP.NET Core 3.0+.
- OpenRewrite.Recipes.Net3_0.FindObsoleteLocalizationApis
- Find obsolete localization APIs (ASP.NET Core 3.0)
- Finds usages of
ResourceManagerWithCultureStringLocalizerandWithCulture()which are obsolete in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_0.FindSpaServices
- Find SpaServices/NodeServices usage (obsolete in ASP.NET Core 3.0)
- Finds usages of
SpaServicesandNodeServiceswhich are obsolete in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_0.FindSynchronousIO
- Find synchronous IO usage (disabled in ASP.NET Core 3.0)
- Finds references to
AllowSynchronousIOwhich indicates synchronous IO usage that is disabled by default in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_0.FindUseMvc
- Find
UseMvc/AddMvcusage (replaced in ASP.NET Core 3.0) - Finds usages of
app.UseMvc(),app.UseMvcWithDefaultRoute(), andservices.AddMvc()which should be migrated to endpoint routing and more specific service registration in ASP.NET Core 3.0.
- Find
- OpenRewrite.Recipes.Net3_0.FindWebApiCompatShim
- Find Web API compatibility shim usage (removed in ASP.NET Core 3.0)
- Finds usages of
ApiController,HttpResponseMessage, and other types fromMicrosoft.AspNetCore.Mvc.WebApiCompatShimwhich was removed in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_0.FindWebHostBuilder
- Find
WebHostBuilder/WebHost.CreateDefaultBuilderusage (replaced in ASP.NET Core 3.0) - Finds usages of
WebHost.CreateDefaultBuilder()andnew WebHostBuilder()which should be migrated toHost.CreateDefaultBuilder()withConfigureWebHostDefaults()in ASP.NET Core 3.0.
- Find
- OpenRewrite.Recipes.Net3_0.UpgradeToDotNet3_0
- Migrate to .NET Core 3.0
- Migrate C# projects from .NET Core 2.x to .NET Core 3.0, applying necessary API changes for removed and replaced types. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/3.0.
- OpenRewrite.Recipes.Net3_0.UseApiControllerBase
- Migrate ApiController to ControllerBase
- Replace
ApiControllerbase class (from the removed WebApiCompatShim) withControllerBaseand add the[ApiController]attribute. The shim was removed in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_1.FindSameSiteNone
- Find
SameSiteMode.Noneusage (behavior changed in .NET Core 3.1) - Finds usages of
SameSiteMode.Nonewhich changed behavior in .NET Core 3.1 due to Chrome 80 SameSite cookie changes. Apps using remote authentication may need browser sniffing.
- Find
- OpenRewrite.Recipes.Net3_1.UpgradeToDotNet3_1
- Migrate to .NET Core 3.1
- Migrate C# projects from .NET Core 3.0 to .NET Core 3.1. Includes all .NET Core 3.0 migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/3.1.
- OpenRewrite.Recipes.Net5.FindCodeAccessSecurity
- Find Code Access Security usage (obsolete in .NET 5)
- Finds usages of Code Access Security types (
SecurityPermission,PermissionSet, etc.) which are obsolete in .NET 5+.
- OpenRewrite.Recipes.Net5.FindPrincipalPermissionAttribute
- Find
PrincipalPermissionAttributeusage (SYSLIB0003) - Finds usages of
PrincipalPermissionAttributewhich is obsolete in .NET 5+ (SYSLIB0003) and throwsNotSupportedExceptionat runtime.
- Find
- OpenRewrite.Recipes.Net5.FindUtf7Encoding
- Find
Encoding.UTF7usage (SYSLIB0001) - Finds usages of
Encoding.UTF7andUTF7Encodingwhich are obsolete in .NET 5+ (SYSLIB0001). UTF-7 is insecure.
- Find
- OpenRewrite.Recipes.Net5.FindWinHttpHandler
- Find
WinHttpHandlerusage (removed in .NET 5) - Finds usages of
WinHttpHandlerwhich was removed from the .NET 5 runtime. Install theSystem.Net.Http.WinHttpHandlerNuGet package explicitly.
- Find
- OpenRewrite.Recipes.Net5.FindWinRTInterop
- Find WinRT interop usage (removed in .NET 5)
- Finds usages of WinRT interop types (
WindowsRuntimeType,WindowsRuntimeMarshal, etc.) which were removed in .NET 5.
- OpenRewrite.Recipes.Net5.UpgradeToDotNet5
- Migrate to .NET 5
- Migrate C# projects from .NET Core 3.1 to .NET 5.0. Includes all .NET Core 3.0 and 3.1 migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/5.0.
- OpenRewrite.Recipes.Net6.FindAssemblyCodeBase
- Find
Assembly.CodeBase/EscapedCodeBaseusage (SYSLIB0012) - Finds usages of
Assembly.CodeBaseandAssembly.EscapedCodeBasewhich are obsolete (SYSLIB0012). UseAssembly.Locationinstead.
- Find
- OpenRewrite.Recipes.Net6.FindIgnoreNullValues
- Find
JsonSerializerOptions.IgnoreNullValuesusage (SYSLIB0020) - Finds usages of
JsonSerializerOptions.IgnoreNullValueswhich is obsolete in .NET 6 (SYSLIB0020). UseDefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNullinstead.
- Find
- OpenRewrite.Recipes.Net6.FindThreadAbort
- Find
Thread.Abortusage (SYSLIB0006) - Finds calls to
Thread.Abort()which throwsPlatformNotSupportedExceptionin .NET 6+ (SYSLIB0006). UseCancellationTokenfor cooperative cancellation instead.
- Find
- OpenRewrite.Recipes.Net6.FindWebRequest
- Find
WebRequest/HttpWebRequest/WebClientusage (SYSLIB0014) - Finds usages of
WebRequest,HttpWebRequest, andWebClientwhich are obsolete in .NET 6 (SYSLIB0014). UseHttpClientinstead.
- Find
- OpenRewrite.Recipes.Net6.FindX509PrivateKey
- Find
X509Certificate2.PrivateKeyusage (SYSLIB0028) - Finds usages of
X509Certificate2.PrivateKeywhich is obsolete (SYSLIB0028). UseGetRSAPrivateKey(),GetECDsaPrivateKey(), or the appropriate algorithm-specific method instead.
- Find
- OpenRewrite.Recipes.Net6.UpgradeToDotNet6
- Migrate to .NET 6
- Migrate C# projects to .NET 6, applying necessary API changes for obsoleted cryptographic types and other breaking changes. Includes all .NET Core 3.0, 3.1, and .NET 5 migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/6.0.
- OpenRewrite.Recipes.Net6.UseEnvironmentCurrentManagedThreadId
- Use Environment.CurrentManagedThreadId
- Replace
Thread.CurrentThread.ManagedThreadIdwithEnvironment.CurrentManagedThreadId(CA1840). Available since .NET 6.
- OpenRewrite.Recipes.Net6.UseEnvironmentProcessId
- Use Environment.ProcessId
- Replace
Process.GetCurrentProcess().IdwithEnvironment.ProcessId(CA1837). Available since .NET 6.
- OpenRewrite.Recipes.Net6.UseEnvironmentProcessPath
- Use Environment.ProcessPath
- Replace
Process.GetCurrentProcess().MainModule.FileNamewithEnvironment.ProcessPath(CA1839). Available since .NET 6.
- OpenRewrite.Recipes.Net6.UseLinqDistinctBy
- Use LINQ DistinctBy()
- Replace
collection.GroupBy(selector).Select(g => g.First())withcollection.DistinctBy(selector). Available since .NET 6.
- OpenRewrite.Recipes.Net6.UseLinqMaxMinBy
- Use LINQ MaxBy() and MinBy()
- Replace
collection.OrderByDescending(selector).First()withcollection.MaxBy(selector)andcollection.OrderBy(selector).First()withcollection.MinBy(selector). Also handles.Last()variants (OrderBy().Last() → MaxBy, OrderByDescending().Last() → MinBy). Note: MinBy/MaxBy return default for empty reference-type sequences instead of throwing. Available since .NET 6.
- OpenRewrite.Recipes.Net6.UseRandomShared
- Use Random.Shared
- Replace
new Random().Method(...)withRandom.Shared.Method(...). Available since .NET 6.
- OpenRewrite.Recipes.Net6.UseStringContainsChar
- Use string.Contains(char) overload
- Finds calls to
string.Contains("x")with a single-character string literal that could use thestring.Contains('x')overload for better performance.
- OpenRewrite.Recipes.Net6.UseStringStartsEndsWithChar
- Use string.StartsWith(char)/EndsWith(char) overload
- Finds calls to
string.StartsWith("x")andstring.EndsWith("x")with a single-character string literal that could use the char overload for better performance.
- OpenRewrite.Recipes.Net6.UseThrowIfNull
- Use ArgumentNullException.ThrowIfNull()
- Replace
if (x == null) throw new ArgumentNullException(nameof(x))guard clauses withArgumentNullException.ThrowIfNull(x)(CA1510). Handles== null,is null, reversednull ==, string literal param names, and braced then-blocks. Available since .NET 6.
- OpenRewrite.Recipes.Net7.FindObsoleteSslProtocols
- Find obsolete
SslProtocols.Tls/Tls11usage (SYSLIB0039) - Finds usages of
SslProtocols.TlsandSslProtocols.Tls11which are obsolete in .NET 7 (SYSLIB0039). UseSslProtocols.Tls12,SslProtocols.Tls13, orSslProtocols.Noneinstead.
- Find obsolete
- OpenRewrite.Recipes.Net7.FindRfc2898InsecureCtors
- Find insecure
Rfc2898DeriveBytesconstructors (SYSLIB0041) - Finds
Rfc2898DeriveBytesconstructor calls that use default SHA1 or low iteration counts, which are obsolete in .NET 7 (SYSLIB0041). SpecifyHashAlgorithmNameand at least 600,000 iterations.
- Find insecure
- OpenRewrite.Recipes.Net7.UpgradeToDotNet7
- Migrate to .NET 7
- Migrate C# projects to .NET 7, applying necessary API changes. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/7.0.
- OpenRewrite.Recipes.Net7.UseLinqOrder
- Use LINQ Order() and OrderDescending()
- Replace
collection.OrderBy(x => x)withcollection.Order()andcollection.OrderByDescending(x => x)withcollection.OrderDescending(). Available since .NET 7.
- OpenRewrite.Recipes.Net7.UseThrowIfNegative
- Use ArgumentOutOfRangeException.ThrowIfNegative()
- Replace
if (value < 0) throw new ArgumentOutOfRangeException(nameof(value))guard clauses withArgumentOutOfRangeException.ThrowIfNegative(value). Also handles reversed0 > value. Available since .NET 7.
- OpenRewrite.Recipes.Net7.UseThrowIfNegativeOrZero
- Use ArgumentOutOfRangeException.ThrowIfNegativeOrZero()
- Replace
if (value <= 0) throw new ArgumentOutOfRangeException(nameof(value))guard clauses withArgumentOutOfRangeException.ThrowIfNegativeOrZero(value). Also handles reversed0 >= value. Available since .NET 7.
- OpenRewrite.Recipes.Net7.UseThrowIfNullOrEmpty
- Use ArgumentException.ThrowIfNullOrEmpty()
- Replace
if (string.IsNullOrEmpty(s)) throw new ArgumentException("...", nameof(s))guard clauses withArgumentException.ThrowIfNullOrEmpty(s). Available since .NET 7.
- OpenRewrite.Recipes.Net8.FindAddContext
- Find
JsonSerializerOptions.AddContextusage (SYSLIB0049) - Finds calls to
JsonSerializerOptions.AddContext<T>()which is obsolete in .NET 8 (SYSLIB0049). UseTypeInfoResolverChainorTypeInfoResolverinstead.
- Find
- OpenRewrite.Recipes.Net8.FindAesGcmOldConstructor
- Find
AesGcmconstructor without tag size (SYSLIB0053) - Finds
new AesGcm(key)constructor calls without an explicit tag size parameter. In .NET 8, the single-argument constructor is obsolete (SYSLIB0053). Usenew AesGcm(key, tagSizeInBytes)instead.
- Find
- OpenRewrite.Recipes.Net8.FindFormatterBasedSerialization
- Find formatter-based serialization types (SYSLIB0050/0051)
- Finds usage of formatter-based serialization types (
FormatterConverter,IFormatter,ObjectIDGenerator,ObjectManager,SurrogateSelector,SerializationInfo,StreamingContext). These are obsolete in .NET 8 (SYSLIB0050/0051).
- OpenRewrite.Recipes.Net8.FindFrozenCollection
- Find ToImmutable() that could use Frozen collections*
- Finds usages of
ToImmutableDictionary()andToImmutableHashSet(). In .NET 8+,ToFrozenDictionary()andToFrozenSet()provide better read performance.
- OpenRewrite.Recipes.Net8.FindRegexCompileToAssembly
- Find
Regex.CompileToAssemblyusage (SYSLIB0052) - Finds usage of
Regex.CompileToAssembly()andRegexCompilationInfo. These are obsolete in .NET 8 (SYSLIB0052). Use the Regex source generator instead.
- Find
- OpenRewrite.Recipes.Net8.FindSerializationConstructors
- Find legacy serialization constructors (SYSLIB0051)
- Finds legacy serialization constructors
.ctor(SerializationInfo, StreamingContext)which are obsolete in .NET 8 (SYSLIB0051). TheISerializablepattern is no longer recommended.
- OpenRewrite.Recipes.Net8.FindTimeAbstraction
- Find DateTime.Now/UtcNow usage (TimeProvider in .NET 8)
- Finds usages of
DateTime.Now,DateTime.UtcNow,DateTimeOffset.Now, andDateTimeOffset.UtcNow. In .NET 8+,TimeProvideris the recommended abstraction for time.
- OpenRewrite.Recipes.Net8.UpgradeToDotNet8
- Migrate to .NET 8
- Migrate C# projects to .NET 8, applying necessary API changes. Includes all .NET 7 migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/8.0.
- OpenRewrite.Recipes.Net8.UseThrowIfGreaterThan
- Use ArgumentOutOfRangeException.ThrowIfGreaterThan()
- Replace
if (value > other) throw new ArgumentOutOfRangeException(nameof(value))guard clauses withArgumentOutOfRangeException.ThrowIfGreaterThan(value, other). Also handles reversedother < valueand>=/ThrowIfGreaterThanOrEqual. Available since .NET 8.
- OpenRewrite.Recipes.Net8.UseThrowIfLessThan
- Use ArgumentOutOfRangeException.ThrowIfLessThan()
- Replace
if (value < other) throw new ArgumentOutOfRangeException(nameof(value))guard clauses withArgumentOutOfRangeException.ThrowIfLessThan(value, other). Also handles reversedother > valueand<=/ThrowIfLessThanOrEqual. Available since .NET 8.
- OpenRewrite.Recipes.Net8.UseThrowIfNullOrWhiteSpace
- Use ArgumentException.ThrowIfNullOrWhiteSpace()
- Replace
if (string.IsNullOrWhiteSpace(s)) throw new ArgumentException("...", nameof(s))guard clauses withArgumentException.ThrowIfNullOrWhiteSpace(s). Available since .NET 8.
- OpenRewrite.Recipes.Net8.UseThrowIfZero
- Use ArgumentOutOfRangeException.ThrowIfZero()
- Replace
if (value == 0) throw new ArgumentOutOfRangeException(nameof(value))guard clauses withArgumentOutOfRangeException.ThrowIfZero(value). Also handles reversed0 == value. Available since .NET 8.
- OpenRewrite.Recipes.Net8.UseTimeProvider
- Use TimeProvider instead of DateTime/DateTimeOffset static properties
- Replace
DateTime.UtcNow,DateTime.Now,DateTimeOffset.UtcNow, andDateTimeOffset.NowwithTimeProvider.System.GetUtcNow()/GetLocalNow()equivalents. TimeProvider enables testability and consistent time sources. Available since .NET 8.
- OpenRewrite.Recipes.Net9.FindAuthenticationManager
- Find
AuthenticationManagerusage (SYSLIB0009) - Finds usages of
AuthenticationManagerwhich is not supported in .NET 9 (SYSLIB0009). Methods will no-op or throwPlatformNotSupportedException.
- Find
- OpenRewrite.Recipes.Net9.FindBinaryFormatter
- Find
BinaryFormatterusage (removed in .NET 9) - Finds usages of
BinaryFormatterwhich always throwsNotSupportedExceptionin .NET 9. Migrate to a different serializer such asSystem.Text.Json,XmlSerializer, orDataContractSerializer.
- Find
- OpenRewrite.Recipes.Net9.FindBinaryReaderReadString
- Find
BinaryReader.ReadStringbehavior change - Finds calls to
BinaryReader.ReadString()which now returns the Unicode replacement character (\uFFFD) for malformed UTF-8 byte sequences in .NET 9, instead of the previous behavior. Verify your code handles the replacement character correctly.
- Find
- OpenRewrite.Recipes.Net9.FindDistributedCache
- Find IDistributedCache usage (HybridCache in .NET 9)
- Finds usages of
IDistributedCache. In .NET 9,HybridCacheis the recommended replacement with L1/L2 caching, stampede protection, and tag-based invalidation.
- OpenRewrite.Recipes.Net9.FindEnumConverter
- Find
EnumConverterconstructor validation change - Finds
new EnumConverter()constructor calls. In .NET 9,EnumConvertervalidates that the registered type is actually an enum and throwsArgumentExceptionif not.
- Find
- OpenRewrite.Recipes.Net9.FindExecuteUpdateSync
- Find synchronous ExecuteUpdate/ExecuteDelete (EF Core 9)
- Finds usages of synchronous
ExecuteUpdate()andExecuteDelete()which were removed in EF Core 9. UseExecuteUpdateAsync/ExecuteDeleteAsyncinstead.
- OpenRewrite.Recipes.Net9.FindHttpClientHandlerCast
- Find
HttpClientHandlerusage (HttpClientFactory default change) - Finds usages of
HttpClientHandlerwhich may break whenHttpClientFactoryswitches its default handler toSocketsHttpHandlerin .NET 9.
- Find
- OpenRewrite.Recipes.Net9.FindHttpListenerRequestUserAgent
- Find
HttpListenerRequest.UserAgentnullable change - Finds accesses to
HttpListenerRequest.UserAgentwhich changed fromstringtostring?in .NET 9. Code that assumesUserAgentis non-null may throwNullReferenceException.
- Find
- OpenRewrite.Recipes.Net9.FindImplicitAuthenticationDefault
- Find implicit authentication default scheme (ASP.NET Core 9)
- Finds calls to
AddAuthentication()with no arguments. In .NET 9, a single registered authentication scheme is no longer automatically used as the default.
- OpenRewrite.Recipes.Net9.FindInMemoryDirectoryInfo
- Find
InMemoryDirectoryInforootDir prepend change - Finds
new InMemoryDirectoryInfo()constructor calls. In .NET 9,rootDiris prepended to file paths that don't start with therootDir, which may change file matching behavior.
- Find
- OpenRewrite.Recipes.Net9.FindIncrementingPollingCounter
- Find
IncrementingPollingCounterasync callback change - Finds
new IncrementingPollingCounter()constructor calls. In .NET 9, the initial callback invocation is asynchronous instead of synchronous, which may change timing behavior.
- Find
- OpenRewrite.Recipes.Net9.FindJsonDocumentNullable
- Find
JsonSerializer.DeserializenullableJsonDocumentchange - Finds
JsonSerializer.Deserialize()calls. In .NET 9, nullableJsonDocumentproperties now deserialize to aJsonDocumentwithRootElement.ValueKind == JsonValueKind.Nullinstead of beingnull.
- Find
- OpenRewrite.Recipes.Net9.FindJsonStringEnumConverter
- Find non-generic JsonStringEnumConverter
- Finds usages of the non-generic
JsonStringEnumConverter. In .NET 9, the genericJsonStringEnumConverter<TEnum>is preferred for AOT compatibility.
- OpenRewrite.Recipes.Net9.FindRuntimeHelpersGetSubArray
- Find
RuntimeHelpers.GetSubArrayreturn type change - Finds calls to
RuntimeHelpers.GetSubArray()which may return a different array type in .NET 9. Code that depends on the runtime type of the returned array may break.
- Find
- OpenRewrite.Recipes.Net9.FindSafeEvpPKeyHandleDuplicate
- Find
SafeEvpPKeyHandle.DuplicateHandleup-ref change - Finds calls to
SafeEvpPKeyHandle.DuplicateHandle(). In .NET 9, this method now increments the reference count instead of creating a deep copy, which may affect handle lifetime.
- Find
- OpenRewrite.Recipes.Net9.FindServicePointManager
- Find
ServicePointManagerusage (SYSLIB0014) - Finds usages of
ServicePointManagerwhich is fully obsolete in .NET 9 (SYSLIB0014). Settings onServicePointManagerdon't affectSslStreamorHttpClient.
- Find
- OpenRewrite.Recipes.Net9.FindSwashbuckle
- Find Swashbuckle usage (ASP.NET Core 9 built-in OpenAPI)
- Finds usages of Swashbuckle APIs (
AddSwaggerGen,UseSwagger,UseSwaggerUI). .NET 9 includes built-in OpenAPI support. Consider migrating toAddOpenApi()/MapOpenApi().
- OpenRewrite.Recipes.Net9.FindX509CertificateConstructors
- Find obsolete
X509Certificate2/X509Certificateconstructors (SYSLIB0057) - Finds usages of
X509Certificate2andX509Certificateconstructors that accept binary content or file paths, which are obsolete in .NET 9 (SYSLIB0057). UseX509CertificateLoadermethods instead.
- Find obsolete
- OpenRewrite.Recipes.Net9.FindZipArchiveCompressionLevel
- Find
ZipArchive.CreateEntrywithCompressionLevel(bit flag change) - Finds
ZipArchive.CreateEntry()andZipFileExtensions.CreateEntryFromFile()calls with aCompressionLevelparameter. In .NET 9, theCompressionLevelvalue now sets general-purpose bit flags in the ZIP central directory header, which may affect interoperability.
- Find
- OpenRewrite.Recipes.Net9.FindZipArchiveEntryEncoding
- Find
ZipArchiveEntryname/comment UTF-8 encoding change - Finds access to
ZipArchiveEntry.Name,FullName, orCommentproperties. In .NET 9, these now respect the UTF-8 flag in ZIP entries, which may change decoded values.
- Find
- OpenRewrite.Recipes.Net9.MigrateSwashbuckleToOpenApi
- Migrate Swashbuckle to built-in OpenAPI
- Migrate from Swashbuckle to the built-in OpenAPI support in ASP.NET Core 9. Replaces
AddSwaggerGen()withAddOpenApi(),UseSwaggerUI()withMapOpenApi(), removesUseSwagger(), removes Swashbuckle packages, and addsMicrosoft.AspNetCore.OpenApi.
- OpenRewrite.Recipes.Net9.RemoveConfigureAwaitFalse
- Remove ConfigureAwait(false)
- Remove
.ConfigureAwait(false)calls that are unnecessary in ASP.NET Core and modern .NET applications (no SynchronizationContext). Do not apply to library code targeting .NET Framework.
- OpenRewrite.Recipes.Net9.UpgradeToDotNet9
- Migrate to .NET 9
- Migrate C# projects to .NET 9, applying necessary API changes. Includes all .NET 7 and .NET 8 migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/9.0.
- OpenRewrite.Recipes.Net9.UseEscapeSequenceE
- Use \e escape sequence
- Replace
\u001band\x1bescape sequences with\e. C# 13 introduced\eas a dedicated escape sequence for the escape character (U+001B).
- OpenRewrite.Recipes.Net9.UseFrozenCollections
- Use Frozen collections instead of Immutable
- Replace
ToImmutableDictionary()withToFrozenDictionary()andToImmutableHashSet()withToFrozenSet(). Frozen collections (.NET 8+) provide better read performance for collections populated once and read many times.
- OpenRewrite.Recipes.Net9.UseGuidCreateVersion7
- Use Guid.CreateVersion7()
- Replace
Guid.NewGuid()withGuid.CreateVersion7(). Version 7 GUIDs are time-ordered and better for database primary keys, indexing, and sorting. Available since .NET 9.
- OpenRewrite.Recipes.Net9.UseLinqAggregateBy
- Use LINQ AggregateBy()
- Replace
collection.GroupBy(keySelector).ToDictionary(g => g.Key, g => g.Aggregate(seed, func))withcollection.AggregateBy(keySelector, seed, func).ToDictionary(). Available since .NET 9.
- OpenRewrite.Recipes.Net9.UseLinqCountBy
- Use LINQ CountBy()
- Replace
collection.GroupBy(selector).Select(g => g.Count())withcollection.CountBy(selector). Available since .NET 9.
- OpenRewrite.Recipes.Net9.UseLinqIndex
- Use LINQ Index()
- Replace
collection.Select((item, index) => (index, item))withcollection.Index(). Available since .NET 9.
- OpenRewrite.Recipes.Net9.UseLockObject
- Use System.Threading.Lock for lock fields
- Replace
objectfields initialized withnew object()withSystem.Threading.Lockinitialized withnew(). The Lock type provides better performance with the lock statement. Available since .NET 9.
- OpenRewrite.Recipes.Net9.UseMapStaticAssets
- Use MapStaticAssets()
- Replace
UseStaticFiles()withMapStaticAssets()for ASP.NET Core 9. Only applies when the receiver supportsIEndpointRouteBuilder(WebApplication / minimal hosting). Skips Startup.cs patterns usingIApplicationBuilderwhereMapStaticAssetsis not available.
- OpenRewrite.Recipes.Net9.UseTaskCompletedTask
- Use Task.CompletedTask
- Replace
Task.FromResult(0),Task.FromResult(true), andTask.FromResult(false)withTask.CompletedTaskwhen the return type isTask(notTask<T>).
- OpenRewrite.Recipes.Net9.UseVolatileReadWrite
- Use Volatile.Read/Write (SYSLIB0054)
- Replace
Thread.VolatileReadandThread.VolatileWritewithVolatile.ReadandVolatile.Write. The Thread methods are obsolete in .NET 9 (SYSLIB0054).
- OpenRewrite.Recipes.Net9.UseX509CertificateLoader
- Use X509CertificateLoader (SYSLIB0057)
- Replace
new X509Certificate2(path, password)withX509CertificateLoader.LoadPkcs12FromFile(path, password). The two-argument X509Certificate2 constructor is obsolete in .NET 9 (SYSLIB0057).
dropwizard
1 recipe
- org.openrewrite.java.spring.boot3.MigrateDropWizardDependencies
- Migrate dropWizard dependencies to Spring Boot 3.x
- Migrate dropWizard dependencies to the new artifactId, since these are changed with Spring Boot 3.
easymock
1 recipe
- org.openrewrite.java.testing.easymock.EasyMockToMockito
- Migrate from EasyMock to Mockito
- This recipe will apply changes commonly needed when migrating from EasyMock to Mockito.
efcore
1 recipe
- OpenRewrite.Recipes.Net9.FindExecuteUpdateSync
- Find synchronous ExecuteUpdate/ExecuteDelete (EF Core 9)
- Finds usages of synchronous
ExecuteUpdate()andExecuteDelete()which were removed in EF Core 9. UseExecuteUpdateAsync/ExecuteDeleteAsyncinstead.
ejb
7 recipes
- com.oracle.weblogic.rewrite.WebLogicEjbJar32XmlNamespace1412
- Migrate xmlns entries in
weblogic-ejb-jar.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic EJB 3.2 schema files to WebLogic 14.1.2
- Tags: ejb-3.2, ejb-jar
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicEjbJar32XmlNamespace1511
- Migrate xmlns entries in
weblogic-ejb-jar.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-ejb-jar.xmlfiles to WebLogic 15.1.1 - Tags: ejb-jar
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicPersistenceConfigurationXmlNamespace1412
- Migrate xmlns entries in
persistence-configuration.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic EJB 3.2 Persistence Configuration schema files to WebLogic 14.1.2
- Tags: ejb-3.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicRdbmsJarXmlNamespace1412
- Migrate xmlns entries in
weblogic-rdbms-jar.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic EJB 3.2 RDBMS schema files to WebLogic 14.1.2
- Tags: ejb-3.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxEjbJarXmlToJakarta9EjbJarXml
- Migrate xmlns entries in
ejb-jar.xmlfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JavaxBeanValidationXmlToJakartaBeanValidationXml
- Migrate xmlns entries and javax. packages in
validation.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries and javax. packages in
- org.openrewrite.java.migrate.jakarta.JavaxEjbJarXmlToJakartaEjbJarXml
- Migrate xmlns entries and javax. packages in
ejb-jar.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries and javax. packages in
elasticsearch
11 recipes
- io.moderne.elastic.elastic9.ChangeApiNumericFieldTypes
- Change numeric field types for Elasticsearch 9
- Handles changes between different numeric types (
LongtoInteger,inttoLong...) in Elasticsearch 9 API responses by adding appropriate conversion methods with null checks.
- io.moderne.elastic.elastic9.MigrateDenseVectorElementType
- Migrate DenseVectorProperty.elementType from String to DenseVectorElementType enum
- In Elasticsearch 9,
DenseVectorProperty.elementType()returnsDenseVectorElementTypeenum instead ofString, and the builder methodelementType(String)now accepts the enum type. This recipe handles both builder calls and getter calls.
- io.moderne.elastic.elastic9.MigrateDenseVectorSimilarity
- Migrate DenseVectorProperty.similarity from String to DenseVectorSimilarity enum
- In Elasticsearch 9,
DenseVectorProperty.similarity()returnsDenseVectorSimilarityenum instead ofString, and the builder methodsimilarity(String)now accepts the enum type. This recipe handles both builder calls and getter calls.
- io.moderne.elastic.elastic9.MigrateMatchedQueries
- Migrate
matchedQueriesfrom List to Map - In Elasticsearch Java Client 9.0,
Hit.matchedQueries()changed from returningList<String>toMap<String, Double>. This recipe migrates the usage by adding.keySet()for iterations and usingnew ArrayList<>(result.keySet())for assignments.
- Migrate
- io.moderne.elastic.elastic9.MigrateScriptSource
- Migrate script source from String to Script/ScriptSource
- Migrates
Script.source(String)calls to useScriptSource.scriptString(String)wrapper in Elasticsearch Java client 9.x.
- io.moderne.elastic.elastic9.MigrateSpanTermQueryValue
- Migrate
SpanTermQuery.value()from String to FieldValue - In Elasticsearch 9,
SpanTermQuery.value()returns aFieldValueinstead ofString. This recipe updates calls to handle the new return type by checking if it's a string and extracting the string value.
- Migrate
- io.moderne.elastic.elastic9.MigrateToElasticsearch9
- Migrate from Elasticsearch 8 to 9
- This recipe performs a comprehensive migration from Elasticsearch 8 to Elasticsearch 9, addressing breaking changes, API removals, deprecations, and required code modifications.
- io.moderne.elastic.elastic9.RenameApiField
- Rename
Elasticsearch valueBody()methods - In Elasticsearch Java Client 9.0, the generic
valueBody()method andvalueBody(...)builder methods have been replaced with specific getter and setter methods that better reflect the type of data being returned. Similarly, forGetRepositoryResponse, theresultfield also got altered torepositories.
- Rename
- io.moderne.elastic.elastic9.RenameApiFields
- Rename API fields for Elasticsearch 9
- Renames various API response fields from
valueBodyto align with Elasticsearch 9 specifications.
- io.moderne.elastic.elastic9.UseNamedValueParameters
- Use NamedValue parameters instead of Map
- Migrates
indicesBoostanddynamicTemplatesparameters fromMaptoNamedValuein Elasticsearch Java client 9.x.
- org.openrewrite.quarkus.spring.SpringBootElasticsearchToQuarkus
- Replace Spring Boot Elasticsearch with Quarkus Elasticsearch REST Client
- Migrates
spring-boot-starter-data-elasticsearchtoquarkus-elasticsearch-rest-client.
epoll
1 recipe
- org.openrewrite.java.netty.EventLoopGroupToMultiThreadIoEventLoopGroupRecipes$EpollEventLoopGroupFactoryRecipe
- Replace
EpollEventLoopGroupwithMultiThreadIoEventLoopGroup - Replace
new EpollEventLoopGroup()withnew MultiThreadIoEventLoopGroup(EpollIoHandler.newFactory()).
- Replace
eslint
190 recipes
- org.openrewrite.codemods.cleanup.jest.ConsistentTestIt
- Enforce test and it usage conventions
- Enforce test and it usage conventions See rule details for jest/consistent-test-it.
- Tags: eslint-plugin-jest
- org.openrewrite.codemods.cleanup.jest.NoAliasMethods
- Disallow alias methods
- Disallow alias methods See rule details for jest/no-alias-methods.
- Tags: eslint-plugin-jest
- org.openrewrite.codemods.cleanup.jest.NoDeprecatedFunctions27
- Disallow use of deprecated functions from before version 27
- Disallow use of deprecated functions from before version 27 See rule details for jest/no-deprecated-functions.
- Tags: eslint-plugin-jest
- org.openrewrite.codemods.cleanup.jest.NoJasmineGlobals
- Disallow Jasmine globals
- Disallow Jasmine globals See rule details for jest/no-jasmine-globals.
- Tags: eslint-plugin-jest
- org.openrewrite.codemods.cleanup.jest.NoTestPrefixes
- Require using .only and .skip over f and x
- Require using .only and .skip over f and x See rule details for jest/no-test-prefixes.
- Tags: eslint-plugin-jest
- org.openrewrite.codemods.cleanup.jest.NoUntypedMockFactory
- Disallow using jest.mock() factories without an explicit type parameter
- Disallow using jest.mock() factories without an explicit type parameter See rule details for jest/no-untyped-mock-factory.
- Tags: eslint-plugin-jest
- org.openrewrite.codemods.cleanup.jest.PreferComparisonMatcher
- Suggest using the built-in comparison matchers
- Suggest using the built-in comparison matchers See rule details for jest/prefer-comparison-matcher.
- Tags: eslint-plugin-jest
- org.openrewrite.codemods.cleanup.jest.PreferExpectResolves
- Prefer await expect(...).resolves over expect(await ...) syntax
- Prefer await expect(...).resolves over expect(await ...) syntax See rule details for jest/prefer-expect-resolves.
- Tags: eslint-plugin-jest
- org.openrewrite.codemods.cleanup.jest.PreferLowercaseTitle
- Enforce lowercase test names
- Enforce lowercase test names See rule details for jest/prefer-lowercase-title.
- Tags: eslint-plugin-jest
- org.openrewrite.codemods.cleanup.jest.PreferMockPromiseShorthand
- Prefer mock resolved/rejected shorthands for promises
- Prefer mock resolved/rejected shorthands for promises See rule details for jest/prefer-mock-promise-shorthand.
- Tags: eslint-plugin-jest
- org.openrewrite.codemods.cleanup.jest.PreferSpyOn
- Suggest using jest.spyOn()
- Suggest using jest.spyOn() See rule details for jest/prefer-spy-on.
- Tags: eslint-plugin-jest
- org.openrewrite.codemods.cleanup.jest.PreferToBe
- Suggest using toBe() for primitive literals
- Suggest using toBe() for primitive literals See rule details for jest/prefer-to-be.
- Tags: eslint-plugin-jest
- org.openrewrite.codemods.cleanup.jest.PreferToContain
- Suggest using toContain()
- Suggest using toContain() See rule details for jest/prefer-to-contain.
- Tags: eslint-plugin-jest
- org.openrewrite.codemods.cleanup.jest.PreferToHaveLength
- Suggest using toHaveLength()
- Suggest using toHaveLength() See rule details for jest/prefer-to-have-length.
- Tags: eslint-plugin-jest
- org.openrewrite.codemods.cleanup.jest.PreferTodo
- Suggest using test.todo
- Suggest using test.todo See rule details for jest/prefer-todo.
- Tags: eslint-plugin-jest
- org.openrewrite.codemods.cleanup.jest.RecommendedJestCodeCleanup
- Recommended Jest code cleanup
- Collection of cleanup ESLint rules that are recommended by eslint-plugin-jest.
- Tags: eslint-plugin-jest
- org.openrewrite.codemods.cleanup.jest.ValidTitle
- Enforce valid titles
- Enforce valid titles See rule details for jest/valid-title.
- Tags: eslint-plugin-jest
- org.openrewrite.codemods.cleanup.storybook.AwaitInteractions
- Interactions should be awaited
- Interactions should be awaited See rule details for storybook/await-interactions.
- Tags: eslint-plugin-storybook
- org.openrewrite.codemods.cleanup.storybook.DefaultExports
- Story files should have a default export
- Story files should have a default export See rule details for storybook/default-exports.
- Tags: eslint-plugin-storybook
- org.openrewrite.codemods.cleanup.storybook.HierarchySeparator
- Deprecated hierarchy separator in title property
- Deprecated hierarchy separator in title property See rule details for storybook/hierarchy-separator.
- Tags: eslint-plugin-storybook
- org.openrewrite.codemods.cleanup.storybook.NoRedundantStoryName
- A story should not have a redundant name property
- A story should not have a redundant name property See rule details for storybook/no-redundant-story-name.
- Tags: eslint-plugin-storybook
- org.openrewrite.codemods.cleanup.storybook.NoTitlePropertyInMeta
- Do not define a title in meta
- Do not define a title in meta See rule details for storybook/no-title-property-in-meta.
- Tags: eslint-plugin-storybook
- org.openrewrite.codemods.cleanup.storybook.PreferPascalCase
- Stories should use PascalCase
- Stories should use PascalCase See rule details for storybook/prefer-pascal-case.
- Tags: eslint-plugin-storybook
- org.openrewrite.codemods.cleanup.storybook.RecommendedStorybookCodeCleanup
- Recommended Storybook code cleanup
- Collection of cleanup ESLint rules from eslint-plugin-storybook.
- Tags: eslint-plugin-storybook
- org.openrewrite.codemods.cleanup.storybook.UseStorybookExpect
- Use expect from @storybook/jest
- Use expect from @storybook/jest See rule details for storybook/use-storybook-expect.
- Tags: eslint-plugin-storybook
- org.openrewrite.codemods.cleanup.storybook.UseStorybookTestingLibrary
- Do not use testing-library directly on stories
- Do not use testing-library directly on stories See rule details for storybook/use-storybook-testing-library.
- Tags: eslint-plugin-storybook
- org.openrewrite.codemods.cleanup.svelte.FirstAttributeLinebreak
- Enforce the location of first attribute
- Enforce the location of first attribute See rule details for svelte/first-attribute-linebreak.
- Tags: eslint-plugin-svelte
- org.openrewrite.codemods.cleanup.svelte.HtmlClosingBracketSpacing
- Require or disallow a space before tag's closing brackets
- Require or disallow a space before tag's closing brackets See rule details for svelte/html-closing-bracket-spacing.
- Tags: eslint-plugin-svelte
- org.openrewrite.codemods.cleanup.svelte.HtmlQuotes
- Enforce quotes style of HTML attributes
- Enforce quotes style of HTML attributes See rule details for svelte/html-quotes.
- Tags: eslint-plugin-svelte
- org.openrewrite.codemods.cleanup.svelte.HtmlSelfClosing
- Enforce self-closing style
- Enforce self-closing style See rule details for svelte/html-self-closing.
- Tags: eslint-plugin-svelte
- org.openrewrite.codemods.cleanup.svelte.Indent
- Enforce consistent indentation
- Enforce consistent indentation See rule details for svelte/indent.
- Tags: eslint-plugin-svelte
- org.openrewrite.codemods.cleanup.svelte.MaxAttributesPerLine
- Enforce the maximum number of attributes per line
- Enforce the maximum number of attributes per line See rule details for svelte/max-attributes-per-line.
- Tags: eslint-plugin-svelte
- org.openrewrite.codemods.cleanup.svelte.MustacheSpacing
- Enforce unified spacing in mustache
- Enforce unified spacing in mustache See rule details for svelte/mustache-spacing.
- Tags: eslint-plugin-svelte
- org.openrewrite.codemods.cleanup.svelte.NoDynamicSlotName
- Disallow dynamic slot name
- Disallow dynamic slot name See rule details for svelte/no-dynamic-slot-name.
- Tags: eslint-plugin-svelte
- org.openrewrite.codemods.cleanup.svelte.NoSpacesAroundEqualSignsInAttribute
- Disallow spaces around equal signs in attribute
- Disallow spaces around equal signs in attribute See rule details for svelte/no-spaces-around-equal-signs-in-attribute.
- Tags: eslint-plugin-svelte
- org.openrewrite.codemods.cleanup.svelte.NoUselessMustaches
- Disallow unnecessary mustache interpolations
- Disallow unnecessary mustache interpolations See rule details for svelte/no-useless-mustaches.
- Tags: eslint-plugin-svelte
- org.openrewrite.codemods.cleanup.svelte.PreferClassDirective
- Require class directives instead of ternary expressions
- Require class directives instead of ternary expressions See rule details for svelte/prefer-class-directive.
- Tags: eslint-plugin-svelte
- org.openrewrite.codemods.cleanup.svelte.PreferStyleDirective
- Require style directives instead of style attribute
- Require style directives instead of style attribute See rule details for svelte/prefer-style-directive.
- Tags: eslint-plugin-svelte
- org.openrewrite.codemods.cleanup.svelte.RecommendedsvelteCodeCleanup
- Recommended svelte code cleanup
- Collection of cleanup ESLint rules from eslint-plugin-svelte.
- Tags: eslint-plugin-svelte
- org.openrewrite.codemods.cleanup.svelte.RequireStoreReactiveAccess
- Disallow to use of the store itself as an operand. Need to use $ prefix or get function
- Disallow to use of the store itself as an operand. Need to use $ prefix or get function. See rule details for svelte/require-store-reactive-access.
- Tags: eslint-plugin-svelte
- org.openrewrite.codemods.cleanup.svelte.ShorthandAttribute
- Enforce use of shorthand syntax in attribute
- Enforce use of shorthand syntax in attribute See rule details for svelte/shorthand-attribute.
- Tags: eslint-plugin-svelte
- org.openrewrite.codemods.cleanup.svelte.ShorthandDirective
- Enforce use of shorthand syntax in directives
- Enforce use of shorthand syntax in directives See rule details for svelte/shorthand-directive.
- Tags: eslint-plugin-svelte
- org.openrewrite.codemods.cleanup.svelte.SortAttributes
- Enforce order of attributes
- Enforce order of attributes See rule details for svelte/sort-attributes.
- Tags: eslint-plugin-svelte
- org.openrewrite.codemods.cleanup.svelte.SpacedHtmlComment
- Enforce consistent spacing after the <!-- and before the --> in a HTML comment
- Enforce consistent spacing after the <!-- and before the --> in a HTML comment See rule details for svelte/spaced-html-comment.
- Tags: eslint-plugin-svelte
- org.openrewrite.codemods.cleanup.vue.ArrayBracketNewline
- Enforce linebreaks after opening and before closing array brackets in
<template> - Enforce linebreaks after opening and before closing array brackets in
<template>See rule details for vue/array-bracket-newline. - Tags: eslint-plugin-vue
- Enforce linebreaks after opening and before closing array brackets in
- org.openrewrite.codemods.cleanup.vue.ArrayBracketSpacing
- Enforce consistent spacing inside array brackets in
<template> - Enforce consistent spacing inside array brackets in
<template>See rule details for vue/array-bracket-spacing. - Tags: eslint-plugin-vue
- Enforce consistent spacing inside array brackets in
- org.openrewrite.codemods.cleanup.vue.ArrayElementNewline
- Enforce line breaks after each array element in
<template> - Enforce line breaks after each array element in
<template>See rule details for vue/array-element-newline. - Tags: eslint-plugin-vue
- Enforce line breaks after each array element in
- org.openrewrite.codemods.cleanup.vue.ArrowSpacing
- Enforce consistent spacing before and after the arrow in arrow functions in
<template> - Enforce consistent spacing before and after the arrow in arrow functions in
<template>See rule details for vue/arrow-spacing. - Tags: eslint-plugin-vue
- Enforce consistent spacing before and after the arrow in arrow functions in
- org.openrewrite.codemods.cleanup.vue.AttributesOrder
- Enforce order of attributes
- Enforce order of attributes See rule details for vue/attributes-order.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.BlockOrder
- Enforce order of component top-level elements
- Enforce order of component top-level elements See rule details for vue/block-order.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.BlockSpacing
- Disallow or enforce spaces inside of blocks after opening block and before closing block in
<template> - Disallow or enforce spaces inside of blocks after opening block and before closing block in
<template>See rule details for vue/block-spacing. - Tags: eslint-plugin-vue
- Disallow or enforce spaces inside of blocks after opening block and before closing block in
- org.openrewrite.codemods.cleanup.vue.BlockTagNewline
- Enforce line breaks after opening and before closing block-level tags
- Enforce line breaks after opening and before closing block-level tags See rule details for vue/block-tag-newline.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.BraceStyle
- Enforce consistent brace style for blocks in
<template> - Enforce consistent brace style for blocks in
<template>See rule details for vue/brace-style. - Tags: eslint-plugin-vue
- Enforce consistent brace style for blocks in
- org.openrewrite.codemods.cleanup.vue.CommaDangle
- Require or disallow trailing commas in
<template> - Require or disallow trailing commas in
<template>See rule details for vue/comma-dangle. - Tags: eslint-plugin-vue
- Require or disallow trailing commas in
- org.openrewrite.codemods.cleanup.vue.CommaSpacing
- Enforce consistent spacing before and after commas in
<template> - Enforce consistent spacing before and after commas in
<template>See rule details for vue/comma-spacing. - Tags: eslint-plugin-vue
- Enforce consistent spacing before and after commas in
- org.openrewrite.codemods.cleanup.vue.CommaStyle
- Enforce consistent comma style in
<template> - Enforce consistent comma style in
<template>See rule details for vue/comma-style. - Tags: eslint-plugin-vue
- Enforce consistent comma style in
- org.openrewrite.codemods.cleanup.vue.ComponentNameInTemplateCasing
- Enforce specific casing for the component naming style in template
- Enforce specific casing for the component naming style in template See rule details for vue/component-name-in-template-casing.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.ComponentOptionsNameCasing
- Enforce the casing of component name in components options
- Enforce the casing of component name in components options See rule details for vue/component-options-name-casing.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.ComponentTagsOrder
- Enforce order of component top-level elements
- Enforce order of component top-level elements See rule details for vue/component-tags-order.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.DefineMacrosOrder
- Enforce order of defineEmits and defineProps compiler macros
- Enforce order of defineEmits and defineProps compiler macros See rule details for vue/define-macros-order.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.DotLocation
- Enforce consistent newlines before and after dots in
<template> - Enforce consistent newlines before and after dots in
<template>See rule details for vue/dot-location. - Tags: eslint-plugin-vue
- Enforce consistent newlines before and after dots in
- org.openrewrite.codemods.cleanup.vue.DotNotation
- Enforce dot notation whenever possible in
<template> - Enforce dot notation whenever possible in
<template>See rule details for vue/dot-notation. - Tags: eslint-plugin-vue
- Enforce dot notation whenever possible in
- org.openrewrite.codemods.cleanup.vue.Eqeqeq
- Require the use of === and !== in
<template> - Require the use of === and !== in
<template>See rule details for vue/eqeqeq. - Tags: eslint-plugin-vue
- Require the use of === and !== in
- org.openrewrite.codemods.cleanup.vue.FuncCallSpacing
- Require or disallow spacing between function identifiers and their invocations in
<template> - Require or disallow spacing between function identifiers and their invocations in
<template>See rule details for vue/func-call-spacing. - Tags: eslint-plugin-vue
- Require or disallow spacing between function identifiers and their invocations in
- org.openrewrite.codemods.cleanup.vue.HtmlCommentContentNewline
- Enforce unified line brake in HTML comments
- Enforce unified line brake in HTML comments See rule details for vue/html-comment-content-newline.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.HtmlCommentContentSpacing
- Enforce unified spacing in HTML comments
- Enforce unified spacing in HTML comments See rule details for vue/html-comment-content-spacing.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.HtmlCommentIndent
- Enforce consistent indentation in HTML comments
- Enforce consistent indentation in HTML comments See rule details for vue/html-comment-indent.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.KeySpacing
- Enforce consistent spacing between keys and values in object literal properties in
<template> - Enforce consistent spacing between keys and values in object literal properties in
<template>See rule details for vue/key-spacing. - Tags: eslint-plugin-vue
- Enforce consistent spacing between keys and values in object literal properties in
- org.openrewrite.codemods.cleanup.vue.KeywordSpacing
- Enforce consistent spacing before and after keywords in
<template> - Enforce consistent spacing before and after keywords in
<template>See rule details for vue/keyword-spacing. - Tags: eslint-plugin-vue
- Enforce consistent spacing before and after keywords in
- org.openrewrite.codemods.cleanup.vue.MultilineTernary
- Enforce newlines between operands of ternary expressions in
<template> - Enforce newlines between operands of ternary expressions in
<template>See rule details for vue/multiline-ternary. - Tags: eslint-plugin-vue
- Enforce newlines between operands of ternary expressions in
- org.openrewrite.codemods.cleanup.vue.NewLineBetweenMultiLineProperty
- Enforce new lines between multi-line properties in Vue components
- Enforce new lines between multi-line properties in Vue components See rule details for vue/new-line-between-multi-line-property.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.NextTickStyle
- Enforce Promise or callback style in nextTick
- Enforce Promise or callback style in nextTick See rule details for vue/next-tick-style.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.NoExtraParens
- Disallow unnecessary parentheses in
<template> - Disallow unnecessary parentheses in
<template>See rule details for vue/no-extra-parens. - Tags: eslint-plugin-vue
- Disallow unnecessary parentheses in
- org.openrewrite.codemods.cleanup.vue.NoRequiredPropWithDefault
- Enforce props with default values to be optional
- Enforce props with default values to be optional See rule details for vue/no-required-prop-with-default.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.NoUnsupportedFeatures
- Disallow unsupported Vue.js syntax on the specified version
- Disallow unsupported Vue.js syntax on the specified version See rule details for vue/no-unsupported-features.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.NoUselessMustaches
- Disallow unnecessary mustache interpolations
- Disallow unnecessary mustache interpolations See rule details for vue/no-useless-mustaches.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.NoUselessVBind
- Disallow unnecessary v-bind directives
- Disallow unnecessary v-bind directives See rule details for vue/no-useless-v-bind.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.ObjectCurlyNewline
- Enforce consistent line breaks after opening and before closing braces in
<template> - Enforce consistent line breaks after opening and before closing braces in
<template>See rule details for vue/object-curly-newline. - Tags: eslint-plugin-vue
- Enforce consistent line breaks after opening and before closing braces in
- org.openrewrite.codemods.cleanup.vue.ObjectCurlySpacing
- Enforce consistent spacing inside braces in
<template> - Enforce consistent spacing inside braces in
<template>See rule details for vue/object-curly-spacing. - Tags: eslint-plugin-vue
- Enforce consistent spacing inside braces in
- org.openrewrite.codemods.cleanup.vue.ObjectPropertyNewline
- Enforce placing object properties on separate lines in
<template> - Enforce placing object properties on separate lines in
<template>See rule details for vue/object-property-newline. - Tags: eslint-plugin-vue
- Enforce placing object properties on separate lines in
- org.openrewrite.codemods.cleanup.vue.ObjectShorthand
- Require or disallow method and property shorthand syntax for object literals in
<template> - Require or disallow method and property shorthand syntax for object literals in
<template>See rule details for vue/object-shorthand. - Tags: eslint-plugin-vue
- Require or disallow method and property shorthand syntax for object literals in
- org.openrewrite.codemods.cleanup.vue.OperatorLinebreak
- Enforce consistent linebreak style for operators in
<template> - Enforce consistent linebreak style for operators in
<template>See rule details for vue/operator-linebreak. - Tags: eslint-plugin-vue
- Enforce consistent linebreak style for operators in
- org.openrewrite.codemods.cleanup.vue.OrderInComponents
- Enforce order of properties in components
- Enforce order of properties in components See rule details for vue/order-in-components.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.PaddingLineBetweenBlocks
- Require or disallow padding lines between blocks
- Require or disallow padding lines between blocks See rule details for vue/padding-line-between-blocks.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.PaddingLineBetweenTags
- Require or disallow newlines between sibling tags in template
- Require or disallow newlines between sibling tags in template See rule details for vue/padding-line-between-tags.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.PaddingLinesInComponentDefinition
- Require or disallow padding lines in component definition
- Require or disallow padding lines in component definition See rule details for vue/padding-lines-in-component-definition.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.PreferDefineOptions
- Enforce use of defineOptions instead of default export
- Enforce use of defineOptions instead of default export. See rule details for vue/prefer-define-options.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.PreferSeparateStaticClass
- Require static class names in template to be in a separate class attribute
- Require static class names in template to be in a separate class attribute See rule details for vue/prefer-separate-static-class.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.PreferTemplate
- Require template literals instead of string concatenation in
<template> - Require template literals instead of string concatenation in
<template>See rule details for vue/prefer-template. - Tags: eslint-plugin-vue
- Require template literals instead of string concatenation in
- org.openrewrite.codemods.cleanup.vue.QuoteProps
- Require quotes around object literal property names in
<template> - Require quotes around object literal property names in
<template>See rule details for vue/quote-props. - Tags: eslint-plugin-vue
- Require quotes around object literal property names in
- org.openrewrite.codemods.cleanup.vue.RecommendedVueCodeCleanup
- Recommended vue code cleanup
- Collection of cleanup ESLint rules from eslint-plugin-vue.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.ScriptIndent
- Enforce consistent indentation in
<script> - Enforce consistent indentation in
<script>See rule details for vue/script-indent. - Tags: eslint-plugin-vue
- Enforce consistent indentation in
- org.openrewrite.codemods.cleanup.vue.SpaceInParens
- Enforce consistent spacing inside parentheses in
<template> - Enforce consistent spacing inside parentheses in
<template>See rule details for vue/space-in-parens. - Tags: eslint-plugin-vue
- Enforce consistent spacing inside parentheses in
- org.openrewrite.codemods.cleanup.vue.SpaceInfixOps
- Require spacing around infix operators in
<template> - Require spacing around infix operators in
<template>See rule details for vue/space-infix-ops. - Tags: eslint-plugin-vue
- Require spacing around infix operators in
- org.openrewrite.codemods.cleanup.vue.SpaceUnaryOps
- Enforce consistent spacing before or after unary operators in
<template> - Enforce consistent spacing before or after unary operators in
<template>See rule details for vue/space-unary-ops. - Tags: eslint-plugin-vue
- Enforce consistent spacing before or after unary operators in
- org.openrewrite.codemods.cleanup.vue.StaticClassNamesOrder
- Enforce static class names order
- Enforce static class names order See rule details for vue/static-class-names-order.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.TemplateCurlySpacing
- Require or disallow spacing around embedded expressions of template strings in
<template> - Require or disallow spacing around embedded expressions of template strings in
<template>See rule details for vue/template-curly-spacing. - Tags: eslint-plugin-vue
- Require or disallow spacing around embedded expressions of template strings in
- org.openrewrite.codemods.cleanup.vue.ThisInTemplate
- Disallow usage of this in template
- Disallow usage of this in template See rule details for vue/this-in-template.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.VForDelimiterStyle
- Enforce v-for directive's delimiter style
- Enforce v-for directive's delimiter style See rule details for vue/v-for-delimiter-style.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.VIfElseKey
- Require key attribute for conditionally rendered repeated components
- Require key attribute for conditionally rendered repeated components See rule details for vue/v-if-else-key.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.cleanup.vue.VOnHandlerStyle
- Enforce writing style for handlers in v-on directives
- Enforce writing style for handlers in v-on directives See rule details for vue/v-on-handler-style.
- Tags: eslint-plugin-vue
- org.openrewrite.codemods.ecmascript.ESLintTypeScriptDefaults
- Lint TypeScript code using ESLint
- The default config includes the
@typescript-eslintplugin and the correspondingplugin:@typescript-eslint/recommendedextend.
- org.openrewrite.codemods.ecmascript.ESLintTypeScriptPrettier
- Format TypeScript using ESLint Prettier plugin
- Formats all TypeScript source code using the ESLint Prettier plugin.
- org.openrewrite.codemods.format.ArrayBracketNewline
- Enforce linebreaks after opening and before closing array brackets
- Enforce linebreaks after opening and before closing array brackets See rule details.
- org.openrewrite.codemods.format.ArrayBracketSpacing
- Enforce consistent spacing inside array brackets
- Enforce consistent spacing inside array brackets See rule details.
- org.openrewrite.codemods.format.ArrayElementNewline
- Enforce line breaks after each array element
- Enforce line breaks after each array element See rule details.
- org.openrewrite.codemods.format.ArrowParens
- Require parentheses around arrow function arguments
- Require parentheses around arrow function arguments See rule details.
- org.openrewrite.codemods.format.ArrowSpacing
- Enforce consistent spacing before and after the arrow in arrow functions
- Enforce consistent spacing before and after the arrow in arrow functions See rule details.
- org.openrewrite.codemods.format.BlockSpacing
- Disallow or enforce spaces inside of blocks after opening block and before closing block
- Disallow or enforce spaces inside of blocks after opening block and before closing block See rule details.
- org.openrewrite.codemods.format.BraceStyle
- Enforce consistent brace style for blocks
- Enforce consistent brace style for blocks See rule details.
- org.openrewrite.codemods.format.CommaDangle
- Require or disallow trailing commas
- Require or disallow trailing commas See rule details.
- org.openrewrite.codemods.format.CommaSpacing
- Enforce consistent spacing before and after commas
- Enforce consistent spacing before and after commas See rule details.
- org.openrewrite.codemods.format.CommaStyle
- Enforce consistent comma style
- Enforce consistent comma style See rule details.
- org.openrewrite.codemods.format.ComputedPropertySpacing
- Enforce consistent spacing inside computed property brackets
- Enforce consistent spacing inside computed property brackets See rule details.
- org.openrewrite.codemods.format.DotLocation
- Enforce consistent newlines before and after dots
- Enforce consistent newlines before and after dots See rule details.
- org.openrewrite.codemods.format.EolLast
- Require or disallow newline at the end of files
- Require or disallow newline at the end of files See rule details.
- org.openrewrite.codemods.format.FuncCallSpacing
- Require or disallow spacing between function identifiers and their invocations. Alias of `function-call-spacing`
- Require or disallow spacing between function identifiers and their invocations. Alias of `function-call-spacing`. See rule details.
- org.openrewrite.codemods.format.FunctionCallArgumentNewline
- Enforce line breaks between arguments of a function call
- Enforce line breaks between arguments of a function call See rule details.
- org.openrewrite.codemods.format.FunctionCallSpacing
- Require or disallow spacing between function identifiers and their invocations
- Require or disallow spacing between function identifiers and their invocations See rule details.
- org.openrewrite.codemods.format.FunctionParenNewline
- Enforce consistent line breaks inside function parentheses
- Enforce consistent line breaks inside function parentheses See rule details.
- org.openrewrite.codemods.format.GeneratorStarSpacing
- Enforce consistent spacing around `*` operators in generator functions
- Enforce consistent spacing around `*` operators in generator functions See rule details.
- org.openrewrite.codemods.format.ImplicitArrowLinebreak
- Enforce the location of arrow function bodies
- Enforce the location of arrow function bodies See rule details.
- org.openrewrite.codemods.format.Indent
- Enforce consistent indentation
- Enforce consistent indentation See rule details.
- org.openrewrite.codemods.format.IndentBinaryOps
- Indentation for binary operators
- Indentation for binary operators See rule details.
- org.openrewrite.codemods.format.JsxClosingBracketLocation
- Enforce closing bracket location in JSX
- Enforce closing bracket location in JSX See rule details.
- org.openrewrite.codemods.format.JsxClosingTagLocation
- Enforce closing tag location for multiline JSX
- Enforce closing tag location for multiline JSX See rule details.
- org.openrewrite.codemods.format.JsxCurlyBracePresence
- Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes
- Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes See rule details.
- org.openrewrite.codemods.format.JsxCurlyNewline
- Enforce consistent linebreaks in curly braces in JSX attributes and expressions
- Enforce consistent linebreaks in curly braces in JSX attributes and expressions See rule details.
- org.openrewrite.codemods.format.JsxCurlySpacing
- Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
- Enforce or disallow spaces inside of curly braces in JSX attributes and expressions See rule details.
- org.openrewrite.codemods.format.JsxEqualsSpacing
- Enforce or disallow spaces around equal signs in JSX attributes
- Enforce or disallow spaces around equal signs in JSX attributes See rule details.
- org.openrewrite.codemods.format.JsxFirstPropNewLine
- Enforce proper position of the first property in JSX
- Enforce proper position of the first property in JSX See rule details.
- org.openrewrite.codemods.format.JsxIndent
- Enforce JSX indentation
- Enforce JSX indentation See rule details.
- org.openrewrite.codemods.format.JsxIndentProps
- Enforce props indentation in JSX
- Enforce props indentation in JSX See rule details.
- org.openrewrite.codemods.format.JsxMaxPropsPerLine
- Enforce maximum of props on a single line in JSX
- Enforce maximum of props on a single line in JSX See rule details.
- org.openrewrite.codemods.format.JsxNewline
- Require or prevent a new line after jsx elements and expressions
- Require or prevent a new line after jsx elements and expressions. See rule details.
- org.openrewrite.codemods.format.JsxOneExpressionPerLine
- Require one JSX element per line
- Require one JSX element per line See rule details.
- org.openrewrite.codemods.format.JsxPascalCase
- Enforce PascalCase for user-defined JSX components
- Enforce PascalCase for user-defined JSX components See rule details.
- org.openrewrite.codemods.format.JsxPropsNoMultiSpaces
- Disallow multiple spaces between inline JSX props
- Disallow multiple spaces between inline JSX props See rule details.
- org.openrewrite.codemods.format.JsxQuotes
- Enforce the consistent use of either double or single quotes in JSX attributes
- Enforce the consistent use of either double or single quotes in JSX attributes See rule details.
- org.openrewrite.codemods.format.JsxSelfClosingComp
- Disallow extra closing tags for components without children
- Disallow extra closing tags for components without children See rule details.
- org.openrewrite.codemods.format.JsxSortProps
- Enforce props alphabetical sorting
- Enforce props alphabetical sorting See rule details.
- org.openrewrite.codemods.format.JsxTagSpacing
- Enforce whitespace in and around the JSX opening and closing brackets
- Enforce whitespace in and around the JSX opening and closing brackets See rule details.
- org.openrewrite.codemods.format.JsxWrapMultilines
- Disallow missing parentheses around multiline JSX
- Disallow missing parentheses around multiline JSX See rule details.
- org.openrewrite.codemods.format.KeySpacing
- Enforce consistent spacing between keys and values in object literal properties
- Enforce consistent spacing between keys and values in object literal properties See rule details.
- org.openrewrite.codemods.format.KeywordSpacing
- Enforce consistent spacing before and after keywords
- Enforce consistent spacing before and after keywords See rule details.
- org.openrewrite.codemods.format.LinebreakStyle
- Enforce consistent linebreak style
- Enforce consistent linebreak style See rule details.
- org.openrewrite.codemods.format.LinesAroundComment
- Require empty lines around comments
- Require empty lines around comments See rule details.
- org.openrewrite.codemods.format.LinesBetweenClassMembers
- Require or disallow an empty line between class members
- Require or disallow an empty line between class members See rule details.
- org.openrewrite.codemods.format.MemberDelimiterStyle
- Require a specific member delimiter style for interfaces and type literals
- Require a specific member delimiter style for interfaces and type literals See rule details.
- org.openrewrite.codemods.format.MultilineTernary
- Enforce newlines between operands of ternary expressions
- Enforce newlines between operands of ternary expressions See rule details.
- org.openrewrite.codemods.format.NewParens
- Enforce or disallow parentheses when invoking a constructor with no arguments
- Enforce or disallow parentheses when invoking a constructor with no arguments See rule details.
- org.openrewrite.codemods.format.NewlinePerChainedCall
- Require a newline after each call in a method chain
- Require a newline after each call in a method chain See rule details.
- org.openrewrite.codemods.format.NoConfusingArrow
- Disallow arrow functions where they could be confused with comparisons
- Disallow arrow functions where they could be confused with comparisons See rule details.
- org.openrewrite.codemods.format.NoExtraParens
- Disallow unnecessary parentheses
- Disallow unnecessary parentheses See rule details.
- org.openrewrite.codemods.format.NoExtraSemi
- Disallow unnecessary semicolons
- Disallow unnecessary semicolons See rule details.
- org.openrewrite.codemods.format.NoFloatingDecimal
- Disallow leading or trailing decimal points in numeric literals
- Disallow leading or trailing decimal points in numeric literals See rule details.
- org.openrewrite.codemods.format.NoMultiSpaces
- Disallow multiple spaces
- Disallow multiple spaces See rule details.
- org.openrewrite.codemods.format.NoMultipleEmptyLines
- Disallow multiple empty lines
- Disallow multiple empty lines See rule details.
- org.openrewrite.codemods.format.NoTrailingSpaces
- Disallow trailing whitespace at the end of lines
- Disallow trailing whitespace at the end of lines See rule details.
- org.openrewrite.codemods.format.NoWhitespaceBeforeProperty
- Disallow whitespace before properties
- Disallow whitespace before properties See rule details.
- org.openrewrite.codemods.format.NonblockStatementBodyPosition
- Enforce the location of single-line statements
- Enforce the location of single-line statements See rule details.
- org.openrewrite.codemods.format.ObjectCurlyNewline
- Enforce consistent line breaks after opening and before closing braces
- Enforce consistent line breaks after opening and before closing braces See rule details.
- org.openrewrite.codemods.format.ObjectCurlySpacing
- Enforce consistent spacing inside braces
- Enforce consistent spacing inside braces See rule details.
- org.openrewrite.codemods.format.ObjectPropertyNewline
- Enforce placing object properties on separate lines
- Enforce placing object properties on separate lines See rule details.
- org.openrewrite.codemods.format.OneVarDeclarationPerLine
- Require or disallow newlines around variable declarations
- Require or disallow newlines around variable declarations See rule details.
- org.openrewrite.codemods.format.OperatorLinebreak
- Enforce consistent linebreak style for operators
- Enforce consistent linebreak style for operators See rule details.
- org.openrewrite.codemods.format.PaddedBlocks
- Require or disallow padding within blocks
- Require or disallow padding within blocks See rule details.
- org.openrewrite.codemods.format.PaddingLineBetweenStatements
- Require or disallow padding lines between statements
- Require or disallow padding lines between statements See rule details.
- org.openrewrite.codemods.format.QuoteProps
- Require quotes around object literal property names
- Require quotes around object literal property names See rule details.
- org.openrewrite.codemods.format.Quotes
- Enforce the consistent use of either backticks, double, or single quotes
- Enforce the consistent use of either backticks, double, or single quotes See rule details.
- org.openrewrite.codemods.format.RecommendedESLintStyling
- Recommended ESLint Styling
- Collection of stylistic ESLint rules that are recommended by the ESLint Style..
- org.openrewrite.codemods.format.RestSpreadSpacing
- Enforce spacing between rest and spread operators and their expressions
- Enforce spacing between rest and spread operators and their expressions See rule details.
- org.openrewrite.codemods.format.Semi
- Require or disallow semicolons instead of ASI
- Require or disallow semicolons instead of ASI See rule details.
- org.openrewrite.codemods.format.SemiSpacing
- Enforce consistent spacing before and after semicolons
- Enforce consistent spacing before and after semicolons See rule details.
- org.openrewrite.codemods.format.SemiStyle
- Enforce location of semicolons
- Enforce location of semicolons See rule details.
- org.openrewrite.codemods.format.SpaceBeforeBlocks
- Enforce consistent spacing before blocks
- Enforce consistent spacing before blocks See rule details.
- org.openrewrite.codemods.format.SpaceBeforeFunctionParen
- Enforce consistent spacing before `function` definition opening parenthesis
- Enforce consistent spacing before `function` definition opening parenthesis See rule details.
- org.openrewrite.codemods.format.SpaceInParens
- Enforce consistent spacing inside parentheses
- Enforce consistent spacing inside parentheses See rule details.
- org.openrewrite.codemods.format.SpaceInfixOps
- Require spacing around infix operators
- Require spacing around infix operators See rule details.
- org.openrewrite.codemods.format.SpaceUnaryOps
- Enforce consistent spacing before or after unary operators
- Enforce consistent spacing before or after unary operators See rule details.
- org.openrewrite.codemods.format.SpacedComment
- Enforce consistent spacing after the `//` or `/*` in a comment
- Enforce consistent spacing after the `//` or `/*` in a comment See rule details.
- org.openrewrite.codemods.format.SwitchColonSpacing
- Enforce spacing around colons of switch statements
- Enforce spacing around colons of switch statements See rule details.
- org.openrewrite.codemods.format.TemplateCurlySpacing
- Require or disallow spacing around embedded expressions of template strings
- Require or disallow spacing around embedded expressions of template strings See rule details.
- org.openrewrite.codemods.format.TemplateTagSpacing
- Require or disallow spacing between template tags and their literals
- Require or disallow spacing between template tags and their literals See rule details.
- org.openrewrite.codemods.format.TypeAnnotationSpacing
- Require consistent spacing around type annotations
- Require consistent spacing around type annotations See rule details.
- org.openrewrite.codemods.format.TypeGenericSpacing
- Enforces consistent spacing inside TypeScript type generics
- Enforces consistent spacing inside TypeScript type generics See rule details.
- org.openrewrite.codemods.format.TypeNamedTupleSpacing
- Expect space before the type declaration in the named tuple
- Expect space before the type declaration in the named tuple See rule details.
- org.openrewrite.codemods.format.WrapIife
- Require parentheses around immediate `function` invocations
- Require parentheses around immediate `function` invocations See rule details.
- org.openrewrite.codemods.format.WrapRegex
- Require parenthesis around regex literals
- Require parenthesis around regex literals See rule details.
- org.openrewrite.codemods.format.YieldStarSpacing
- Require or disallow spacing around the `` in `yield` expressions
- Require or disallow spacing around the `` in `yield` expressions See rule details.
events
1 recipe
- org.openrewrite.quarkus.spring.MigrateSpringEvents
- Migrate Spring Events to CDI Events
- Migrates Spring's event mechanism to CDI events. Converts ApplicationEventPublisher to CDI Event and @EventListener to @Observes.
examples
5 recipes
- com.oracle.weblogic.rewrite.examples.AddImplicitTldFileWithTaglib2_1
- Add implicit TLD with taglib 2.1
- Add
implicit.tldfile with taglib 2.1 tosrc/main/webapp/WEB-INF/tags.
- com.oracle.weblogic.rewrite.examples.AddImplicitTldFileWithTaglib3_0
- Add implicit TLD with taglib 3.0
- Add
implicit.tldfile with taglib 3.0 tosrc/main/webapp/WEB-INF/tags.
- com.oracle.weblogic.rewrite.examples.spring.ChangeCacheManagerToSimpleCacheManager
- Change cacheManager to use the SimpleCacheManager
- Change cacheManager to use the SimpleCacheManager.
- com.oracle.weblogic.rewrite.examples.spring.MigratedPetClinicExtrasFor1511
- Add WebLogic 15.1.1 PetClinic extras
- Run migration extras for migrated Spring Framework PetClinic example run on WebLogic 15.1.1.
- com.oracle.weblogic.rewrite.examples.spring.SetupSpringFrameworkPetClinicFor1412
- Setup Spring Framework 5.3.x PetClinic for WebLogic 14.1.2
- Setup Spring Framework 5.3.x PetClinic for WebLogic 14.1.2.
exposed
4 recipes
- org.openrewrite.kotlin.exposed.ExposedChangeMethodNames
- Rename Exposed deprecated methods for 1.0
- Rename deprecated Exposed method and property references to their 1.0 replacements.
- org.openrewrite.kotlin.exposed.ExposedChangeTypes
- Migrate Exposed type references to 1.0 packages
- Change fully qualified type references from Exposed 0.x packages to Exposed 1.0 packages. The 1.0 release reorganized all packages under
org.jetbrains.exposed.v1.*and split classes acrosscore,jdbc, anddaomodules.
- org.openrewrite.kotlin.exposed.ExposedUpgradeGradleDependencies
- Upgrade Exposed Gradle dependencies to 1.0
- Update JetBrains Exposed Gradle dependencies for the 1.0.0 migration. Upgrades dependency versions and handles the
exposed-migrationmodule split.
- org.openrewrite.kotlin.exposed.UpgradeToExposed_1
- Migrate to JetBrains Exposed 1.0
- Migrate from JetBrains Exposed 0.x to 1.0.0. This includes package reorganization (adding
v1prefix), type moves between modules, class renames, method renames, and Gradle dependency updates. Some changes require manual intervention and are not covered by this recipe:Table.uuid()should be changed toTable.javaUUID()forjava.util.UUIDvalues,DateColumnTypewith constructor parametertime=falseortime=trueshould be split intoJodaLocalDateColumnTypeorJodaLocalDateTimeColumnType,SqlExpressionBuilder.*usages should be replaced with top-level function imports, andStatement.execute()calls should useBlockingExecutablewrapping.
f
2 recipes
- org.openrewrite.python.migrate.ReplacePercentFormatWithFString
- Replace
%formatting with f-string - Replace
"..." % (...)expressions with f-strings (Python 3.6+). Only converts%sand%rspecifiers where the format string is a literal and the conversion is safe. - Tags: f-string
- Replace
- org.openrewrite.python.migrate.ReplaceStrFormatWithFString
- Replace
str.format()with f-string - Replace
"...".format(...)calls with f-strings (Python 3.6+). Only converts cases where the format string is a literal and the conversion is safe. - Tags: f-string
- Replace
faces
29 recipes
- com.oracle.weblogic.rewrite.FacesMigrationToJakartaFaces2x
- JSF 1.x to Jakarta Server Faces 2.3 on WebLogic 14.1.2 or older
- Jakarta EE 8 uses Faces 2.3 a major upgrade to Jakarta packages and XML namespaces. This recipe will migrate JSF 1.x to Jakarta Server Faces 2.3 on WebLogic 14.1.2 or older.
- com.oracle.weblogic.rewrite.jakarta.Faces2xMigrationToJakartaFaces3x
- JSF 2.x to Jakarta Server Faces 3.x
- Jakarta EE 9 uses Faces 3.0 a major upgrade to Jakarta packages and XML namespaces.
- com.oracle.weblogic.rewrite.jakarta.JakartaFaces3Xhtml
- Faces XHTML migration for Jakarta EE 9
- Find and replace legacy JSF namespaces and javax references with Jakarta Faces values in XHTML files.
- com.oracle.weblogic.rewrite.jakarta.JavaxFacesConfigXmlToJakartaFaces3ConfigXml
- Migrate xmlns entries in
faces-config.xmlfiles for Jakarta Server Faces 3 - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Tags: faces-config
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxFacesTagLibraryXmlToJakartaFaces3TagLibraryXml
- Migrate xmlns entries in
*taglib*.xmlfiles for Jakarta Server Faces 3 - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxTestWebXmlToJakartaTestWebXml5
- Migrate xmlns entries in
test-web.xmlfiles for Jakarta Server Faces 3 using test interfaces - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation for test interfaces like arquillian.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxWebFragmentXmlToJakartaWebFragmentXml5
- Migrate xmlns entries in
web-fragment.xmlfiles for Jakarta Server Faces 3 - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxWebXmlToJakartaWebXml5
- Migrate xmlns entries in
web.xmlfiles for Jakarta Server Faces 3 - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.UpgradeFacesOpenSourceLibraries2
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.
- com.oracle.weblogic.rewrite.jakarta.UpgradeFacesOpenSourceLibraries3
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.
- org.openrewrite.java.migrate.jakarta.Faces2xMigrationToJakartaFaces3x
- JSF 2.x to Jakarta Faces 3.x
- Jakarta EE 9 uses Faces 3.0, a major upgrade to Jakarta packages and XML namespaces.
- org.openrewrite.java.migrate.jakarta.Faces3xMigrationToFaces4x
- Upgrade to Jakarta Faces 4.x
- Jakarta EE 10 uses Faces 4.0.
- org.openrewrite.java.migrate.jakarta.Faces4xMigrationToFaces41x
- Jakarta Faces 4.0 to 4.1
- Jakarta EE 11 uses Faces 4.1 a minor upgrade.
- org.openrewrite.java.migrate.jakarta.JakartaFacesConfigXml4
- Migrate xmlns entries in
faces-config.xmlfiles - Jakarta EE 10 uses Faces version 4.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JakartaFacesEcmaScript
- Migrate JSF values inside EcmaScript files
- Convert JSF to Faces values inside JavaScript,TypeScript, and Properties files.
- org.openrewrite.java.migrate.jakarta.JakartaFacesTagLibraryXml4
- Migrate xmlns entries in
taglib.xmlfiles - Faces 4 uses facelet-taglib 4.0.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JakartaFacesXhtmlEE10
- Faces XHTML migration for Jakarta EE 10
- Find and replace legacy JSF namespace URIs with Jakarta Faces URNs in XHTML files.
- org.openrewrite.java.migrate.jakarta.JakartaFacesXhtmlEE9
- Faces XHTML migration for Jakarta EE 9
- Find and replace javax references to jakarta in XHTML files.
- org.openrewrite.java.migrate.jakarta.JakartaWebFragmentXml6
- Migrate xmlns entries in
web-fragment.xmlfiles - Faces 4 uses web-fragment 6.0.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JakartaWebXml6
- Migrate xmlns entries in
web.xmlfiles - Faces 4 uses web-app 6.0.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JavaxFacesConfigXmlToJakartaFacesConfigXml
- Migrate xmlns entries in
faces-config.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JavaxFacesTagLibraryXmlToJakartaFacesTagLibraryXml
- Migrate xmlns entries in
taglib.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JavaxWebFragmentXmlToJakartaWebFragmentXml
- Migrate xmlns entries in
web-fragment.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JavaxWebXmlToJakartaWebXml
- Migrate xmlns entries in
web.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.OmniFacesNamespaceMigration
- OmniFaces Namespace Migration
- Find and replace legacy OmniFaces namespaces.
- org.openrewrite.java.migrate.jakarta.UpdateManagedBeanToNamed
- Update Faces
@ManagedBeanto use CDI@Named - Faces ManagedBean was deprecated in JSF 2.3 (EE8) and removed in Jakarta Faces 4.0 (EE10). Replace
@ManagedBeanwith@Namedfor CDI-based bean management.
- Update Faces
- org.openrewrite.java.migrate.jakarta.UpgradeFaces3OpenSourceLibraries
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.
- org.openrewrite.java.migrate.jakarta.UpgradeFaces41OpenSourceLibraries
- Upgrade Faces open source libraries
- Upgrade OmniFaces and MyFaces/Mojarra libraries to Jakarta EE11 versions.
- org.openrewrite.java.migrate.jakarta.UpgradeFaces4OpenSourceLibraries
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE10 versions.
flyway
5 recipes
- org.openrewrite.java.flyway.AddFlywayModuleMySQL
- Add missing Flyway module for MySQL
- Database modules for Flyway 10 have been split out into separate modules for maintainability. Add the
flyway-mysqldependency if you are using MySQL with Flyway 10, as detailed on https://github.com/flyway/flyway/issues/3780.
- org.openrewrite.java.flyway.AddFlywayModuleOracle
- Add missing Flyway module for Oracle
- Database modules for Flyway 10 have been split out into separate modules for maintainability. Add the
flyway-database-oracledependency if you are using Oracle with Flyway 10, as detailed on https://github.com/flyway/flyway/issues/3780.
- org.openrewrite.java.flyway.AddFlywayModulePostgreSQL
- Add missing Flyway module for PostgreSQL
- Database modules for Flyway 10 have been split out in to separate modules for maintainability. Add the
flyway-database-postgresqldependency if you are using PostgreSQL with Flyway 10, as detailed on https://github.com/flyway/flyway/issues/3780.
- org.openrewrite.java.flyway.AddFlywayModuleSqlServer
- Add missing Flyway module for SQL Server
- Database modules for Flyway 10 have been split out into separate modules for maintainability. Add the
flyway-sqlserverdependency if you are using SQL Server with Flyway 10, as detailed on https://github.com/flyway/flyway/issues/3780.
- org.openrewrite.java.flyway.MigrateToFlyway10
- Migrate to Flyway 10
- Migrate to Flyway 10. See details at Flyway V10 has landed.
formatting
1 recipe
- OpenRewrite.Recipes.CodeQuality.Formatting.FormattingCodeQuality
- Formatting code quality
- Code formatting recipes for C#.
framework
14 recipes
- io.moderne.java.spring.framework.FindDeprecatedPathMatcherUsage
- Find deprecated
PathMatcherusage - In Spring Framework 7.0,
PathMatcherandAntPathMatcherare deprecated in favor ofPathPatternParser. This recipe finds usages of the deprecatedAntPathMatcherclass that may require manual migration toPathPatternParser.
- Find deprecated
- io.moderne.java.spring.framework.MigrateDefaultResponseErrorHandler
- Migrate
DefaultResponseErrorHandler.handleErrormethod signature - Migrates overridden
handleError(ClientHttpResponse response)methods to the new signaturehandleError(URI url, HttpMethod method, ClientHttpResponse response)in classes extendingDefaultResponseErrorHandler. The old single-argument method was removed in Spring Framework 7.0.
- Migrate
- io.moderne.java.spring.framework.RemoveDeprecatedPathMappingOptions
- Migrate deprecated path mapping options
- Migrates deprecated path mapping configuration options that have been removed in Spring Framework 7.0. For trailing slash matching, this recipe adds explicit dual routes to controller methods before removing the deprecated configuration. For suffix pattern matching, this recipe flags usages for manual review since there is no automatic migration path. Path extension content negotiation options are removed as they should be replaced with query parameter-based negotiation.
- io.moderne.java.spring.framework.RemovePathExtensionContentNegotiation
- Remove path extension content negotiation methods
- Remove calls to
favorPathExtension()andignoreUnknownPathExtensions()onContentNegotiationConfigurer. These methods and the underlyingPathExtensionContentNegotiationStrategywere removed in Spring Framework 7.0. Path extension content negotiation was deprecated due to URI handling issues. Use query parameter-based negotiation withfavorParameter(true)as an alternative.
- io.moderne.java.spring.framework.jsf23.MigrateFacesConfig
- Migrate JSF variable-resolver to el-resolver
- Migrates JSF faces-config.xml from namespaces, tags and values that was deprecated in JSF 1.2 and removed in later versions, to the JSF 2.3 compatible constructs.
- io.moderne.java.spring.framework7.FindRemovedAPIs
- Find removed APIs in Spring Framework 7.0
- Finds usages of APIs that were removed in Spring Framework 7.0 and require manual intervention. This includes Theme support, OkHttp3 integration, and servlet view document/feed classes which have no direct automated replacement.
- io.moderne.java.spring.framework7.MigrateDeprecatedAPIs
- Migrate deprecated APIs removed in Spring Framework 7.0
- Migrates deprecated APIs that were removed in Spring Framework 7.0. This includes ListenableFuture to CompletableFuture migration.
- io.moderne.java.spring.framework7.MigrateHttpStatusToRfc9110
- Migrate
HttpStatusenum values to RFC 9110 names - Spring Framework 7.0 aligns HttpStatus enum values with RFC 9110. This recipe replaces deprecated status code constants with their RFC 9110 equivalents:
PAYLOAD_TOO_LARGEbecomesCONTENT_TOO_LARGEandUNPROCESSABLE_ENTITYbecomesUNPROCESSABLE_CONTENT.
- Migrate
- io.moderne.java.spring.framework7.MigrateJmsDestinationResolver
- Preserve DynamicDestinationResolver behavior for JmsTemplate
- Spring Framework 7.0 changed the default
DestinationResolverforJmsTemplatefromDynamicDestinationResolvertoSimpleDestinationResolver, which caches Session-resolved Queue and Topic instances. This recipe explicitly configuresDynamicDestinationResolverto preserve the pre-7.0 behavior. The caching behavior ofSimpleDestinationResolvershould be fine for most JMS brokers, so this explicit configuration can be removed once verified.
- io.moderne.java.spring.framework7.RemoveSpringJcl
- Remove spring-jcl dependency
- The
spring-jclmodule has been removed in Spring Framework 7.0 in favor of Apache Commons Logging 1.3.0. This recipe removes any explicit dependency onorg.springframework:spring-jcl. The change should be transparent for most applications, as spring-jcl was typically a transitive dependency and the logging API calls (org.apache.commons.logging.*) remain unchanged.
- io.moderne.java.spring.framework7.RenameMemberCategoryConstants
- Rename MemberCategory field constants for Spring Framework 7.0
- Renames deprecated
MemberCategoryconstants to their new names in Spring Framework 7.0.MemberCategory.PUBLIC_FIELDSis renamed toMemberCategory.INVOKE_PUBLIC_FIELDSandMemberCategory.DECLARED_FIELDSis renamed toMemberCategory.INVOKE_DECLARED_FIELDS. These renames clarify the original intent of these categories and align with the rest of the API.
- io.moderne.java.spring.framework7.RenameRequestContextJstlPresent
- Rename
RequestContext.jstPresenttoJSTL_PRESENT - Renames the protected static field
RequestContext.jstPresenttoJSTL_PRESENTin Spring Framework 7.0. This field was renamed as part of a codebase-wide effort to use uppercase for classpath-related static final field names (see https://github.com/spring-projects/spring-framework/issues/35525).
- Rename
- io.moderne.java.spring.framework7.UpdateGraalVmNativeHints
- Update GraalVM native reflection hints for Spring Framework 7.0
- Migrates GraalVM native reflection hints to Spring Framework 7.0 conventions. Spring Framework 7.0 adopts the unified reachability metadata format for GraalVM. This recipe renames deprecated
MemberCategoryconstants and simplifies reflection hint registrations where explicit member categories are no longer needed.
- io.moderne.java.spring.framework7.UpgradeSpringFramework_7_0
- Migrate to Spring Framework 7.0
- Migrates applications to Spring Framework 7.0. This recipe applies all necessary changes including API migrations, removed feature detection, and configuration updates.
functools
1 recipe
- org.openrewrite.python.migrate.FindFunctoolsCmpToKey
- Find
functools.cmp_to_key()usage - Find usage of
functools.cmp_to_key()which is a Python 2 compatibility function. Consider using a key function directly.
- Find
future
1 recipe
- org.openrewrite.python.migrate.RemoveFutureImports
- Remove obsolete
__future__imports - Remove
from __future__ import ...statements for features that are enabled by default in Python 3.
- Remove obsolete
GCP
15 recipes
- org.openrewrite.terraform.gcp.EnablePodSecurityPolicyControllerOnGKEClusters
- Enable
PodSecurityPolicycontroller on Google Kubernetes Engine (GKE) clusters - Ensure
PodSecurityPolicycontroller is enabled on Google Kubernetes Engine (GKE) clusters.
- Enable
- org.openrewrite.terraform.gcp.EnableVPCFlowLogsAndIntranodeVisibility
- Enable VPC flow logs and intranode visibility
- Enable VPC flow logs and intranode visibility.
- org.openrewrite.terraform.gcp.EnableVPCFlowLogsForSubnetworks
- Enable VPC Flow Logs for subnetworks
- Ensure GCP VPC flow logs for subnets are enabled. Flow Logs capture information on IP traffic moving through network interfaces. This information can be used to monitor anomalous traffic and provide security insights.
- org.openrewrite.terraform.gcp.EnsureBinaryAuthorizationIsUsed
- Ensure binary authorization is used
- Ensure binary authorization is used.
- org.openrewrite.terraform.gcp.EnsureComputeInstancesLaunchWithShieldedVMEnabled
- Ensure compute instances launch with shielded VM enabled
- Ensure compute instances launch with shielded VM enabled.
- org.openrewrite.terraform.gcp.EnsureGCPCloudStorageBucketWithUniformBucketLevelAccessAreEnabled
- Ensure GCP cloud storage bucket with uniform bucket-level access are enabled
- Ensure GCP cloud storage bucket with uniform bucket-level access are enabled.
- org.openrewrite.terraform.gcp.EnsureGCPKubernetesClusterNodeAutoRepairConfigurationIsEnabled
- Ensure GCP Kubernetes cluster node auto-repair configuration is enabled
- Ensure GCP Kubernetes cluster node auto-repair configuration is enabled.
- org.openrewrite.terraform.gcp.EnsureGCPKubernetesEngineClustersHaveLegacyComputeEngineMetadataEndpointsDisabled
- Ensure GCP Kubernetes engine clusters have legacy compute engine metadata endpoints disabled
- Ensure GCP Kubernetes engine clusters have legacy compute engine metadata endpoints disabled.
- org.openrewrite.terraform.gcp.EnsureGCPVMInstancesHaveBlockProjectWideSSHKeysFeatureEnabled
- Ensure GCP VM instances have block project-wide SSH keys feature enabled
- Ensure GCP VM instances have block project-wide SSH keys feature enabled.
- org.openrewrite.terraform.gcp.EnsureIPForwardingOnInstancesIsDisabled
- Ensure IP forwarding on instances is disabled
- Ensure IP forwarding on instances is disabled.
- org.openrewrite.terraform.gcp.EnsurePrivateClusterIsEnabledWhenCreatingKubernetesClusters
- Ensure private cluster is enabled when creating Kubernetes clusters
- Ensure private cluster is enabled when creating Kubernetes clusters.
- org.openrewrite.terraform.gcp.EnsureSecureBootForShieldedGKENodesIsEnabled
- Ensure secure boot for shielded GKE nodes is enabled
- Ensure secure boot for shielded GKE nodes is enabled.
- org.openrewrite.terraform.gcp.EnsureShieldedGKENodesAreEnabled
- Ensure shielded GKE nodes are enabled
- Ensure shielded GKE nodes are enabled.
- org.openrewrite.terraform.gcp.EnsureTheGKEMetadataServerIsEnabled
- Ensure the GKE metadata server is enabled
- Ensure the GKE metadata server is enabled.
- org.openrewrite.terraform.gcp.GCPBestPractices
- Best practices for GCP
- Securely operate on Google Cloud Platform.
github
12 recipes
- org.openrewrite.github.AddDependabotCooldown
- Add cooldown periods to Dependabot configuration
- Adds a
cooldownsection to each update configuration in Dependabot files. Supportsdefault-days,semver-major-days,semver-minor-days,semver-patch-days,include, andexcludeoptions. This implements a security best practice where dependencies are not immediately adopted upon release, allowing time for security vendors to identify potential supply chain compromises. Cooldown applies only to version updates, not security updates. Read more about dependency cooldowns. The available configuration options for dependabot are listed on GitHub.
- org.openrewrite.github.AddManualTrigger
- Add manual workflow trigger
- You can manually trigger workflow runs. To trigger specific workflows in a repository, use the
workflow_dispatchevent.
- org.openrewrite.github.ChangeDependabotScheduleInterval
- Change dependabot schedule interval
- Change the schedule interval for a given package-ecosystem in a
dependabot.ymlconfiguration file. The available configuration options for dependabot are listed on GitHub.
- org.openrewrite.github.DependabotCheckForGithubActionsUpdatesDaily
- Check for github-actions updates daily
- Set dependabot to check for github-actions updates daily.
- org.openrewrite.github.DependabotCheckForGithubActionsUpdatesWeekly
- Check for github-actions updates weekly
- Set dependabot to check for github-actions updates weekly.
- org.openrewrite.github.MigrateSetupUvV6ToV7
- Migrate
astral-sh/setup-uvfrom v6 to v7 - Migrates
astral-sh/setup-uvfrom v6 to v7. Updates the action version and removes the deprecatedserver-urlinput. See the v7.0.0 release notes for breaking changes.
- Migrate
- org.openrewrite.github.MigrateTibdexGitHubAppTokenToActions
- Migrate from tibdex/github-app-token to actions/create-github-app-token
- Migrates from tibdex/github-app-token@v2 to actions/create-github-app-token@v2 and updates parameter names from snake_case to kebab-case.
- org.openrewrite.github.ReplaceOssrhSecretsWithSonatype
- Replace OSSRH secrets with Sonatype secrets
- Replace deprecated OSSRH_S01 secrets with new Sonatype secrets in GitHub Actions workflows. This is an example use of the
ReplaceSecretsandReplaceSecretKeysrecipes combined used to update the Maven publishing secrets in OpenRewrite's GitHub organization.
- org.openrewrite.github.SetupNodeUpgradeNodeVersion
- Upgrade
actions/setup-nodenode-version - Update the Node.js version used by
actions/setup-nodeif it is below the expected version number.
- Upgrade
- org.openrewrite.github.gradle.RenameGradleBuildActionToSetupGradle
- Rename
gradle/gradle-build-actiontogradle/actions/setup-gradle - Rename the deprecated
gradle/gradle-build-actiontogradle/actions/setup-gradle@v3.
- Rename
- org.openrewrite.github.gradle.RenameWrapperValidationAction
- Rename
gradle/wrapper-validation-actiontogradle/actions/wrapper-validation - Rename the deprecated
gradle/wrapper-validation-actiontogradle/actions/wrapper-validation@v3.
- Rename
- org.openrewrite.github.security.GitHubActionsSecurity
- GitHub Actions security insights
- Finds potential security issues in GitHub Actions workflows, based on Zizmor security analysis rules.
gitlab
2 recipes
- org.openrewrite.gitlab.BestPractices
- GitLab CI best practices
- Apply GitLab CI/CD best practices to
.gitlab-ci.yml. This includes addingworkflow:rulesto prevent duplicate pipelines, settinginterruptible: trueandretryin thedefaultsection, configuringartifacts:expire_in, and setting a jobtimeout.
- org.openrewrite.gitlab.search.FindDeprecatedSyntax
- Find deprecated GitLab CI syntax
- Find usages of deprecated
onlyandexceptkeywords in.gitlab-ci.yml. These keywords are deprecated in favor ofrules.
glassfish
3 recipes
- org.openrewrite.java.migrate.javax.AddJaxbDependenciesWithRuntime
- Add explicit JAXB API dependencies and runtime
- This recipe will add explicit dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the
javax.xml.bindnamespace. Running a full javax to Jakarta migration usingorg.openrewrite.java.migrate.jakarta.JavaxMigrationToJakartawill update to versions greater than 3.x which necessitates the package change as well.
- org.openrewrite.java.migrate.javax.AddJaxbRuntime
- Use latest JAXB API and runtime for Jakarta EE 8
- Update build files to use the latest JAXB runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAXB run-time, in Gradle
compileOnly+testImplementationand Mavenprovidedscope, to any project that has a transitive dependency on the JAXB API. The resulting dependencies still use thejavaxnamespace, despite the move to the Jakarta artifact.
- org.openrewrite.java.migrate.javax.AddJaxwsDependencies
- Add explicit JAX-WS dependencies
- This recipe will add explicit dependencies for Jakarta EE 8 when a Java 8 application is using JAX-WS. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 but the application can continue to use the
javax.xml.bindnamespace.
globbing
1 recipe
- OpenRewrite.Recipes.Net9.FindInMemoryDirectoryInfo
- Find
InMemoryDirectoryInforootDir prepend change - Finds
new InMemoryDirectoryInfo()constructor calls. In .NET 9,rootDiris prepended to file paths that don't start with therootDir, which may change file matching behavior.
- Find
graalvm
3 recipes
- io.moderne.java.spring.framework7.RenameMemberCategoryConstants
- Rename MemberCategory field constants for Spring Framework 7.0
- Renames deprecated
MemberCategoryconstants to their new names in Spring Framework 7.0.MemberCategory.PUBLIC_FIELDSis renamed toMemberCategory.INVOKE_PUBLIC_FIELDSandMemberCategory.DECLARED_FIELDSis renamed toMemberCategory.INVOKE_DECLARED_FIELDS. These renames clarify the original intent of these categories and align with the rest of the API.
- io.moderne.java.spring.framework7.UpdateGraalVmNativeHints
- Update GraalVM native reflection hints for Spring Framework 7.0
- Migrates GraalVM native reflection hints to Spring Framework 7.0 conventions. Spring Framework 7.0 adopts the unified reachability metadata format for GraalVM. This recipe renames deprecated
MemberCategoryconstants and simplifies reflection hint registrations where explicit member categories are no longer needed.
- org.openrewrite.quarkus.spring.ConfigureNativeBuild
- Configure Quarkus Native Build Support
- Adds configuration and dependencies required for Quarkus native image compilation with GraalVM. Includes native profile configuration and reflection hints where needed.
gradle
8 recipes
- io.moderne.java.spring.boot3.UpgradeGradle7Spring34
- Upgrade Gradle to 7.6.4+ for Spring Boot 3.4
- Spring Boot 3.4 requires Gradle 7.6.4.
- io.moderne.java.spring.boot3.UpgradeGradle8Spring34
- Upgrade Gradle 8 to 8.4+ for Spring Boot 3.4
- Spring Boot 3.4 requires Gradle 8.4+.
- org.openrewrite.github.gradle.RenameGradleBuildActionToSetupGradle
- Rename
gradle/gradle-build-actiontogradle/actions/setup-gradle - Rename the deprecated
gradle/gradle-build-actiontogradle/actions/setup-gradle@v3.
- Rename
- org.openrewrite.github.gradle.RenameWrapperValidationAction
- Rename
gradle/wrapper-validation-actiontogradle/actions/wrapper-validation - Rename the deprecated
gradle/wrapper-validation-actiontogradle/actions/wrapper-validation@v3.
- Rename
- org.openrewrite.kotlin.exposed.ExposedUpgradeGradleDependencies
- Upgrade Exposed Gradle dependencies to 1.0
- Update JetBrains Exposed Gradle dependencies for the 1.0.0 migration. Upgrades dependency versions and handles the
exposed-migrationmodule split.
- org.openrewrite.kotlin.migrate.RemoveDeprecatedKotlinGradleProperties
- Remove deprecated Kotlin Gradle properties
- Remove deprecated Kotlin Gradle properties from
gradle.properties.kotlin.experimental.coroutineswas removed in Kotlin 2.x.
- org.openrewrite.kotlin.migrate.RemoveRedundantKotlinStdlib
- Remove redundant kotlin-stdlib dependencies
- Remove explicit
kotlin-stdlib,kotlin-stdlib-jdk7,kotlin-stdlib-jdk8, andkotlin-stdlib-commondependencies. The Kotlin Gradle plugin has automatically included the stdlib since Kotlin 1.4, making explicit declarations redundant.
- org.openrewrite.kotlin.migrate.UpgradeKotlinGradlePlugins
- Upgrade Kotlin Gradle plugins to 2.x
- Upgrade all
org.jetbrains.kotlin.*Gradle plugins to Kotlin 2.x. This includes the core kotlin-jvm plugin as well as all official Kotlin Gradle plugins such as serialization, Spring, allopen, noarg, JPA, and parcelize.
guava
56 recipes
- org.openrewrite.java.migrate.guava.NoGuava
- Prefer the Java standard library instead of Guava
- Guava filled in important gaps in the Java standard library and still does. But at least some of Guava's API surface area is covered by the Java standard library now, and some projects may be able to remove Guava altogether if they migrate to standard library for these functions.
- org.openrewrite.java.migrate.guava.NoGuavaAtomicsNewReference
- Prefer
new AtomicReference<>() - Prefer the Java standard library over third-party usage of Guava in simple cases like this.
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaCollections2Transform
- Prefer
Collection.stream().map(Function)overCollections2.transform - Prefer
Collection.stream().map(Function)overCollections2.transform(Collection, Function).
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaCreateTempDir
- Prefer
Files#createTempDirectory() - Replaces Guava
Files#createTempDir()with JavaFiles#createTempDirectory(..). Transformations are limited to scopes throwing or catchingjava.io.IOException.
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaDirectExecutor
- Prefer
Runnable::run Executoris a SAM-compatible interface, soRunnable::runis just as succinct asMoreExecutors.directExecutor()but without the third-party library requirement.
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaFunctionsCompose
- Prefer
Function.compose(Function) - Prefer
Function.compose(Function)overFunctions.compose(Function, Function).
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaIterablesAll
- Prefer
Collection.stream().allMatch(Predicate) - Prefer
Collection.stream().allMatch(Predicate)overIterables.all(Collection, Predicate).
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaIterablesAnyFilter
- Prefer
Collection.stream().anyMatch(Predicate) - Prefer
Collection.stream().anyMatch(Predicate)overIterables.any(Collection, Predicate).
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaIterablesTransform
- Prefer
Collection.stream().map(Function)overIterables.transform - Prefer
Collection.stream().map(Function)overIterables.transform(Collection, Function).
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaJava11
- Prefer the Java 11 standard library instead of Guava
- Guava filled in important gaps in the Java standard library and still does. But at least some of Guava's API surface area is covered by the Java standard library now, and some projects may be able to remove Guava altogether if they migrate to standard library for these functions.
- org.openrewrite.java.migrate.guava.NoGuavaJava21
- Prefer the Java 21 standard library instead of Guava
- Guava filled in important gaps in the Java standard library and still does. But at least some of Guava's API surface area is covered by the Java standard library now, and some projects may be able to remove Guava altogether if they migrate to standard library for these functions.
- org.openrewrite.java.migrate.guava.NoGuavaListsNewArrayList
- Prefer
new ArrayList<>() - Prefer the Java standard library over third-party usage of Guava in simple cases like this.
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaListsNewCopyOnWriteArrayList
- Prefer
new CopyOnWriteArrayList<>() - Prefer the Java standard library over third-party usage of Guava in simple cases like this.
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaListsNewLinkedList
- Prefer
new LinkedList<>() - Prefer the Java standard library over third-party usage of Guava in simple cases like this.
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaMapsNewHashMap
- Prefer
new HashMap<>() - Prefer the Java standard library over third-party usage of Guava in simple cases like this.
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaMapsNewLinkedHashMap
- Prefer
new LinkedHashMap<>() - Prefer the Java standard library over third-party usage of Guava in simple cases like this.
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaMapsNewTreeMap
- Prefer
new TreeMap<>() - Prefer the Java standard library over third-party usage of Guava in simple cases like this.
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaOptionalAsSet
- Prefer
Optional.stream().collect(Collectors.toSet()) - Prefer
Optional.stream().collect(Collectors.toSet())overOptional.asSet().
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaOptionalFromJavaUtil
- Replace
com.google.common.base.Optional#fromJavaUtil(java.util.Optional)with argument - Replaces
com.google.common.base.Optional#fromJavaUtil(java.util.Optional)with argument.
- Replace
- org.openrewrite.java.migrate.guava.NoGuavaOptionalToJavaUtil
- Remove
com.google.common.base.Optional#toJavaUtil() - Remove calls to
com.google.common.base.Optional#toJavaUtil().
- Remove
- org.openrewrite.java.migrate.guava.NoGuavaPredicatesAndOr
- Prefer
Predicate.and(Predicate) - Prefer
Predicate.and(Predicate)overPredicates.and(Predicate, Predicate).
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaPredicatesEqualTo
- Prefer
Predicate.isEqual(Object) - Prefer
Predicate.isEqual(Object)overPredicates.equalTo(Object).
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaPredicatesInstanceOf
- Prefer
A.class::isInstance - Prefer
A.class::isInstanceoverPredicates.instanceOf(A.class).
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaSetsFilter
- Prefer
Collection.stream().filter(Predicate) - Prefer
Collection.stream().filter(Predicate)overSets.filter(Set, Predicate).
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaSetsNewConcurrentHashSet
- Prefer
new ConcurrentHashMap<>() - Prefer the Java standard library over third-party usage of Guava in simple cases like this.
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaSetsNewHashSet
- Prefer
new HashSet<>() - Prefer the Java standard library over third-party usage of Guava in simple cases like this.
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaSetsNewLinkedHashSet
- Prefer
new LinkedHashSet<>() - Prefer the Java standard library over third-party usage of Guava in simple cases like this.
- Prefer
- org.openrewrite.java.migrate.guava.PreferCharCompare
- Prefer
java.lang.Char#compare - Prefer
java.lang.Char#compareinstead of usingcom.google.common.primitives.Chars#compare.
- Prefer
- org.openrewrite.java.migrate.guava.PreferIntegerCompare
- Prefer
Integer#compare - Prefer
java.lang.Integer#compareinstead of usingcom.google.common.primitives.Ints#compare.
- Prefer
- org.openrewrite.java.migrate.guava.PreferIntegerCompareUnsigned
- Prefer
Integer#compareUnsigned - Prefer
java.lang.Integer#compareUnsignedinstead of usingcom.google.common.primitives.UnsignedInts#compareorcom.google.common.primitives.UnsignedInts#compareUnsigned.
- Prefer
- org.openrewrite.java.migrate.guava.PreferIntegerDivideUnsigned
- Prefer
Integer#divideUnsigned - Prefer
java.lang.Integer#divideUnsignedinstead of usingcom.google.common.primitives.UnsignedInts#divideorcom.google.common.primitives.UnsignedInts#divideUnsigned.
- Prefer
- org.openrewrite.java.migrate.guava.PreferIntegerParseUnsignedInt
- Prefer
Integer#parseUnsignedInt - Prefer
java.lang.Integer#parseUnsignedIntinstead of usingcom.google.common.primitives.UnsignedInts#parseUnsignedInt.
- Prefer
- org.openrewrite.java.migrate.guava.PreferIntegerRemainderUnsigned
- Prefer
Integer#remainderUnsigned - Prefer
java.lang.Integer#remainderUnsignedinstead of usingcom.google.common.primitives.UnsignedInts#remainderUnsigned.
- Prefer
- org.openrewrite.java.migrate.guava.PreferJavaNioCharsetStandardCharsets
- Prefer
java.nio.charset.StandardCharsets - Prefer
java.nio.charset.StandardCharsetsinstead of usingcom.google.common.base.Charsets.
- Prefer
- org.openrewrite.java.migrate.guava.PreferJavaStringJoin
- Prefer
String#join()over GuavaJoiner#join() - Replaces supported calls to
com.google.common.base.Joiner#join()withjava.lang.String#join().
- Prefer
- org.openrewrite.java.migrate.guava.PreferJavaUtilCollectionsSynchronizedNavigableMap
- Prefer
java.util.Collections#synchronizedNavigableMap - Prefer
java.util.Collections#synchronizedNavigableMapinstead of usingcom.google.common.collect.Maps#synchronizedNavigableMap.
- Prefer
- org.openrewrite.java.migrate.guava.PreferJavaUtilCollectionsUnmodifiableNavigableMap
- Prefer
java.util.Collections#unmodifiableNavigableMap - Prefer
java.util.Collections#unmodifiableNavigableMapinstead of usingcom.google.common.collect.Maps#unmodifiableNavigableMap.
- Prefer
- org.openrewrite.java.migrate.guava.PreferJavaUtilFunction
- Prefer
java.util.function.Function - Prefer
java.util.function.Functioninstead of usingcom.google.common.base.Function.
- Prefer
- org.openrewrite.java.migrate.guava.PreferJavaUtilObjectsEquals
- Prefer
java.util.Objects#equals - Prefer
java.util.Objects#equalsinstead of usingcom.google.common.base.Objects#equal.
- Prefer
- org.openrewrite.java.migrate.guava.PreferJavaUtilObjectsHashCode
- Prefer
java.util.Objects#hash - Prefer
java.util.Objects#hashinstead of usingcom.google.common.base.Objects#hashCodeorcom.google.common.base.Objects hash(..).
- Prefer
- org.openrewrite.java.migrate.guava.PreferJavaUtilObjectsRequireNonNullElse
- Prefer
java.util.Objects#requireNonNullElse - Prefer
java.util.Objects#requireNonNullElseinstead of usingcom.google.common.base.MoreObjects#firstNonNull.
- Prefer
- org.openrewrite.java.migrate.guava.PreferJavaUtilOptional
- Prefer
java.util.Optional - Prefer
java.util.Optionalinstead of usingcom.google.common.base.Optional.
- Prefer
- org.openrewrite.java.migrate.guava.PreferJavaUtilOptionalOrElseNull
- Prefer
java.util.Optional#orElse(null)overcom.google.common.base.Optional#orNull() - Replaces
com.google.common.base.Optional#orNull()withjava.util.Optional#orElse(null).
- Prefer
- org.openrewrite.java.migrate.guava.PreferJavaUtilOptionalOrSupplier
- Prefer
java.util.Optional#or(Supplier<T extends java.util.Optional<T>>) - Prefer
java.util.Optional#or(Supplier<T extends java.util.Optional<T>>)over `com.google.common.base.Optional#or(com.google.common.base.Optional).
- Prefer
- org.openrewrite.java.migrate.guava.PreferJavaUtilPredicate
- Prefer
java.util.function.Predicate - Prefer
java.util.function.Predicateinstead of usingcom.google.common.base.Predicate.
- Prefer
- org.openrewrite.java.migrate.guava.PreferJavaUtilSupplier
- Prefer
java.util.function.Supplier - Prefer
java.util.function.Supplierinstead of usingcom.google.common.base.Supplier.
- Prefer
- org.openrewrite.java.migrate.guava.PreferLongCompare
- Prefer
Long#compare - Prefer
java.lang.Long#compareinstead of usingcom.google.common.primitives.Longs#compare.
- Prefer
- org.openrewrite.java.migrate.guava.PreferLongCompareUnsigned
- Prefer
Long#compareUnsigned - Prefer
java.lang.Long#compareUnsignedinstead of usingcom.google.common.primitives.UnsignedLongs#compareorcom.google.common.primitives.UnsignedLongs#compareUnsigned.
- Prefer
- org.openrewrite.java.migrate.guava.PreferLongDivideUnsigned
- Prefer
Long#divideUnsigned - Prefer
java.lang.Long#divideUnsignedinstead of usingcom.google.common.primitives.UnsignedLongs#divideorcom.google.common.primitives.UnsignedLongs#divideUnsigned.
- Prefer
- org.openrewrite.java.migrate.guava.PreferLongParseUnsignedLong
- Prefer
Long#parseUnsignedInt - Prefer
java.lang.Long#parseUnsignedIntinstead of usingcom.google.common.primitives.UnsignedLongs#parseUnsignedInt.
- Prefer
- org.openrewrite.java.migrate.guava.PreferLongRemainderUnsigned
- Prefer
Long#remainderUnsigned - Prefer
java.lang.Long#remainderUnsignedinstead of usingcom.google.common.primitives.UnsignedLongs#remainderUnsigned.
- Prefer
- org.openrewrite.java.migrate.guava.PreferMathAddExact
- Prefer
Math#addExact - Prefer
java.lang.Math#addExactinstead of usingcom.google.common.math.IntMath#checkedAddorcom.google.common.math.IntMath#addExact.
- Prefer
- org.openrewrite.java.migrate.guava.PreferMathClamp
- Prefer
Math#clamp - Prefer
java.lang.Math#clampinstead of usingcom.google.common.primitives.*#constrainToRange.
- Prefer
- org.openrewrite.java.migrate.guava.PreferMathMultiplyExact
- Prefer
Math#multiplyExact - Prefer
java.lang.Math#multiplyExactinstead of usingcom.google.common.primitives.IntMath#checkedMultiplyorcom.google.common.primitives.IntMath#multiplyExact.
- Prefer
- org.openrewrite.java.migrate.guava.PreferMathSubtractExact
- Prefer
Math#subtractExact - Prefer
java.lang.Math#subtractExactinstead of usingcom.google.common.primitives.IntMath#checkedSubtractorcom.google.common.primitives.IntMath#subtractExact.
- Prefer
- org.openrewrite.java.migrate.guava.PreferShortCompare
- Prefer
Short#compare - Prefer
java.lang.Short#compareinstead of usingcom.google.common.primitives.Shorts#compare.
- Prefer
h2
2 recipes
- org.openrewrite.quarkus.spring.H2DriverToQuarkus
- Replace H2 driver with Quarkus JDBC H2
- Migrates
com.h2database:h2toio.quarkus:quarkus-jdbc-h2(excludes test scope).
- org.openrewrite.quarkus.spring.H2TestDriverToQuarkus
- Replace H2 test driver with Quarkus JDBC H2 (test scope)
- Migrates
com.h2database:h2with test scope toio.quarkus:quarkus-jdbc-h2with test scope.
hamcrest
6 recipes
- org.openrewrite.java.testing.hamcrest.AddHamcrestIfUsed
- Add
org.hamcrest:hamcrestif it is used - JUnit Jupiter does not include hamcrest as a transitive dependency. If needed, add a direct dependency.
- Add
- org.openrewrite.java.testing.hamcrest.ConsistentHamcrestMatcherImports
- Use consistent Hamcrest matcher imports
- Use consistent imports for Hamcrest matchers, and remove wrapping
is(Matcher)calls ahead of further changes.
- org.openrewrite.java.testing.hamcrest.MigrateHamcrestToAssertJ
- Migrate Hamcrest assertions to AssertJ
- Migrate Hamcrest
assertThat(..)to AssertJAssertions.
- org.openrewrite.java.testing.hamcrest.MigrateHamcrestToJUnit5
- Migrate Hamcrest assertions to JUnit Jupiter
- Migrate Hamcrest
assertThat(..)to JUnit JupiterAssertions.
- org.openrewrite.java.testing.junit5.MigrateAssumptions
- Use
Assertions#assume*(..)and Hamcrest'sMatcherAssume#assume*(..) - Many of JUnit 4's
Assume#assume(..)methods have no direct counterpart in JUnit 5 and require Hamcrest JUnit'sMatcherAssume.
- Use
- org.openrewrite.java.testing.junit5.UseHamcrestAssertThat
- Use
MatcherAssert#assertThat(..) - JUnit 4's
Assert#assertThat(..)This method was deprecated in JUnit 4 and removed in JUnit Jupiter.
- Use
handler
1 recipe
- com.oracle.weblogic.rewrite.jakarta.JavaxWebHandlerXmlToJakarta9HandlerXml
- Migrate xmlns entries in
handler.xmlfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
hazelcast
1 recipe
- io.moderne.java.spring.boot4.MigrateHazelcastSpringSession
- Migrate Spring Session Hazelcast to Hazelcast Spring Session
- Spring Boot 4.0 removed direct support for Spring Session Hazelcast. The Hazelcast team now maintains their own Spring Session integration. This recipe changes the dependency from
org.springframework.session:spring-session-hazelcasttocom.hazelcast.spring:hazelcast-spring-sessionand updates the package fromorg.springframework.session.hazelcasttocom.hazelcast.spring.session.
health
2 recipes
- org.openrewrite.quarkus.spring.MigrateSpringActuator
- Migrate Spring Boot Actuator to Quarkus Health and Metrics
- Migrates Spring Boot Actuator to Quarkus SmallRye Health and Metrics extensions. Converts HealthIndicator implementations to Quarkus HealthCheck pattern.
- org.openrewrite.quarkus.spring.SpringBootActuatorToQuarkus
- Replace Spring Boot Actuator with Quarkus SmallRye Health
- Migrates
spring-boot-starter-actuatortoquarkus-smallrye-health.
hibernate
6 recipes
- com.oracle.weblogic.rewrite.UpgradeJPATo31HibernateTo66
- Upgrade Jakarta JPA to 3.1 and Hibernate 6.6
- This recipe upgrades Jakarta JPA to 3.1 and Hibernate to 6.6 (compatible with Jakarta EE 10).
- com.oracle.weblogic.rewrite.hibernate.AddHibernateOrmCore61
- Add Hibernate ORM Core if has dependencies
- This recipe will add Hibernate ORM Core if has dependencies.
- com.oracle.weblogic.rewrite.hibernate.MigrateHibernateToJakartaEE9
- Migrate to Hibernate for Jakarta EE 9
- Upgrade hibernate libraries to Jakarta EE9 versions.
- com.oracle.weblogic.rewrite.hibernate.UpgradeHibernateTo66
- Upgrade Hibernate to 6.6
- This recipe upgrades Hibernate to version 6.6, which is compatible with Jakarta EE 10 and JPA 3.1. It also upgrades a few of the commonly used Hibernate add-ons.
- com.oracle.weblogic.rewrite.jakarta.UpgradeCommonOpenSourceLibraries
- Upgrade Common open source libraries
- Upgrade Common open source libraries libraries to Jakarta EE9 versions.
- io.moderne.java.spring.orm.SpringORM5
- Migrate to Spring ORM to 5
- Migrate applications using Spring ORM Hibernate Support to Hibernate 5 compatible version. This will enable a further migration by the Spring Framework migration past 5.
hosting
2 recipes
- OpenRewrite.Recipes.AspNetCore3.FindWebHostBuilder
- Find WebHostBuilder usage
- Flags
WebHostBuilderandWebHost.CreateDefaultBuilderusage that should migrate to the Generic Host pattern in ASP.NET Core 3.0+.
- OpenRewrite.Recipes.Net10.FindBackgroundServiceExecuteAsync
- Find
BackgroundService.ExecuteAsyncbehavior change - Finds methods that override
ExecuteAsyncfromBackgroundService. In .NET 10, the entire method runs on a background thread; synchronous code before the firstawaitno longer blocks host startup.
- Find
html
1 recipe
- org.openrewrite.python.migrate.ReplaceHtmlParserUnescape
- Replace
HTMLParser.unescape()withhtml.unescape() HTMLParser.unescape()was removed in Python 3.9. Usehtml.unescape()instead.
- Replace
httpclient
5 recipes
- org.openrewrite.apache.httpclient4.UpgradeApacheHttpClient_4_5
- Migrates to ApacheHttpClient 4.5.x
- Migrate applications to the latest Apache HttpClient 4.5.x release. This recipe modifies application's build files, make changes to deprecated/preferred APIs, and migrates configuration settings that have changes between versions.
- org.openrewrite.apache.httpclient5.UpgradeApacheHttpClientDependencies
- Migrate from org.apache.httpcomponents to ApacheHttpClient 5.x dependencies
- Adopt
org.apache.httpcomponents.client5:httpclient5fromorg.apache.httpcomponents.
- org.openrewrite.apache.httpclient5.UpgradeApacheHttpClient_5
- Migrate to ApacheHttpClient 5.x
- Migrate applications to the latest Apache HttpClient 5.x release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.apache.httpclient5.UpgradeApacheHttpClient_5_AsyncClientClassMapping
- Migrate Apache HttpAsyncClient 4.x classes to HttpClient 5.x
- Migrates classes from Apache HttpAsyncClient 4.x
httpasyncclientto their equivalents in HttpClient 5.x.
- org.openrewrite.apache.httpclient5.UpgradeApacheHttpCoreNioDependencies
- Migrate from httpcore-nio to ApacheHttpClient 5.x core dependency
- Adopt
org.apache.httpcomponents.core5:httpcore5fromorg.apache.httpcomponents:httpcore-nio.
inject
3 recipes
- io.quarkus.updates.core.quarkus30.JavaxInjectMigrationToJakartaInject
- Migrate deprecated
javax.injectpackages tojakarta.inject - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxInjectMigrationToJakartaInject
- Migrate deprecated
javax.injectpackages tojakarta.inject - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.javax.AddInjectDependencies
- Add explicit Inject dependencies
- Add the necessary
inject-apidependency from Jakarta EE 8 to maintain compatibility with Java version 11 or greater.
integration
1 recipe
- org.openrewrite.quarkus.spring.SpringBootIntegrationToQuarkus
- Replace Spring Boot Integration with Camel Quarkus
- Migrates
spring-boot-starter-integrationtocamel-quarkus-core.
intellij
1 recipe
- org.openrewrite.java.migrate.ComIntelliJAnnotationsToOrgJetbrainsAnnotations
- Migrate com.intellij:annotations to org.jetbrains:annotations
- This recipe will upgrade old dependency of com.intellij:annotations to the newer org.jetbrains:annotations.
interop
2 recipes
- OpenRewrite.Recipes.Net10.FindDllImportSearchPath
- Find
DllImportSearchPath.AssemblyDirectorybehavior change - Finds usages of
DllImportSearchPath.AssemblyDirectorywhich has changed behavior in .NET 10. Specifying onlyAssemblyDirectoryno longer falls back to OS default search paths.
- Find
- OpenRewrite.Recipes.Net5.FindWinRTInterop
- Find WinRT interop usage (removed in .NET 5)
- Finds usages of WinRT interop types (
WindowsRuntimeType,WindowsRuntimeMarshal, etc.) which were removed in .NET 5.
jackson
25 recipes
- org.openrewrite.java.jackson.AddJsonCreatorToPrivateConstructors
- Add
@JsonCreatorto non-public constructors - Jackson 3 strictly enforces creator visibility rules. Non-public constructors in Jackson-annotated classes that were auto-detected in Jackson 2 need an explicit
@JsonCreatorannotation to work for deserialization in Jackson 3. - Tags: jackson-3
- Add
- org.openrewrite.java.jackson.CodehausClassesToFasterXML
- Migrate classes from Jackson Codehaus (legacy) to Jackson FasterXML
- In Jackson 2, the package and dependency coordinates moved from Codehaus to FasterXML.
- Tags: jackson-2
- org.openrewrite.java.jackson.CodehausToFasterXML
- Migrate from Jackson Codehaus (legacy) to Jackson FasterXML
- In Jackson 2, the package and dependency coordinates moved from Codehaus to FasterXML.
- Tags: jackson-2
- org.openrewrite.java.jackson.IOExceptionToJacksonException
- Replace
IOExceptionwithJacksonExceptionin catch clauses - In Jackson 3,
ObjectMapperand related classes no longer throwIOException. This recipe replacescatch (IOException e)withcatch (JacksonException e)when the try block contains Jackson API calls. When the try block also contains non-Jackson code that throwsIOException, the catch is changed to a multi-catchcatch (JacksonException | IOException e). - Tags: jackson-3
- Replace
- org.openrewrite.java.jackson.JacksonBestPractices
- Jackson best practices
- Apply best practices for using Jackson library, including upgrade to Jackson 2.x and removing redundant annotations.
- Tags: jackson-2
- org.openrewrite.java.jackson.MigrateMapperSettersToBuilder
- Migrate
JsonMappersetter calls to builder pattern - In Jackson 3,
JsonMapperis immutable. Configuration methods likesetFilterProvider,addMixIn,disable,enable, etc. must be called on the builder instead. This recipe migrates setter calls to the builder pattern when safe, or adds TODO comments when automatic migration is not possible. - Tags: jackson-3
- Migrate
- org.openrewrite.java.jackson.RemoveBuiltInModuleRegistrations
- Remove registrations of modules built-in to Jackson 3
- In Jackson 3,
ParameterNamesModule,Jdk8Module, andJavaTimeModuleare built intojackson-databindand no longer need to be registered manually. This recipe removesObjectMapper.registerModule()andMapperBuilder.addModule()calls for these modules. - Tags: jackson-3
- org.openrewrite.java.jackson.RemoveRedundantFeatureFlags
- Remove redundant Jackson 3 feature flag configurations
- Remove
ObjectMapperfeature flag configurations that set values to their new Jackson 3 defaults. For example,disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)andconfigure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)are redundant since this is now disabled by default in Jackson 3. - Tags: jackson-3
- org.openrewrite.java.jackson.RemoveRedundantJsonPropertyValue
- Remove redundant
@JsonPropertyargument - Remove
@JsonPropertyannotation or value attribute when the value matches the argument name. - Tags: jackson-2
- Remove redundant
- org.openrewrite.java.jackson.ReplaceJsonIgnoreWithJsonSetter
- Replace
@JsonIgnorewith@JsonSetteron empty collection fields - In Jackson 3,
@JsonIgnoreon fields initialized with empty collections causes the field value to becomenullinstead of maintaining the empty collection. This recipe replaces@JsonIgnorewith@JsonSetter(nulls = Nulls.AS_EMPTY)onMapandCollectionfields that have an empty collection initializer. - Tags: jackson-3
- Replace
- org.openrewrite.java.jackson.ReplaceObjectMapperCopy
- Replace
ObjectMapper.copy()withrebuild().build() - In Jackson 3,
ObjectMapper.copy()was removed. Usemapper.rebuild().build()instead. - Tags: jackson-3
- Replace
- org.openrewrite.java.jackson.ReplaceStreamWriteCapability
- Replace removed
JsonGeneratorcapability methods withStreamWriteCapability - In Jackson 3,
JsonGenerator.canWriteBinaryNatively()andcanWriteFormattedNumbers()were removed and replaced with theStreamWriteCapabilityenum. This recipe updates these method calls to usegetWriteCapabilities().isEnabled(StreamWriteCapability.*)instead. - Tags: jackson-3
- Replace removed
- org.openrewrite.java.jackson.SimplifyJacksonExceptionCatch
- Simplify catch clauses for Jackson exceptions
- In Jackson 3,
JacksonExceptionand its subtypes extendRuntimeException. This recipe simplifies multi-catch clauses by removing Jackson exception types whenRuntimeExceptionis also caught, since catching both is redundant. For example,catch (JacksonException | RuntimeException e)becomescatch (RuntimeException e). - Tags: jackson-3
- org.openrewrite.java.jackson.UpdateSerializationInclusionConfiguration
- Update configuration of serialization inclusion in
ObjectMapperfor Jackson 3 - In Jackson 3,
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL)is no longer supported and should be replaced bychangeDefaultPropertyInclusion()for bothvalueInclusionandcontentInclusion. - Tags: jackson-3
- Update configuration of serialization inclusion in
- org.openrewrite.java.jackson.UpgradeJackson_2_3
- Migrates from Jackson 2.x to Jackson 3.x
- Migrate applications to the latest Jackson 3.x release. This recipe handles package changes (
com.fasterxml.jackson->tools.jackson), dependency updates, core class renames, exception renames, and method renames (e.g.,JsonGenerator.writeObject()->writePOJO(),JsonParser.getCurrentValue()->currentValue()). - Tags: jackson-3
- org.openrewrite.java.jackson.UpgradeJackson_2_3_Dependencies
- Upgrade Jackson 2.x dependencies to 3.x
- Upgrade Jackson Maven dependencies from 2.x to 3.x versions and update group IDs.
- Tags: jackson-3
- org.openrewrite.java.jackson.UpgradeJackson_2_3_JsonGeneratorMethodRenames
- Rename Jackson 2.x methods to 3.x equivalents for JsonGenerator
- Rename JsonGenerator methods that were renamed in 3.x (e.g.,
writeObject()towritePOJO(),getCurrentValue()tocurrentValue()). - Tags: jackson-3
- org.openrewrite.java.jackson.UpgradeJackson_2_3_JsonNodeMethodRenames
- Rename Jackson 2.x methods to 3.x equivalents for JsonNode
- Rename JsonNode methods that were renamed in 3.x (e.g.,
elements()tovalues(),fields()toentries()). - Tags: jackson-3
- org.openrewrite.java.jackson.UpgradeJackson_2_3_JsonParserMethodRenames
- Rename Jackson 2.x methods to 3.x equivalents for JsonParser
- Rename JsonParser methods that were renamed in 3.x (e.g.,
getTextCharacters()togetStringCharacters(),getCurrentValue()tocurrentValue()). - Tags: jackson-3
- org.openrewrite.java.jackson.UpgradeJackson_2_3_MethodRenames
- Rename Jackson 2.x methods to 3.x equivalents
- Rename Jackson methods that were renamed in 3.x (e.g.,
writeObject()towritePOJO(),getCurrentValue()tocurrentValue()). - Tags: jackson-3
- org.openrewrite.java.jackson.UpgradeJackson_2_3_PackageChanges
- Update Jackson package names from 2.x to 3.x
- Update Jackson package imports from
com.fasterxml.jacksontotools.jackson. - Tags: jackson-3
- org.openrewrite.java.jackson.UpgradeJackson_2_3_RelocatedFeatureConstants
- Migrate relocated feature constants to DateTimeFeature and EnumFeature
- Jackson 3 moved date/time-related feature constants from
SerializationFeatureandDeserializationFeatureintoDateTimeFeature, and enum-related constants intoEnumFeature. - Tags: jackson-3
- org.openrewrite.java.jackson.UpgradeJackson_2_3_RemoveRedundantFeatureFlags
- Remove redundant Jackson 3 feature flag configurations
- Remove
ObjectMapperfeature flag configurations that are now defaults in Jackson 3. - Tags: jackson-3
- org.openrewrite.java.jackson.UpgradeJackson_2_3_TypeChanges
- Update Jackson 2.x types to 3.x
- Update Jackson type names including exception types and core class renames.
- Tags: jackson-3
- org.openrewrite.java.jackson.UseModernDateTimeSerialization
- Use modern date/time serialization defaults
- Remove redundant
@JsonFormatannotations onjava.timetypes that specify ISO-8601 patterns, as Jackson 3 uses ISO-8601 as the default format (withWRITE_DATES_AS_TIMESTAMPSnow disabled by default). - Tags: jackson-3
jacoco
1 recipe
- org.openrewrite.java.migrate.jacoco.UpgradeJaCoCo
- Upgrade JaCoCo
- This recipe will upgrade JaCoCo to the latest patch version, which traditionally advertises full backwards compatibility for older Java versions.
jakarta
102 recipes
- com.oracle.weblogic.rewrite.FacesMigrationToJakartaFaces2x
- JSF 1.x to Jakarta Server Faces 2.3 on WebLogic 14.1.2 or older
- Jakarta EE 8 uses Faces 2.3 a major upgrade to Jakarta packages and XML namespaces. This recipe will migrate JSF 1.x to Jakarta Server Faces 2.3 on WebLogic 14.1.2 or older.
- com.oracle.weblogic.rewrite.JakartaEE9_1
- Migrate to Jakarta EE 9.1
- These recipes help with Migration to Jakarta EE 9.1, flagging and updating deprecated methods.
- com.oracle.weblogic.rewrite.UpgradeJPATo31HibernateTo66
- Upgrade Jakarta JPA to 3.1 and Hibernate 6.6
- This recipe upgrades Jakarta JPA to 3.1 and Hibernate to 6.6 (compatible with Jakarta EE 10).
- com.oracle.weblogic.rewrite.hibernate.AddHibernateOrmCore61
- Add Hibernate ORM Core if has dependencies
- This recipe will add Hibernate ORM Core if has dependencies.
- com.oracle.weblogic.rewrite.hibernate.MigrateHibernateToJakartaEE9
- Migrate to Hibernate for Jakarta EE 9
- Upgrade hibernate libraries to Jakarta EE9 versions.
- com.oracle.weblogic.rewrite.jakarta.AddJakartaEE9ServletDependencyIfUsingServletContext
- Add Jakarta EE 9 Servlet Dependency
- Add Jakarta EE 9 Servlet Dependency if using jakarta.servlet.ServletContext
- com.oracle.weblogic.rewrite.jakarta.Faces2xMigrationToJakartaFaces3x
- JSF 2.x to Jakarta Server Faces 3.x
- Jakarta EE 9 uses Faces 3.0 a major upgrade to Jakarta packages and XML namespaces.
- com.oracle.weblogic.rewrite.jakarta.JakartaEeNamespaces9_1
- Migrate from JavaX to Jakarta EE 9.1 Namespaces
- These recipes help with Migration From JavaX to Jakarta EE 9.1 Namespaces.
- com.oracle.weblogic.rewrite.jakarta.JakartaFaces3Xhtml
- Faces XHTML migration for Jakarta EE 9
- Find and replace legacy JSF namespaces and javax references with Jakarta Faces values in XHTML files.
- com.oracle.weblogic.rewrite.jakarta.JavaxAnnotationMigrationToJakarta9Annotation
- Migrate deprecated
javax.annotationtojakarta.annotation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- com.oracle.weblogic.rewrite.jakarta.JavaxApplicationClientXmlToJakarta9ApplicationClientXml
- Migrate xmlns entries in
application-client.xmlfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxApplicationXmlToJakarta9ApplicationXml
- Migrate xmlns entries in
application.xmlfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxBatchJobsXmlsToJakarta9BatchJobsXmls
- Migrate xmlns entries in
**/batch-jobs/*.xmlfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxBatchXmlToJakarta9BatchXml
- Migrate xmlns entries in
batch.xmlfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxBeansXmlToJakarta9BeansXml
- Migrate xmlns entries in
beans.xmlfiles for Beans 3.0. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxBindingsSchemaXjbsToJakarta9BindingsSchemaXjbs
- Migrate xmlns entries in
*.xjbfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxEjbJarXmlToJakarta9EjbJarXml
- Migrate xmlns entries in
ejb-jar.xmlfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxFacesConfigXmlToJakartaFaces3ConfigXml
- Migrate xmlns entries in
faces-config.xmlfiles for Jakarta Server Faces 3 - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxFacesTagLibraryXmlToJakartaFaces3TagLibraryXml
- Migrate xmlns entries in
*taglib*.xmlfiles for Jakarta Server Faces 3 - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxJmsToJakartaJmsOnMdb
- Migrate javax.jms to jakarta.jms on MDB
- Migrate javax.jms to jakarta.jms on MDB
- com.oracle.weblogic.rewrite.jakarta.JavaxPermissionsXmlToJakarta9PermissionsXml
- Migrate xmlns entries in
permissions.xmlfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxRaXmlToJakarta9RaXml
- Migrate xmlns entries in
ra.xmlfiles (Connectors). - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxTestWebXmlToJakartaTestWebXml5
- Migrate xmlns entries in
test-web.xmlfiles for Jakarta Server Faces 3 using test interfaces - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation for test interfaces like arquillian.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxTestXmlsToJakartaTestsXmls
- Migrate xmlns entries in
test-*.xmlfiles for Jakarta EE 9.1 using test interfaces - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation for test interfaces like arquillian.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxValidationMappingXmlsToJakarta9ValidationMappingXmls
- Migrate xmlns entries in
**/validation/*.xmlfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxWebFragmentXmlToJakartaWebFragmentXml5
- Migrate xmlns entries in
web-fragment.xmlfiles for Jakarta Server Faces 3 - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxWebHandlerXmlToJakarta9HandlerXml
- Migrate xmlns entries in
handler.xmlfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxWebJspTagLibraryTldsToJakarta9WebJspTagLibraryTlds
- Migrate xmlns entries in
*.tldfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxWebServicesXmlToJakarta9WebServicesXml
- Migrate xmlns entries in
webservices.xmlfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxWebXmlToJakartaWebXml5
- Migrate xmlns entries in
web.xmlfiles for Jakarta Server Faces 3 - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.MigrateJavaxMVCToJakartaEE9
- Migrate javax.mvc to 2.0 (Jakarta EE 9)
- Upgrade Jakarta Model-View-Controller libraries to 2.0 (Jakarta EE9) versions.
- com.oracle.weblogic.rewrite.jakarta.MigrateJavaxWebToJakartaWeb9
- Migrate javax.javaee-web-api to jakarta.jakartaee-web-api (Jakarta EE 9)
- Update Java EE Web API dependency to Jakarta EE Web Profile API 9.1
- com.oracle.weblogic.rewrite.jakarta.MigrateTagLibsToJakartaEE9
- Migrate Tag Libraries to 2.0 (Jakarta EE 9)
- Upgrade Jakarta Standard Tag libraries to 2.0 (Jakarta EE9) versions.
- com.oracle.weblogic.rewrite.jakarta.MitigateUnaffectedNonEEJakarta9Packages
- Mitigate Unaffected Non-EE Jakarta 9 Packages
- Mitigate Unaffected Non-EE Jakarta 9 Packages. Reference: https://github.com/jakartaee/platform/blob/main/namespace/unaffected-packages.adoc
- com.oracle.weblogic.rewrite.jakarta.UpdateJakartaPlatform9_1
- Update Jakarta EE Platform Dependencies to 9.1.0
- Update Jakarta EE Platform Dependencies to 9.1.0
- com.oracle.weblogic.rewrite.jakarta.UpgradeCommonOpenSourceLibraries
- Upgrade Common open source libraries
- Upgrade Common open source libraries libraries to Jakarta EE9 versions.
- com.oracle.weblogic.rewrite.jakarta.UpgradeFacesOpenSourceLibraries2
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.
- com.oracle.weblogic.rewrite.jakarta.UpgradeFacesOpenSourceLibraries3
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.
- com.oracle.weblogic.rewrite.jakarta.UpgradeMavenPluginConfigurationArtifacts
- Change artifacts for a Maven plugin configuration
- Change artifacts for a Maven plugin configuration artifacts.
- io.quarkus.updates.core.quarkus30.ChangeJavaxAnnotationToJakarta
- Migrate deprecated
javax.annotationpackages tojakarta.annotation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation. Excludes
javax.annotation.processing.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxActivationMigrationToJakartaActivation
- Migrate deprecated
javax.activationpackages tojakarta.activation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxAnnotationMigrationToJakartaAnnotation
- Migrate deprecated
javax.annotationpackages tojakarta.annotation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxAnnotationPackageToJakarta
- Migrate deprecated
javax.annotationpackages tojakarta.annotation - Change type of classes in the
javax.annotationpackage to jakarta.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxAnnotationSecurityPackageToJakarta
- Migrate deprecated
javax.annotation.securitypackages tojakarta.annotation.security - Change type of classes in the
javax.annotation.securitypackage to jakarta.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxAnnotationSqlPackageToJakarta
- Migrate deprecated
javax.annotation.sqlpackages tojakarta.annotation.sql - Change type of classes in the
javax.annotation.sqlpackage to jakarta.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxAuthenticationMigrationToJakartaAuthentication
- Migrate deprecated
javax.security.auth.messagepackages tojakarta.security.auth.message - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxAuthorizationMigrationToJakartaAuthorization
- Migrate deprecated
javax.security.jaccpackages tojakarta.security.jacc - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxBatchMigrationToJakartaBatch
- Migrate deprecated
javax.batchpackages tojakarta.batch - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxInjectMigrationToJakartaInject
- Migrate deprecated
javax.injectpackages tojakarta.inject - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxTransactionMigrationToJakartaTransaction
- Migrate deprecated
javax.transactionpackages tojakarta.transaction - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxValidationMigrationToJakartaValidation
- Migrate deprecated
javax.validationpackages tojakarta.validation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxXmlBindMigrationToJakartaXmlBind
- Migrate deprecated
javax.xml.bindpackages tojakarta.xml.bind - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxXmlWsMigrationToJakartaXmlWs
- Migrate deprecated
javax.xml.wspackages tojakarta.xml.ws - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.Java8toJava11
- Migrate to Java 11
- This recipe will apply changes commonly needed when upgrading to Java 11. Specifically, for those applications that are built on Java 8, this recipe will update and add dependencies on J2EE libraries that are no longer directly bundled with the JDK. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 11 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 11.
- org.openrewrite.java.migrate.jakarta.Faces2xMigrationToJakartaFaces3x
- JSF 2.x to Jakarta Faces 3.x
- Jakarta EE 9 uses Faces 3.0, a major upgrade to Jakarta packages and XML namespaces.
- org.openrewrite.java.migrate.jakarta.Faces3xMigrationToFaces4x
- Upgrade to Jakarta Faces 4.x
- Jakarta EE 10 uses Faces 4.0.
- org.openrewrite.java.migrate.jakarta.Faces4xMigrationToFaces41x
- Jakarta Faces 4.0 to 4.1
- Jakarta EE 11 uses Faces 4.1 a minor upgrade.
- org.openrewrite.java.migrate.jakarta.JakartaEE10
- Migrate to Jakarta EE 10
- These recipes help with the Migration to Jakarta EE 10, flagging and updating deprecated methods.
- org.openrewrite.java.migrate.jakarta.JakartaEE11
- Migrate to Jakarta EE 11
- These recipes help with the Migration to Jakarta EE 11, flagging and updating deprecated methods.
- org.openrewrite.java.migrate.jakarta.JakartaFacesConfigXml4
- Migrate xmlns entries in
faces-config.xmlfiles - Jakarta EE 10 uses Faces version 4.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JakartaFacesEcmaScript
- Migrate JSF values inside EcmaScript files
- Convert JSF to Faces values inside JavaScript,TypeScript, and Properties files.
- org.openrewrite.java.migrate.jakarta.JakartaFacesTagLibraryXml4
- Migrate xmlns entries in
taglib.xmlfiles - Faces 4 uses facelet-taglib 4.0.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JakartaFacesXhtmlEE10
- Faces XHTML migration for Jakarta EE 10
- Find and replace legacy JSF namespace URIs with Jakarta Faces URNs in XHTML files.
- org.openrewrite.java.migrate.jakarta.JakartaFacesXhtmlEE9
- Faces XHTML migration for Jakarta EE 9
- Find and replace javax references to jakarta in XHTML files.
- org.openrewrite.java.migrate.jakarta.JakartaWebFragmentXml6
- Migrate xmlns entries in
web-fragment.xmlfiles - Faces 4 uses web-fragment 6.0.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JakartaWebXml6
- Migrate xmlns entries in
web.xmlfiles - Faces 4 uses web-app 6.0.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JavaxActivationMigrationToJakartaActivation
- Migrate deprecated
javax.activationpackages tojakarta.activation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxAnnotationMigrationToJakartaAnnotation
- Migrate deprecated
javax.annotationtojakarta.annotation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxAuthenticationMigrationToJakartaAuthentication
- Migrate deprecated
javax.security.auth.messagepackages tojakarta.security.auth.message - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxAuthorizationMigrationToJakartaAuthorization
- Migrate deprecated
javax.security.jaccpackages tojakarta.security.jacc - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxBatchMigrationToJakartaBatch
- Migrate deprecated
javax.batchpackages tojakarta.batch - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxBeanValidationXmlToJakartaBeanValidationXml
- Migrate xmlns entries and javax. packages in
validation.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries and javax. packages in
- org.openrewrite.java.migrate.jakarta.JavaxBeansXmlToJakartaBeansXml
- Migrate xmlns entries in
beans.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JavaxEjbJarXmlToJakartaEjbJarXml
- Migrate xmlns entries and javax. packages in
ejb-jar.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries and javax. packages in
- org.openrewrite.java.migrate.jakarta.JavaxFacesConfigXmlToJakartaFacesConfigXml
- Migrate xmlns entries in
faces-config.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JavaxFacesTagLibraryXmlToJakartaFacesTagLibraryXml
- Migrate xmlns entries in
taglib.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JavaxInjectMigrationToJakartaInject
- Migrate deprecated
javax.injectpackages tojakarta.inject - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta
- Migrate to Jakarta EE 9
- Jakarta EE 9 is the first version of Jakarta EE that uses the new
jakartanamespace.
- org.openrewrite.java.migrate.jakarta.JavaxOrmXmlToJakartaOrmXml
- Migrate xmlns entries in
orm.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JavaxTransactionMigrationToJakartaTransaction
- Migrate deprecated
javax.transactionpackages tojakarta.transaction - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxValidationMigrationToJakartaValidation
- Migrate deprecated
javax.validationpackages tojakarta.validation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxWebFragmentXmlToJakartaWebFragmentXml
- Migrate xmlns entries in
web-fragment.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JavaxWebXmlToJakartaWebXml
- Migrate xmlns entries in
web.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JavaxXmlBindMigrationToJakartaXmlBind
- Migrate deprecated
javax.xml.bindpackages tojakarta.xml.bind - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxXmlToJakartaXmlXJCBinding
- Migrate XJC Bindings to Jakata XML
- Java EE has been rebranded to Jakarta EE, migrates the namespace and version in XJC bindings.
- org.openrewrite.java.migrate.jakarta.JavaxXmlWsMigrationToJakartaXmlWs
- Migrate deprecated
javax.xml.wspackages tojakarta.xml.ws - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.MigrationToJakarta10Apis
- Migrate Jakarta EE 9 api dependencies to Jakarta EE 10 versions
- Jakarta EE 10 updates some apis compared to Jakarta EE 9.
- org.openrewrite.java.migrate.jakarta.OmniFacesNamespaceMigration
- OmniFaces Namespace Migration
- Find and replace legacy OmniFaces namespaces.
- org.openrewrite.java.migrate.jakarta.RetainJaxbApiForJackson
- Retain
javax.xml.bind:jaxb-apiwhenjackson-module-jaxb-annotationsis present - When migrating from
javax.xml.bindtojakarta.xml.bind3.0+, thejavax.xml.bind:jaxb-apidependency is normally replaced. However, ifjackson-module-jaxb-annotationsis on the classpath (and still uses thejavax.xml.bindnamespace), this recipe ensuresjavax.xml.bind:jaxb-apiremains available as a runtime dependency to preventNoClassDefFoundError.
- Retain
- org.openrewrite.java.migrate.jakarta.UpdateManagedBeanToNamed
- Update Faces
@ManagedBeanto use CDI@Named - Faces ManagedBean was deprecated in JSF 2.3 (EE8) and removed in Jakarta Faces 4.0 (EE10). Replace
@ManagedBeanwith@Namedfor CDI-based bean management.
- Update Faces
- org.openrewrite.java.migrate.jakarta.UpgradeFaces3OpenSourceLibraries
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.
- org.openrewrite.java.migrate.jakarta.UpgradeFaces41OpenSourceLibraries
- Upgrade Faces open source libraries
- Upgrade OmniFaces and MyFaces/Mojarra libraries to Jakarta EE11 versions.
- org.openrewrite.java.migrate.jakarta.UpgradeFaces4OpenSourceLibraries
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE10 versions.
- org.openrewrite.java.migrate.javax.AddCommonAnnotationsDependencies
- Add explicit Common Annotations dependencies
- Add the necessary
annotation-apidependency from Jakarta EE 8 to maintain compatibility with Java version 11 or greater.
- org.openrewrite.java.migrate.javax.AddInjectDependencies
- Add explicit Inject dependencies
- Add the necessary
inject-apidependency from Jakarta EE 8 to maintain compatibility with Java version 11 or greater.
- org.openrewrite.java.migrate.javax.AddJaxbAPIDependencies
- Add explicit JAXB API dependencies
- This recipe will add explicit API dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the
javax.xml.bindnamespace. Running a full javax to Jakarta migration usingorg.openrewrite.java.migrate.jakarta.JavaxMigrationToJakartawill update to versions greater than 3.x which necessitates the package change as well.
- org.openrewrite.java.migrate.javax.AddJaxbDependenciesWithRuntime
- Add explicit JAXB API dependencies and runtime
- This recipe will add explicit dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the
javax.xml.bindnamespace. Running a full javax to Jakarta migration usingorg.openrewrite.java.migrate.jakarta.JavaxMigrationToJakartawill update to versions greater than 3.x which necessitates the package change as well.
- org.openrewrite.java.migrate.javax.AddJaxbDependenciesWithoutRuntime
- Add explicit JAXB API dependencies and remove runtimes
- This recipe will add explicit API dependencies without runtime dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing API dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the
javax.xml.bindnamespace. All JAXB runtime implementation dependencies are removed.
- org.openrewrite.java.migrate.javax.AddJaxbRuntime
- Use latest JAXB API and runtime for Jakarta EE 8
- Update build files to use the latest JAXB runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAXB run-time, in Gradle
compileOnly+testImplementationand Mavenprovidedscope, to any project that has a transitive dependency on the JAXB API. The resulting dependencies still use thejavaxnamespace, despite the move to the Jakarta artifact.
- org.openrewrite.java.migrate.javax.AddJaxwsDependencies
- Add explicit JAX-WS dependencies
- This recipe will add explicit dependencies for Jakarta EE 8 when a Java 8 application is using JAX-WS. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 but the application can continue to use the
javax.xml.bindnamespace.
- org.openrewrite.java.migrate.javax.AddJaxwsRuntime
- Use the latest JAX-WS API and runtime for Jakarta EE 8
- Update build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAX-WS run-time, in Gradle
compileOnly+testImplementationand Mavenprovidedscope, to any project that has a transitive dependency on the JAX-WS API. The resulting dependencies still use thejavaxnamespace, despite the move to the Jakarta artifact.
- org.openrewrite.openapi.swagger.UseJakartaSwaggerArtifacts
- Use Jakarta Swagger Artifacts
- Migrate from javax Swagger artifacts to Jakarta versions.
jakartaee
6 recipes
- com.oracle.weblogic.rewrite.FacesMigrationToJakartaFaces2x
- JSF 1.x to Jakarta Server Faces 2.3 on WebLogic 14.1.2 or older
- Jakarta EE 8 uses Faces 2.3 a major upgrade to Jakarta packages and XML namespaces. This recipe will migrate JSF 1.x to Jakarta Server Faces 2.3 on WebLogic 14.1.2 or older.
- com.oracle.weblogic.rewrite.JakartaEE9_1
- Migrate to Jakarta EE 9.1
- These recipes help with Migration to Jakarta EE 9.1, flagging and updating deprecated methods.
- com.oracle.weblogic.rewrite.jakarta.Faces2xMigrationToJakartaFaces3x
- JSF 2.x to Jakarta Server Faces 3.x
- Jakarta EE 9 uses Faces 3.0 a major upgrade to Jakarta packages and XML namespaces.
- com.oracle.weblogic.rewrite.jakarta.JakartaEeNamespaces9_1
- Migrate from JavaX to Jakarta EE 9.1 Namespaces
- These recipes help with Migration From JavaX to Jakarta EE 9.1 Namespaces.
- com.oracle.weblogic.rewrite.jakarta.UpdateJakartaPersistenceTo31
- Update Jakarta Persistence to 3.1
- Update Jakarta Persistence to 3.1.
- com.oracle.weblogic.rewrite.jakarta.UpdateJakartaPersistenceTo32
- Update Jakarta Persistence to 3.2
- Update Jakarta Persistence to 3.2.
jasperreports
4 recipes
- io.moderne.jasperreports.MigrateExporterConfigToJasper6
- Update JasperReports exporter configuration
- Updates deprecated exporter parameter imports to the new configuration classes introduced in JasperReports 6. This includes migrating from parameter classes to configuration classes for PDF, HTML, CSV, and other exporters.
- io.moderne.jasperreports.MigrateXlsToXlsxExporter
- Migrate JRXlsExporter to JRXlsxExporter
- Migrates the deprecated
JRXlsExporterto the newJRXlsxExporterclass in JasperReports 6. Also updates related configuration classes from XLS to XLSX variants.
- io.moderne.jasperreports.UpgradeToJasperReports5
- Migrate to JasperReports 5.6.x
- Migrates JasperReports from 4.6.0 to 5.6.x. This recipe includes minimal breaking changes, allowing teams to test and validate the migration before proceeding to version 6.
- io.moderne.jasperreports.UpgradeToJasperReports6
- Migrate to JasperReports 6
- Migrates JasperReports from 5.x to 6.x with the new exporter API, XLS to XLSX move, and removal of Spring JasperReports views.
java
10 recipes
- com.oracle.weblogic.rewrite.MigrateWebLogicSchemasTo1412
- Migrate WebLogic Schemas to 14.1.2
- This recipe will migrate WebLogic schemas to 14.1.2
- com.oracle.weblogic.rewrite.MigrateWebLogicSchemasTo1511
- Migrate WebLogic Schemas to 15.1.1
- This recipe will migrate WebLogic schemas to 15.1.1
- com.oracle.weblogic.rewrite.UpgradeTo1411
- Migrate to WebLogic 14.1.1
- This recipe will apply changes required for migrating to WebLogic 14.1.1
- com.oracle.weblogic.rewrite.UpgradeTo1412
- Migrate to WebLogic 14.1.2
- This recipe will apply changes required for migrating to WebLogic 14.1.2
- com.oracle.weblogic.rewrite.UpgradeTo1511
- Migrate to WebLogic 15.1.1
- This recipe will apply changes required for migrating to WebLogic 15.1.1 and Jakarta EE 9.1
- com.oracle.weblogic.rewrite.WebLogic1412JavaXmlBindMitigation
- Mitigation of Java XML Bind Deprecation in Java 11 vs WebLogic 14.1.2
- This recipe will mitigate the Javax XML Bind deprecation in Java 11 vs WebLogic 14.1.2
- org.openrewrite.java.jspecify.JSpecifyBestPractices
- JSpecify best practices
- Apply JSpecify best practices, such as migrating off of alternatives, and adding missing
@Nullableannotations.
- org.openrewrite.java.jspecify.MigrateToJSpecify
- Migrate to JSpecify
- This recipe will migrate to JSpecify annotations from various other nullability annotation standards.
- org.openrewrite.java.logging.log4j.JulToLog4j
- Migrate JUL to Log4j 2.x API
- Transforms code written using
java.util.loggingto use Log4j 2.x API. - Tags: java-util-logging
- org.openrewrite.java.logging.slf4j.JulToSlf4j
- Migrate JUL to SLF4J
- Migrates usage of Java Util Logging (JUL) to using SLF4J directly.
- Tags: java-util-logging
java10
1 recipe
- org.openrewrite.java.migrate.lang.UseVar
- Use local variable type inference
- Apply local variable type inference (
var) for primitives and objects. These recipes can cause unused imports, be advised to run `org.openrewrite.java.RemoveUnusedImports afterwards.
java11
29 recipes
- org.openrewrite.java.migrate.IBMJDKtoOracleJDK
- Migrate from IBM Runtimes to Oracle Runtimes
- This recipe will apply changes commonly needed when upgrading Java versions. The solutions provided in this list are solutions necessary for migrating from IBM Runtimes to Oracle Runtimes.
- org.openrewrite.java.migrate.IBMSemeru
- Migrate to IBM Semeru Runtimes
- This recipe will apply changes commonly needed when upgrading Java versions. The solutions provided in this list are solutions only available in IBM Semeru Runtimes.
- org.openrewrite.java.migrate.InternalBindPackages
- Use
com.sun.xml.bind.*instead ofcom.sun.xml.internal.bind.* - Do not use APIs from
com.sun.xml.internal.bind.*packages.
- Use
- org.openrewrite.java.migrate.JREDoNotUseSunNetSslAPIs
- Use
javax.net.sslinstead ofcom.sun.net.ssl - Do not use APIs from
com.sun.net.sslpackages.
- Use
- org.openrewrite.java.migrate.JREDoNotUseSunNetSslInternalSslProvider
- Use
com.ibm.jsse2instead ofcom.sun.net.ssl.internal.ssl - Do not use the
com.sun.net.ssl.internal.ssl.Providerclass.
- Use
- org.openrewrite.java.migrate.JREDoNotUseSunNetSslInternalWwwProtocol
- Use
com.ibm.net.ssl.www2.protocolinstead ofcom.sun.net.ssl.internal.www.protocol - Do not use the
com.sun.net.ssl.internal.www.protocolpackage.
- Use
- org.openrewrite.java.migrate.JREDoNotUseSunNetSslInternalWwwProtocolHttpsHandler
- Use
com.ibm.net.ssl.www2.protocol.https.Handlerinstead ofcom.sun.net.ssl.internal.www.protocol.https.Handler - Do not use the
com.sun.net.ssl.internal.www.protocol.https.Handlerclass.
- Use
- org.openrewrite.java.migrate.Java8toJava11
- Migrate to Java 11
- This recipe will apply changes commonly needed when upgrading to Java 11. Specifically, for those applications that are built on Java 8, this recipe will update and add dependencies on J2EE libraries that are no longer directly bundled with the JDK. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 11 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 11.
- org.openrewrite.java.migrate.Krb5LoginModuleClass
- Use
com.sun.security.auth.module.Krb5LoginModuleinstead ofcom.ibm.security.auth.module.Krb5LoginModule - Do not use the
com.ibm.security.auth.module.Krb5LoginModuleclass.
- Use
- org.openrewrite.java.migrate.RemovedJavaXMLWSModuleProvided
- Do not package
java.xml.wsmodule in WebSphere Liberty applications - The
java.xml.wsmodule was removed in Java11. Websphere Liberty provides its own implementation of the module, which can be used by specifying thejaxws-2.2feature in the server.xml file. This recipe updates thejavax.xml.wsdependency to use theprovidedscope to avoid class loading issues.
- Do not package
- org.openrewrite.java.migrate.RemovedJaxBModuleProvided
- Do not package
java.xml.bindandjava.activationmodules in WebSphere Liberty applications - The
java.xml.bindandjava.activationmodules were removed in Java11. Websphere Liberty provides its own implementation of the modules, which can be used by specifying thejaxb-2.2feature in the server.xml file. This recipe updates thejavax.xml.bindandjavax.activationdependencies to use theprovidedscope to avoid class loading issues.
- Do not package
- org.openrewrite.java.migrate.RemovedPolicy
- Replace
javax.security.auth.Policywithjava.security.Policy - The
javax.security.auth.Policyclass is not available from Java SE 11 onwards.
- Replace
- org.openrewrite.java.migrate.ThreadStopDestroy
- Remove
Thread.destroy()andThread.stop(Throwable) - The
java.lang.Thread.destroy()method was never implemented, and thejava.lang.Thread.stop(java.lang.Throwable)method has been unusable since Java SE 8. This recipe removes any usage of these methods from your application.
- Remove
- org.openrewrite.java.migrate.UpgradeBuildToJava11
- Upgrade build to Java 11
- Updates build files to use Java 11 as the target/source.
- org.openrewrite.java.migrate.UpgradePluginsForJava11
- Upgrade plugins to Java 11 compatible versions
- Updates plugins to version compatible with Java 11.
- org.openrewrite.java.migrate.cobertura.RemoveCoberturaMavenPlugin
- Remove Cobertura Maven plugin
- This recipe will remove Cobertura, as it is not compatible with Java 11.
- org.openrewrite.java.migrate.guava.NoGuavaJava11
- Prefer the Java 11 standard library instead of Guava
- Guava filled in important gaps in the Java standard library and still does. But at least some of Guava's API surface area is covered by the Java standard library now, and some projects may be able to remove Guava altogether if they migrate to standard library for these functions.
- org.openrewrite.java.migrate.guava.PreferJavaUtilObjectsRequireNonNullElse
- Prefer
java.util.Objects#requireNonNullElse - Prefer
java.util.Objects#requireNonNullElseinstead of usingcom.google.common.base.MoreObjects#firstNonNull.
- Prefer
- org.openrewrite.java.migrate.javax.AddCommonAnnotationsDependencies
- Add explicit Common Annotations dependencies
- Add the necessary
annotation-apidependency from Jakarta EE 8 to maintain compatibility with Java version 11 or greater.
- org.openrewrite.java.migrate.javax.AddInjectDependencies
- Add explicit Inject dependencies
- Add the necessary
inject-apidependency from Jakarta EE 8 to maintain compatibility with Java version 11 or greater.
- org.openrewrite.java.migrate.javax.AddJaxbAPIDependencies
- Add explicit JAXB API dependencies
- This recipe will add explicit API dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the
javax.xml.bindnamespace. Running a full javax to Jakarta migration usingorg.openrewrite.java.migrate.jakarta.JavaxMigrationToJakartawill update to versions greater than 3.x which necessitates the package change as well.
- org.openrewrite.java.migrate.javax.AddJaxbDependenciesWithRuntime
- Add explicit JAXB API dependencies and runtime
- This recipe will add explicit dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the
javax.xml.bindnamespace. Running a full javax to Jakarta migration usingorg.openrewrite.java.migrate.jakarta.JavaxMigrationToJakartawill update to versions greater than 3.x which necessitates the package change as well.
- org.openrewrite.java.migrate.javax.AddJaxbDependenciesWithoutRuntime
- Add explicit JAXB API dependencies and remove runtimes
- This recipe will add explicit API dependencies without runtime dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing API dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the
javax.xml.bindnamespace. All JAXB runtime implementation dependencies are removed.
- org.openrewrite.java.migrate.javax.AddJaxbRuntime
- Use latest JAXB API and runtime for Jakarta EE 8
- Update build files to use the latest JAXB runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAXB run-time, in Gradle
compileOnly+testImplementationand Mavenprovidedscope, to any project that has a transitive dependency on the JAXB API. The resulting dependencies still use thejavaxnamespace, despite the move to the Jakarta artifact.
- org.openrewrite.java.migrate.javax.AddJaxwsDependencies
- Add explicit JAX-WS dependencies
- This recipe will add explicit dependencies for Jakarta EE 8 when a Java 8 application is using JAX-WS. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 but the application can continue to use the
javax.xml.bindnamespace.
- org.openrewrite.java.migrate.javax.AddJaxwsRuntime
- Use the latest JAX-WS API and runtime for Jakarta EE 8
- Update build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAX-WS run-time, in Gradle
compileOnly+testImplementationand Mavenprovidedscope, to any project that has a transitive dependency on the JAX-WS API. The resulting dependencies still use thejavaxnamespace, despite the move to the Jakarta artifact.
- org.openrewrite.java.migrate.javax.MigrateJaxBWSPlugin
- Migrate JAXB-WS Plugin
- Upgrade the JAXB-WS Maven plugin to be compatible with Java 11.
- org.openrewrite.java.migrate.lombok.UpdateLombokToJava11
- Migrate Lombok to a Java 11 compatible version
- Update Lombok dependency to a version that is compatible with Java 11 and migrate experimental Lombok types that have been promoted.
- org.openrewrite.java.migrate.nio.file.PathsGetToPathOf
- Replace
Paths.getwithPath.of - The
java.nio.file.Paths.getmethod was introduced in Java SE 7. Thejava.nio.file.Path.ofmethod was introduced in Java SE 11. This recipe replaces all usages ofPaths.getwithPath.offor consistency.
- Replace
java17
23 recipes
- io.quarkus.updates.core.quarkus37.DeprecatedJavaxSecurityCert
- Use
java.security.certinstead ofjavax.security.cert - The
javax.security.certpackage has been deprecated for removal.
- Use
- io.quarkus.updates.core.quarkus37.DeprecatedLogRecordThreadID
- Adopt
setLongThreadIDinjava.util.logging.LogRecord - Avoid using the deprecated methods in
java.util.logging.LogRecord
- Adopt
- io.quarkus.updates.core.quarkus37.JavaVersion17
- Change Maven and Gradle Java version property values to 17
- Change maven.compiler.source and maven.compiler.target values to 17.
- io.quarkus.updates.core.quarkus37.Jre17AgentMainPreMainPublic
- Set visibility of
premainandagentmainmethods topublic - Check for a behavior change in Java agents.
- Set visibility of
- io.quarkus.updates.core.quarkus37.RemovedLegacySunJSSEProviderName
- Use
SunJSSEinstead ofcom.sun.net.ssl.internal.ssl.Provider - The
com.sun.net.ssl.internal.ssl.Providerprovider name was removed.
- Use
- io.quarkus.updates.core.quarkus37.UpgradeToJava17
- Migrate to Java 17
- This recipe will apply changes commonly needed when migrating to Java 17. Specifically, for those applications that are built on Java 8, this recipe will update and add dependencies on J2EE libraries that are no longer directly bundled with the JDK. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 17 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 17.
- org.apache.camel.upgrade.JavaVersion17
- Change Maven Java version property values to 17
- Change maven.compiler.source and maven.compiler.target values to 17.
- org.apache.camel.upgrade.UpgradeToJava17
- Migrate to Java 17
- This recipe will apply changes commonly needed when migrating to Java 17. Specifically, for those applications that are built on Java 8, this recipe will update and add dependencies on J2EE libraries that are no longer directly bundled with the JDK. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 17 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 17.
- org.openrewrite.java.migrate.AddLombokMapstructBinding
- Add
lombok-mapstruct-bindingwhen both MapStruct and Lombok are used - Add the
lombok-mapstruct-bindingannotation processor as needed when both MapStruct and Lombok are used.
- Add
- org.openrewrite.java.migrate.DeprecatedCountStackFramesMethod
- Remove
Thread.countStackFrames()method Thread.countStackFrames()has been removed in Java SE 14 and has been changed in this release to unconditionally throwUnsupportedOperationExceptionThis recipe removes the usage of this method in your application as long as the method is not assigned to a variable. For more information on the Java SE 14 deprecation of this method, see https://bugs.java.com/bugdatabase/view_bug?bug_id=8205132.
- Remove
- org.openrewrite.java.migrate.DeprecatedJavaxSecurityCert
- Use
java.security.certinstead ofjavax.security.cert - The
javax.security.certpackage has been deprecated for removal.
- Use
- org.openrewrite.java.migrate.DeprecatedLogRecordThreadID
- Adopt
setLongThreadIDinjava.util.logging.LogRecord - Avoid using the deprecated methods in
java.util.logging.LogRecord.
- Adopt
- org.openrewrite.java.migrate.Jre17AgentMainPreMainPublic
- Set visibility of
premainandagentmainmethods topublic - Check for a behavior change in Java agents.
- Set visibility of
- org.openrewrite.java.migrate.RemovedFileIOFinalizeMethods
- Replace
finalizemethod injava.io.FileInputStreamandjava.io.FileOutputStream - The
finalizemethod injava.io.FileInputStreamandjava.io.FileOutputStreamis no longer available in Java SE 12 and later. The recipe replaces it with theclosemethod.
- Replace
- org.openrewrite.java.migrate.RemovedLegacySunJSSEProviderName
- Use
SunJSSEinstead ofcom.sun.net.ssl.internal.ssl.Provider - The
com.sun.net.ssl.internal.ssl.Providerprovider name was removed.
- Use
- org.openrewrite.java.migrate.RemovedRMIConnectorServerCredentialTypesConstant
- Replace
RMIConnectorServer.CREDENTIAL_TYPESconstant - This recipe replaces the
RMIConnectorServer.CREDENTIAL_TYPESconstant with theRMIConnectorServer.CREDENTIALS_FILTER_PATTERNconstant.
- Replace
- org.openrewrite.java.migrate.RemovedRuntimeTraceMethods
- Remove
Runtime.traceInstructions(boolean)andRuntime.traceMethodCallsmethods - The
traceInstructionsandtraceMethodCallsmethods injava.lang.Runtimewere deprecated in Java SE 9 and are no longer available in Java SE 13 and later. The recipe removes the invocations of these methods since the method invocations do nothing functionally.
- Remove
- org.openrewrite.java.migrate.RemovedSSLSessionGetPeerCertificateChainMethodImpl
- Replace
SSLSession.getPeerCertificateChain()method - The
javax.net.ssl.SSLSession.getPeerCertificateChain()method implementation was removed from the SunJSSE provider and HTTP client implementation in Java SE 15. The default implementation will now throw anUnsupportedOperationException. Applications using this method should be updated to use thejavax.net.ssl.SSLSession.getPeerCertificates()method instead.
- Replace
- org.openrewrite.java.migrate.RemovedZipFinalizeMethods
- Replace
finalizemethod injava.util.zip.ZipFile,java.util.zip.Inflaterandjava.util.zip.Deflater - The
finalizemethod injava.util.zip.ZipFileis replaced with theclosemethod and is replaced by theendmethod injava.util.zip.Inflaterandjava.util.zip.Deflateras it is no longer available in Java SE 12 and later.
- Replace
- org.openrewrite.java.migrate.SunNetSslPackageUnavailable
- Replace
com.sun.net.sslpackage - The internal API
com.sun.net.sslis removed. The package was intended for internal use only and replacement APIs can be found in thejavax.net.sslpackage.
- Replace
- org.openrewrite.java.migrate.UpgradeBuildToJava17
- Upgrade build to Java 17
- Updates build files to use Java 17 as the target/source.
- org.openrewrite.java.migrate.UpgradePluginsForJava17
- Upgrade plugins to Java 17 compatible versions
- Updates plugins to version compatible with Java 17.
- org.openrewrite.java.migrate.UpgradeToJava17
- Migrate to Java 17
- This recipe will apply changes commonly needed when migrating to Java 17. Specifically, for those applications that are built on Java 8, this recipe will update and add dependencies on J2EE libraries that are no longer directly bundled with the JDK. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 17 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 17.
java21
11 recipes
- org.openrewrite.java.migrate.DeleteDeprecatedFinalize
- Avoid using the deprecated empty
finalize()method injava.desktop - The java.desktop module had a few implementations of finalize() that did nothing and have been removed. This recipe will remove these methods.
- Avoid using the deprecated empty
- org.openrewrite.java.migrate.RemovedSubjectMethods
- Adopt
javax.security.auth.Subject.current()andjavax.security.auth.Subject.callAs()methods` - Replaces the
javax.security.auth.Subject.getSubject()andjavax.security.auth.Subject.doAs()methods withjavax.security.auth.Subject.current()andjavax.security.auth.Subject.callAs().
- Adopt
- org.openrewrite.java.migrate.SwitchPatternMatching
- Adopt switch pattern matching (JEP 441)
- JEP 441 describes how some switch statements can be improved with pattern matching. This recipe applies some of those improvements where applicable.
- org.openrewrite.java.migrate.UpgradeBuildToJava21
- Upgrade build to Java 21
- Updates build files to use Java 21 as the target/source.
- org.openrewrite.java.migrate.UpgradePluginsForJava21
- Upgrade plugins to Java 21 compatible versions
- Updates plugins and dependencies to version compatible with Java 21.
- org.openrewrite.java.migrate.UpgradeToJava21
- Migrate to Java 21
- This recipe will apply changes commonly needed when migrating to Java 21. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 21 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 21.
- org.openrewrite.java.migrate.guava.NoGuavaJava21
- Prefer the Java 21 standard library instead of Guava
- Guava filled in important gaps in the Java standard library and still does. But at least some of Guava's API surface area is covered by the Java standard library now, and some projects may be able to remove Guava altogether if they migrate to standard library for these functions.
- org.openrewrite.java.migrate.guava.PreferMathClamp
- Prefer
Math#clamp - Prefer
java.lang.Math#clampinstead of usingcom.google.common.primitives.*#constrainToRange.
- Prefer
- org.openrewrite.java.migrate.lang.FindNonVirtualExecutors
- Find non-virtual
ExecutorServicecreation - Find all places where static
java.util.concurrent.Executorsmethod creates a non-virtualjava.util.concurrent.ExecutorService. This recipe can be used to search froExecutorServicethat can be replaced by Virtual Thread executor.
- Find non-virtual
- org.openrewrite.java.migrate.lang.FindVirtualThreadOpportunities
- Find Virtual Thread opportunities
- Find opportunities to convert existing code to use Virtual Threads.
- org.openrewrite.java.migrate.util.SequencedCollection
- Adopt
SequencedCollection - Replace older code patterns with
SequencedCollectionmethods, as per https://openjdk.org/jeps/431.
- Adopt
java25
7 recipes
- org.openrewrite.java.migrate.AccessController
- Remove Security AccessController
- The Security Manager API is unsupported in Java 24. This recipe will remove the usage of
java.security.AccessController.
- org.openrewrite.java.migrate.JavaBestPractices
- Java best practices
- Applies opinionated best practices for Java projects targeting Java 25. This recipe includes the full Java 25 upgrade chain plus additional improvements to code style, API usage, and third-party dependency reduction that go beyond what the version migration recipes apply.
- org.openrewrite.java.migrate.RemoveSecurityManager
- Remove Security SecurityManager
- The Security Manager API is unsupported in Java 24. This recipe will remove the usage of
java.security.SecurityManager.
- org.openrewrite.java.migrate.RemoveSecurityPolicy
- Remove Security Policy
- The Security Manager API is unsupported in Java 24. This recipe will remove the use of
java.security.Policy.
- org.openrewrite.java.migrate.SystemGetSecurityManagerToNull
- Replace
System.getSecurityManager()withnull - The Security Manager API is unsupported in Java 24. This recipe will replace
System.getSecurityManager()withnullto make its behavior more obvious and try to simplify execution paths afterwards.
- Replace
- org.openrewrite.java.migrate.UpgradePluginsForJava25
- Upgrade plugins to Java 25 compatible versions
- Updates plugins and dependencies to versions compatible with Java 25.
- org.openrewrite.java.migrate.UpgradeToJava25
- Migrate to Java 25
- This recipe will apply changes commonly needed when migrating to Java 25. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 25 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 25.
java6
1 recipe
- org.openrewrite.java.migrate.UpgradeToJava6
- Migrate to Java 6
- This recipe will apply changes commonly needed when upgrading to Java 6. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy.
java7
1 recipe
- org.openrewrite.java.migrate.UpgradeToJava7
- Migrate to Java 7
- This recipe will apply changes commonly needed when upgrading to Java 7. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy.
java8
1 recipe
- org.openrewrite.java.migrate.UpgradeToJava8
- Migrate to Java 8
- This recipe will apply changes commonly needed when upgrading to Java 8. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy.
javaee
2 recipes
- org.openrewrite.java.migrate.javax.AddJaxbRuntime
- Use latest JAXB API and runtime for Jakarta EE 8
- Update build files to use the latest JAXB runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAXB run-time, in Gradle
compileOnly+testImplementationand Mavenprovidedscope, to any project that has a transitive dependency on the JAXB API. The resulting dependencies still use thejavaxnamespace, despite the move to the Jakarta artifact.
- org.openrewrite.java.migrate.javax.AddJaxwsRuntime
- Use the latest JAX-WS API and runtime for Jakarta EE 8
- Update build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAX-WS run-time, in Gradle
compileOnly+testImplementationand Mavenprovidedscope, to any project that has a transitive dependency on the JAX-WS API. The resulting dependencies still use thejavaxnamespace, despite the move to the Jakarta artifact.
javaee6
1 recipe
- org.openrewrite.java.migrate.javaee6
- Migrate to JavaEE6
- These recipes help with the Migration to Java EE 6, flagging and updating deprecated methods.
javaee7
2 recipes
- org.openrewrite.java.migrate.javaee7
- Migrate to JavaEE7
- These recipes help with the Migration to Java EE 7, flagging and updating deprecated methods.
- org.openrewrite.java.migrate.javax.openJPAToEclipseLink
- Migrate from OpenJPA to EclipseLink JPA
- These recipes help migrate Java Persistence applications using OpenJPA to EclipseLink JPA.
javaee8
1 recipe
- org.openrewrite.java.migrate.javaee8
- Migrate to JavaEE8
- These recipes help with the Migration to Java EE 8, flagging and updating deprecated methods.
javascript
1 recipe
- org.openrewrite.javascript.cleanup.async-callback-in-sync-array-method
- Detect async callbacks in synchronous array methods
- Detects async callbacks passed to array methods like .some(), .every(), .filter() which don't await promises. This is a common bug where Promise objects are always truthy.
javax
37 recipes
- com.oracle.weblogic.rewrite.FacesMigrationToJakartaFaces2x
- JSF 1.x to Jakarta Server Faces 2.3 on WebLogic 14.1.2 or older
- Jakarta EE 8 uses Faces 2.3 a major upgrade to Jakarta packages and XML namespaces. This recipe will migrate JSF 1.x to Jakarta Server Faces 2.3 on WebLogic 14.1.2 or older.
- com.oracle.weblogic.rewrite.WebLogic1412JavaXmlBindMitigation
- Mitigation of Java XML Bind Deprecation in Java 11 vs WebLogic 14.1.2
- This recipe will mitigate the Javax XML Bind deprecation in Java 11 vs WebLogic 14.1.2
- com.oracle.weblogic.rewrite.jakarta.JavaxAnnotationMigrationToJakarta9Annotation
- Migrate deprecated
javax.annotationtojakarta.annotation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.ChangeJavaxAnnotationToJakarta
- Migrate deprecated
javax.annotationpackages tojakarta.annotation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation. Excludes
javax.annotation.processing.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxActivationMigrationToJakartaActivation
- Migrate deprecated
javax.activationpackages tojakarta.activation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxAnnotationMigrationToJakartaAnnotation
- Migrate deprecated
javax.annotationpackages tojakarta.annotation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxAnnotationPackageToJakarta
- Migrate deprecated
javax.annotationpackages tojakarta.annotation - Change type of classes in the
javax.annotationpackage to jakarta.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxAnnotationSecurityPackageToJakarta
- Migrate deprecated
javax.annotation.securitypackages tojakarta.annotation.security - Change type of classes in the
javax.annotation.securitypackage to jakarta.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxAnnotationSqlPackageToJakarta
- Migrate deprecated
javax.annotation.sqlpackages tojakarta.annotation.sql - Change type of classes in the
javax.annotation.sqlpackage to jakarta.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxAuthenticationMigrationToJakartaAuthentication
- Migrate deprecated
javax.security.auth.messagepackages tojakarta.security.auth.message - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxAuthorizationMigrationToJakartaAuthorization
- Migrate deprecated
javax.security.jaccpackages tojakarta.security.jacc - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxBatchMigrationToJakartaBatch
- Migrate deprecated
javax.batchpackages tojakarta.batch - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxInjectMigrationToJakartaInject
- Migrate deprecated
javax.injectpackages tojakarta.inject - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxTransactionMigrationToJakartaTransaction
- Migrate deprecated
javax.transactionpackages tojakarta.transaction - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxValidationMigrationToJakartaValidation
- Migrate deprecated
javax.validationpackages tojakarta.validation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxXmlBindMigrationToJakartaXmlBind
- Migrate deprecated
javax.xml.bindpackages tojakarta.xml.bind - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxXmlWsMigrationToJakartaXmlWs
- Migrate deprecated
javax.xml.wspackages tojakarta.xml.ws - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxActivationMigrationToJakartaActivation
- Migrate deprecated
javax.activationpackages tojakarta.activation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxAnnotationMigrationToJakartaAnnotation
- Migrate deprecated
javax.annotationtojakarta.annotation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxAuthenticationMigrationToJakartaAuthentication
- Migrate deprecated
javax.security.auth.messagepackages tojakarta.security.auth.message - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxAuthorizationMigrationToJakartaAuthorization
- Migrate deprecated
javax.security.jaccpackages tojakarta.security.jacc - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxBatchMigrationToJakartaBatch
- Migrate deprecated
javax.batchpackages tojakarta.batch - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxInjectMigrationToJakartaInject
- Migrate deprecated
javax.injectpackages tojakarta.inject - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxTransactionMigrationToJakartaTransaction
- Migrate deprecated
javax.transactionpackages tojakarta.transaction - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxValidationMigrationToJakartaValidation
- Migrate deprecated
javax.validationpackages tojakarta.validation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxXmlBindMigrationToJakartaXmlBind
- Migrate deprecated
javax.xml.bindpackages tojakarta.xml.bind - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxXmlToJakartaXmlXJCBinding
- Migrate XJC Bindings to Jakata XML
- Java EE has been rebranded to Jakarta EE, migrates the namespace and version in XJC bindings.
- org.openrewrite.java.migrate.jakarta.JavaxXmlWsMigrationToJakartaXmlWs
- Migrate deprecated
javax.xml.wspackages tojakarta.xml.ws - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.RetainJaxbApiForJackson
- Retain
javax.xml.bind:jaxb-apiwhenjackson-module-jaxb-annotationsis present - When migrating from
javax.xml.bindtojakarta.xml.bind3.0+, thejavax.xml.bind:jaxb-apidependency is normally replaced. However, ifjackson-module-jaxb-annotationsis on the classpath (and still uses thejavax.xml.bindnamespace), this recipe ensuresjavax.xml.bind:jaxb-apiremains available as a runtime dependency to preventNoClassDefFoundError.
- Retain
- org.openrewrite.java.migrate.javax.AddCommonAnnotationsDependencies
- Add explicit Common Annotations dependencies
- Add the necessary
annotation-apidependency from Jakarta EE 8 to maintain compatibility with Java version 11 or greater.
- org.openrewrite.java.migrate.javax.AddInjectDependencies
- Add explicit Inject dependencies
- Add the necessary
inject-apidependency from Jakarta EE 8 to maintain compatibility with Java version 11 or greater.
- org.openrewrite.java.migrate.javax.AddJaxbAPIDependencies
- Add explicit JAXB API dependencies
- This recipe will add explicit API dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the
javax.xml.bindnamespace. Running a full javax to Jakarta migration usingorg.openrewrite.java.migrate.jakarta.JavaxMigrationToJakartawill update to versions greater than 3.x which necessitates the package change as well.
- org.openrewrite.java.migrate.javax.AddJaxbDependenciesWithRuntime
- Add explicit JAXB API dependencies and runtime
- This recipe will add explicit dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the
javax.xml.bindnamespace. Running a full javax to Jakarta migration usingorg.openrewrite.java.migrate.jakarta.JavaxMigrationToJakartawill update to versions greater than 3.x which necessitates the package change as well.
- org.openrewrite.java.migrate.javax.AddJaxbDependenciesWithoutRuntime
- Add explicit JAXB API dependencies and remove runtimes
- This recipe will add explicit API dependencies without runtime dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing API dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the
javax.xml.bindnamespace. All JAXB runtime implementation dependencies are removed.
- org.openrewrite.java.migrate.javax.AddJaxbRuntime
- Use latest JAXB API and runtime for Jakarta EE 8
- Update build files to use the latest JAXB runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAXB run-time, in Gradle
compileOnly+testImplementationand Mavenprovidedscope, to any project that has a transitive dependency on the JAXB API. The resulting dependencies still use thejavaxnamespace, despite the move to the Jakarta artifact.
- org.openrewrite.java.migrate.javax.AddJaxwsDependencies
- Add explicit JAX-WS dependencies
- This recipe will add explicit dependencies for Jakarta EE 8 when a Java 8 application is using JAX-WS. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 but the application can continue to use the
javax.xml.bindnamespace.
- org.openrewrite.java.migrate.javax.AddJaxwsRuntime
- Use the latest JAX-WS API and runtime for Jakarta EE 8
- Update build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAX-WS run-time, in Gradle
compileOnly+testImplementationand Mavenprovidedscope, to any project that has a transitive dependency on the JAX-WS API. The resulting dependencies still use thejavaxnamespace, despite the move to the Jakarta artifact.
jaxb
12 recipes
- com.oracle.weblogic.rewrite.jakarta.JavaxBindingsSchemaXjbsToJakarta9BindingsSchemaXjbs
- Migrate xmlns entries in
*.xjbfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- io.quarkus.updates.core.quarkus30.JavaxXmlBindMigrationToJakartaXmlBind
- Migrate deprecated
javax.xml.bindpackages tojakarta.xml.bind - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.Java8toJava11
- Migrate to Java 11
- This recipe will apply changes commonly needed when upgrading to Java 11. Specifically, for those applications that are built on Java 8, this recipe will update and add dependencies on J2EE libraries that are no longer directly bundled with the JDK. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 11 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 11.
- org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta
- Migrate to Jakarta EE 9
- Jakarta EE 9 is the first version of Jakarta EE that uses the new
jakartanamespace.
- org.openrewrite.java.migrate.jakarta.JavaxXmlBindMigrationToJakartaXmlBind
- Migrate deprecated
javax.xml.bindpackages tojakarta.xml.bind - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxXmlToJakartaXmlXJCBinding
- Migrate XJC Bindings to Jakata XML
- Java EE has been rebranded to Jakarta EE, migrates the namespace and version in XJC bindings.
- org.openrewrite.java.migrate.jakarta.RetainJaxbApiForJackson
- Retain
javax.xml.bind:jaxb-apiwhenjackson-module-jaxb-annotationsis present - When migrating from
javax.xml.bindtojakarta.xml.bind3.0+, thejavax.xml.bind:jaxb-apidependency is normally replaced. However, ifjackson-module-jaxb-annotationsis on the classpath (and still uses thejavax.xml.bindnamespace), this recipe ensuresjavax.xml.bind:jaxb-apiremains available as a runtime dependency to preventNoClassDefFoundError.
- Retain
- org.openrewrite.java.migrate.javax.AddJaxbAPIDependencies
- Add explicit JAXB API dependencies
- This recipe will add explicit API dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the
javax.xml.bindnamespace. Running a full javax to Jakarta migration usingorg.openrewrite.java.migrate.jakarta.JavaxMigrationToJakartawill update to versions greater than 3.x which necessitates the package change as well.
- org.openrewrite.java.migrate.javax.AddJaxbDependenciesWithRuntime
- Add explicit JAXB API dependencies and runtime
- This recipe will add explicit dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the
javax.xml.bindnamespace. Running a full javax to Jakarta migration usingorg.openrewrite.java.migrate.jakarta.JavaxMigrationToJakartawill update to versions greater than 3.x which necessitates the package change as well.
- org.openrewrite.java.migrate.javax.AddJaxbDependenciesWithoutRuntime
- Add explicit JAXB API dependencies and remove runtimes
- This recipe will add explicit API dependencies without runtime dependencies for Jakarta EE 8 when a Java 8 application is using JAXB. Any existing API dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 version 2.x which allows for the continued use of the
javax.xml.bindnamespace. All JAXB runtime implementation dependencies are removed.
- org.openrewrite.java.migrate.javax.AddJaxbRuntime
- Use latest JAXB API and runtime for Jakarta EE 8
- Update build files to use the latest JAXB runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAXB run-time, in Gradle
compileOnly+testImplementationand Mavenprovidedscope, to any project that has a transitive dependency on the JAXB API. The resulting dependencies still use thejavaxnamespace, despite the move to the Jakarta artifact.
- org.openrewrite.java.migrate.javax.AddJaxwsDependencies
- Add explicit JAX-WS dependencies
- This recipe will add explicit dependencies for Jakarta EE 8 when a Java 8 application is using JAX-WS. Any existing dependencies will be upgraded to the latest version of Jakarta EE 8. The artifacts are moved to Jakarta EE 8 but the application can continue to use the
javax.xml.bindnamespace.
jaxrs
1 recipe
- org.openrewrite.quarkus.spring.MigrateRequestParameterEdgeCases
- Migrate Additional Spring Web Parameter Annotations
- Migrates additional Spring Web parameter annotations not covered by the main WebToJaxRs recipe. Includes @MatrixVariable, @CookieValue, and other edge cases.
jaxws
5 recipes
- io.quarkus.updates.core.quarkus30.JavaxXmlWsMigrationToJakartaXmlWs
- Migrate deprecated
javax.xml.wspackages tojakarta.xml.ws - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.Java8toJava11
- Migrate to Java 11
- This recipe will apply changes commonly needed when upgrading to Java 11. Specifically, for those applications that are built on Java 8, this recipe will update and add dependencies on J2EE libraries that are no longer directly bundled with the JDK. This recipe will also replace deprecated API with equivalents when there is a clear migration strategy. Build files will also be updated to use Java 11 as the target/source and plugins will be also be upgraded to versions that are compatible with Java 11.
- org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta
- Migrate to Jakarta EE 9
- Jakarta EE 9 is the first version of Jakarta EE that uses the new
jakartanamespace.
- org.openrewrite.java.migrate.jakarta.JavaxXmlWsMigrationToJakartaXmlWs
- Migrate deprecated
javax.xml.wspackages tojakarta.xml.ws - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.javax.AddJaxwsRuntime
- Use the latest JAX-WS API and runtime for Jakarta EE 8
- Update build files to use the latest JAX-WS runtime from Jakarta EE 8 to maintain compatibility with Java version 11 or greater. The recipe will add a JAX-WS run-time, in Gradle
compileOnly+testImplementationand Mavenprovidedscope, to any project that has a transitive dependency on the JAX-WS API. The resulting dependencies still use thejavaxnamespace, despite the move to the Jakarta artifact.
jboss
2 recipes
- org.openrewrite.java.logging.jboss.JBossLoggingBestPractices
- JBoss Logging Best Practices
- This recipe applies best practices for logging in JBoss applications. It includes converting argument arrays to varargs for better readability and performance.
- org.openrewrite.java.logging.slf4j.JBossLoggingToSlf4j
- Migrate JBoss Logging to SLF4J
- Migrates usage of the JBoss Logging facade to using SLF4J.
jdbc
4 recipes
- com.oracle.weblogic.rewrite.WebLogicJdbcXmlNamespace1412
- Migrate xmlns entries in
*-jdbc.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic JDBC schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicJdbcXmlNamespace1511
- Migrate xmlns entries in
*-jdbc.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries in*-jdbc.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- org.openrewrite.quarkus.spring.MigrateDatabaseDrivers
- Migrate database drivers to Quarkus JDBC extensions
- Replaces Spring Boot database driver dependencies with their Quarkus JDBC extension equivalents.
- org.openrewrite.quarkus.spring.SpringBootJdbcToQuarkus
- Replace Spring Boot JDBC with Quarkus Agroal
- Migrates
spring-boot-starter-jdbctoquarkus-agroal.
JDK
1 recipe
- org.openrewrite.java.migrate.io.ReplaceFileInOrOutputStreamFinalizeWithClose
- Replace invocations of
finalize()onFileInputStreamandFileOutputStreamwithclose() - Replace invocations of the deprecated
finalize()method onFileInputStreamandFileOutputStreamwithclose(). - Tags: JDK-8212050
- Replace invocations of
jdo
4 recipes
- org.openrewrite.java.migrate.datanucleus.UpgradeDataNucleus_4_0
- Migrate to DataNucleus 4.0
- Migrate DataNucleus 3.x applications to 4.0. This recipe handles package relocations, type renames, property key changes, and dependency updates introduced in AccessPlatform 4.0.
- org.openrewrite.java.migrate.datanucleus.UpgradeDataNucleus_5_0
- Migrate to DataNucleus 5.0
- Migrate DataNucleus 4.x applications to 5.0. This recipe handles package relocations, type renames, property key changes, and dependency updates.
- org.openrewrite.java.migrate.datanucleus.UpgradeDataNucleus_5_1
- Migrate to DataNucleus 5.1
- Migrate DataNucleus applications to 5.1. This recipe first applies the 5.0 migration, then handles the transaction namespace reorganization and other property renames introduced in 5.1.
- org.openrewrite.java.migrate.datanucleus.UpgradeDataNucleus_5_2
- Migrate to DataNucleus 5.2
- Migrate DataNucleus applications to 5.2. This recipe first applies the 5.1 migration, then handles the column mapping package move and query-related property renames introduced in 5.2.
Jest
17 recipes
- org.openrewrite.codemods.cleanup.jest.ConsistentTestIt
- Enforce test and it usage conventions
- Enforce test and it usage conventions See rule details for jest/consistent-test-it.
- org.openrewrite.codemods.cleanup.jest.NoAliasMethods
- Disallow alias methods
- Disallow alias methods See rule details for jest/no-alias-methods.
- org.openrewrite.codemods.cleanup.jest.NoDeprecatedFunctions27
- Disallow use of deprecated functions from before version 27
- Disallow use of deprecated functions from before version 27 See rule details for jest/no-deprecated-functions.
- org.openrewrite.codemods.cleanup.jest.NoJasmineGlobals
- Disallow Jasmine globals
- Disallow Jasmine globals See rule details for jest/no-jasmine-globals.
- org.openrewrite.codemods.cleanup.jest.NoTestPrefixes
- Require using .only and .skip over f and x
- Require using .only and .skip over f and x See rule details for jest/no-test-prefixes.
- org.openrewrite.codemods.cleanup.jest.NoUntypedMockFactory
- Disallow using jest.mock() factories without an explicit type parameter
- Disallow using jest.mock() factories without an explicit type parameter See rule details for jest/no-untyped-mock-factory.
- org.openrewrite.codemods.cleanup.jest.PreferComparisonMatcher
- Suggest using the built-in comparison matchers
- Suggest using the built-in comparison matchers See rule details for jest/prefer-comparison-matcher.
- org.openrewrite.codemods.cleanup.jest.PreferExpectResolves
- Prefer await expect(...).resolves over expect(await ...) syntax
- Prefer await expect(...).resolves over expect(await ...) syntax See rule details for jest/prefer-expect-resolves.
- org.openrewrite.codemods.cleanup.jest.PreferLowercaseTitle
- Enforce lowercase test names
- Enforce lowercase test names See rule details for jest/prefer-lowercase-title.
- org.openrewrite.codemods.cleanup.jest.PreferMockPromiseShorthand
- Prefer mock resolved/rejected shorthands for promises
- Prefer mock resolved/rejected shorthands for promises See rule details for jest/prefer-mock-promise-shorthand.
- org.openrewrite.codemods.cleanup.jest.PreferSpyOn
- Suggest using jest.spyOn()
- Suggest using jest.spyOn() See rule details for jest/prefer-spy-on.
- org.openrewrite.codemods.cleanup.jest.PreferToBe
- Suggest using toBe() for primitive literals
- Suggest using toBe() for primitive literals See rule details for jest/prefer-to-be.
- org.openrewrite.codemods.cleanup.jest.PreferToContain
- Suggest using toContain()
- Suggest using toContain() See rule details for jest/prefer-to-contain.
- org.openrewrite.codemods.cleanup.jest.PreferToHaveLength
- Suggest using toHaveLength()
- Suggest using toHaveLength() See rule details for jest/prefer-to-have-length.
- org.openrewrite.codemods.cleanup.jest.PreferTodo
- Suggest using test.todo
- Suggest using test.todo See rule details for jest/prefer-todo.
- org.openrewrite.codemods.cleanup.jest.RecommendedJestCodeCleanup
- Recommended Jest code cleanup
- Collection of cleanup ESLint rules that are recommended by eslint-plugin-jest.
- org.openrewrite.codemods.cleanup.jest.ValidTitle
- Enforce valid titles
- Enforce valid titles See rule details for jest/valid-title.
jetbrains
1 recipe
- org.openrewrite.java.migrate.ComIntelliJAnnotationsToOrgJetbrainsAnnotations
- Migrate com.intellij:annotations to org.jetbrains:annotations
- This recipe will upgrade old dependency of com.intellij:annotations to the newer org.jetbrains:annotations.
jetty
1 recipe
- org.openrewrite.java.spring.boot3.DowngradeServletApiWhenUsingJetty
- Downgrade Jakarta Servlet API to 5.0 when using Jetty
- Jetty does not yet support Servlet 6.0. This recipe will detect the presence of the
spring-boot-starter-jettyas a first-order dependency and will add the maven propertyjakarta-servlet.versionsetting it's value to5.0.0. This will downgrade thejakarta-servletartifact if the pom's parent extends from the spring-boot-parent.
jmockit
1 recipe
- org.openrewrite.java.testing.jmockit.JMockitToMockito
- Migrate from JMockit to Mockito
- This recipe will apply changes commonly needed when migrating from JMockit to Mockito.
jms
6 recipes
- com.oracle.weblogic.rewrite.WebLogicJmsXmlNamespace1412
- Migrate xmlns entries in
*-jms.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic JMS schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicJmsXmlNamespace1511
- Migrate xmlns entries in
*-jms.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries in*-jms.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxJmsToJakartaJmsOnMdb
- Migrate javax.jms to jakarta.jms on MDB
- Migrate javax.jms to jakarta.jms on MDB
- io.moderne.java.spring.framework7.MigrateJmsDestinationResolver
- Preserve DynamicDestinationResolver behavior for JmsTemplate
- Spring Framework 7.0 changed the default
DestinationResolverforJmsTemplatefromDynamicDestinationResolvertoSimpleDestinationResolver, which caches Session-resolved Queue and Topic instances. This recipe explicitly configuresDynamicDestinationResolverto preserve the pre-7.0 behavior. The caching behavior ofSimpleDestinationResolvershould be fine for most JMS brokers, so this explicit configuration can be removed once verified.
- org.openrewrite.quarkus.spring.SpringBootActiveMQToQuarkus
- Replace Spring Boot ActiveMQ with Quarkus Artemis JMS
- Migrates
spring-boot-starter-activemqtoquarkus-artemis-jms.
- org.openrewrite.quarkus.spring.SpringBootArtemisToQuarkus
- Replace Spring Boot Artemis with Quarkus Artemis JMS
- Migrates
spring-boot-starter-artemistoquarkus-artemis-jms.
jobXML
1 recipe
- com.oracle.weblogic.rewrite.jakarta.JavaxBatchJobsXmlsToJakarta9BatchJobsXmls
- Migrate xmlns entries in
**/batch-jobs/*.xmlfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
joda
1 recipe
- org.openrewrite.java.joda.time.NoJodaTime
- Prefer the Java standard library instead of Joda-Time
- Before Java 8, Java lacked a robust date and time library, leading to the widespread use of Joda-Time to fill this gap. With the release of Java 8, the
java.timepackage was introduced, incorporating most of Joda-Time's concepts. Features deemed too specialized or bulky forjava.timewere included in the ThreeTen-Extra library. This recipe migrates Joda-Time types tojava.timeandthreeten-extratypes. - Tags: joda-time
jpa
7 recipes
- com.oracle.weblogic.rewrite.UpgradeJPATo31HibernateTo66
- Upgrade Jakarta JPA to 3.1 and Hibernate 6.6
- This recipe upgrades Jakarta JPA to 3.1 and Hibernate to 6.6 (compatible with Jakarta EE 10).
- org.openrewrite.java.migrate.datanucleus.UpgradeDataNucleus_4_0
- Migrate to DataNucleus 4.0
- Migrate DataNucleus 3.x applications to 4.0. This recipe handles package relocations, type renames, property key changes, and dependency updates introduced in AccessPlatform 4.0.
- org.openrewrite.java.migrate.datanucleus.UpgradeDataNucleus_5_0
- Migrate to DataNucleus 5.0
- Migrate DataNucleus 4.x applications to 5.0. This recipe handles package relocations, type renames, property key changes, and dependency updates.
- org.openrewrite.java.migrate.datanucleus.UpgradeDataNucleus_5_1
- Migrate to DataNucleus 5.1
- Migrate DataNucleus applications to 5.1. This recipe first applies the 5.0 migration, then handles the transaction namespace reorganization and other property renames introduced in 5.1.
- org.openrewrite.java.migrate.datanucleus.UpgradeDataNucleus_5_2
- Migrate to DataNucleus 5.2
- Migrate DataNucleus applications to 5.2. This recipe first applies the 5.1 migration, then handles the column mapping package move and query-related property renames introduced in 5.2.
- org.openrewrite.quarkus.spring.MigrateEntitiesToPanache
- Migrate JPA Entities to Panache Entities
- Converts standard JPA entities to Quarkus Panache entities using the Active Record pattern. Entities will extend PanacheEntity and gain built-in CRUD operations.
- org.openrewrite.quarkus.spring.SpringBootDataJpaToQuarkus
- Replace Spring Boot Data JPA with Quarkus Hibernate ORM Panache
- Migrates
spring-boot-starter-data-jpatoquarkus-hibernate-orm-panache.
jsf
33 recipes
- com.oracle.weblogic.rewrite.FacesMigrationToJakartaFaces2x
- JSF 1.x to Jakarta Server Faces 2.3 on WebLogic 14.1.2 or older
- Jakarta EE 8 uses Faces 2.3 a major upgrade to Jakarta packages and XML namespaces. This recipe will migrate JSF 1.x to Jakarta Server Faces 2.3 on WebLogic 14.1.2 or older.
- com.oracle.weblogic.rewrite.jakarta.Faces2xMigrationToJakartaFaces3x
- JSF 2.x to Jakarta Server Faces 3.x
- Jakarta EE 9 uses Faces 3.0 a major upgrade to Jakarta packages and XML namespaces.
- com.oracle.weblogic.rewrite.jakarta.JakartaFaces3Xhtml
- Faces XHTML migration for Jakarta EE 9
- Find and replace legacy JSF namespaces and javax references with Jakarta Faces values in XHTML files.
- com.oracle.weblogic.rewrite.jakarta.JavaxFacesConfigXmlToJakartaFaces3ConfigXml
- Migrate xmlns entries in
faces-config.xmlfiles for Jakarta Server Faces 3 - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxFacesTagLibraryXmlToJakartaFaces3TagLibraryXml
- Migrate xmlns entries in
*taglib*.xmlfiles for Jakarta Server Faces 3 - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxTestWebXmlToJakartaTestWebXml5
- Migrate xmlns entries in
test-web.xmlfiles for Jakarta Server Faces 3 using test interfaces - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation for test interfaces like arquillian.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxWebFragmentXmlToJakartaWebFragmentXml5
- Migrate xmlns entries in
web-fragment.xmlfiles for Jakarta Server Faces 3 - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxWebXmlToJakartaWebXml5
- Migrate xmlns entries in
web.xmlfiles for Jakarta Server Faces 3 - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.UpgradeFacesOpenSourceLibraries2
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.
- com.oracle.weblogic.rewrite.jakarta.UpgradeFacesOpenSourceLibraries3
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.
- io.moderne.java.jsf.MigrateToJsf_2_3
- Migrate to JSF 2.3
- Complete migration to JSF 2.3, including associated technologies like RichFaces. Updates dependencies, transforms XHTML views, and migrates Java APIs.
- io.moderne.java.jsf.richfaces.MigrateRichFaces_4_5
- Migrate RichFaces 3.x to 4.5
- Complete RichFaces 3.x to 4.5 migration including tag renames, attribute migrations, and Java API updates.
- io.moderne.java.jsf.richfaces.update45.UpdateXHTMLTags
- Migrate RichFaces tags in
xhtmlfiles - Migrate RichFaces tags in
xhtmlfiles to RichFaces 4.
- Migrate RichFaces tags in
- io.moderne.java.spring.framework.jsf23.MigrateFacesConfig
- Migrate JSF variable-resolver to el-resolver
- Migrates JSF faces-config.xml from namespaces, tags and values that was deprecated in JSF 1.2 and removed in later versions, to the JSF 2.3 compatible constructs.
- org.openrewrite.java.migrate.jakarta.Faces2xMigrationToJakartaFaces3x
- JSF 2.x to Jakarta Faces 3.x
- Jakarta EE 9 uses Faces 3.0, a major upgrade to Jakarta packages and XML namespaces.
- org.openrewrite.java.migrate.jakarta.Faces3xMigrationToFaces4x
- Upgrade to Jakarta Faces 4.x
- Jakarta EE 10 uses Faces 4.0.
- org.openrewrite.java.migrate.jakarta.Faces4xMigrationToFaces41x
- Jakarta Faces 4.0 to 4.1
- Jakarta EE 11 uses Faces 4.1 a minor upgrade.
- org.openrewrite.java.migrate.jakarta.JakartaFacesConfigXml4
- Migrate xmlns entries in
faces-config.xmlfiles - Jakarta EE 10 uses Faces version 4.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JakartaFacesEcmaScript
- Migrate JSF values inside EcmaScript files
- Convert JSF to Faces values inside JavaScript,TypeScript, and Properties files.
- org.openrewrite.java.migrate.jakarta.JakartaFacesTagLibraryXml4
- Migrate xmlns entries in
taglib.xmlfiles - Faces 4 uses facelet-taglib 4.0.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JakartaFacesXhtmlEE10
- Faces XHTML migration for Jakarta EE 10
- Find and replace legacy JSF namespace URIs with Jakarta Faces URNs in XHTML files.
- org.openrewrite.java.migrate.jakarta.JakartaFacesXhtmlEE9
- Faces XHTML migration for Jakarta EE 9
- Find and replace javax references to jakarta in XHTML files.
- org.openrewrite.java.migrate.jakarta.JakartaWebFragmentXml6
- Migrate xmlns entries in
web-fragment.xmlfiles - Faces 4 uses web-fragment 6.0.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JakartaWebXml6
- Migrate xmlns entries in
web.xmlfiles - Faces 4 uses web-app 6.0.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JavaxFacesConfigXmlToJakartaFacesConfigXml
- Migrate xmlns entries in
faces-config.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JavaxFacesTagLibraryXmlToJakartaFacesTagLibraryXml
- Migrate xmlns entries in
taglib.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JavaxWebFragmentXmlToJakartaWebFragmentXml
- Migrate xmlns entries in
web-fragment.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.JavaxWebXmlToJakartaWebXml
- Migrate xmlns entries in
web.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
- org.openrewrite.java.migrate.jakarta.OmniFacesNamespaceMigration
- OmniFaces Namespace Migration
- Find and replace legacy OmniFaces namespaces.
- org.openrewrite.java.migrate.jakarta.UpdateManagedBeanToNamed
- Update Faces
@ManagedBeanto use CDI@Named - Faces ManagedBean was deprecated in JSF 2.3 (EE8) and removed in Jakarta Faces 4.0 (EE10). Replace
@ManagedBeanwith@Namedfor CDI-based bean management.
- Update Faces
- org.openrewrite.java.migrate.jakarta.UpgradeFaces3OpenSourceLibraries
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.
- org.openrewrite.java.migrate.jakarta.UpgradeFaces41OpenSourceLibraries
- Upgrade Faces open source libraries
- Upgrade OmniFaces and MyFaces/Mojarra libraries to Jakarta EE11 versions.
- org.openrewrite.java.migrate.jakarta.UpgradeFaces4OpenSourceLibraries
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE10 versions.
json
1 recipe
- OpenRewrite.Recipes.AspNetCore3.FindNewtonsoftJsonUsage
- Find Newtonsoft.Json usage in ASP.NET Core
- Flags
JsonConvertand otherNewtonsoft.Jsonusage. ASP.NET Core 3.0 usesSystem.Text.Jsonby default.
jsp
1 recipe
- com.oracle.weblogic.rewrite.jakarta.JavaxWebJspTagLibraryTldsToJakarta9WebJspTagLibraryTlds
- Migrate xmlns entries in
*.tldfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
jsptaglibrary
1 recipe
- com.oracle.weblogic.rewrite.jakarta.JavaxWebJspTagLibraryTldsToJakarta9WebJspTagLibraryTlds
- Migrate xmlns entries in
*.tldfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
jsr250
1 recipe
- org.openrewrite.java.migrate.javax.AddCommonAnnotationsDependencies
- Add explicit Common Annotations dependencies
- Add the necessary
annotation-apidependency from Jakarta EE 8 to maintain compatibility with Java version 11 or greater.
JtaTransactionManager
1 recipe
- com.oracle.weblogic.rewrite.spring.framework.ReplaceWebLogicJtaTransactionManager
- Replace Removed WebLogicJtaTransactionManager from Spring Framework 5.3.x to 6.2.x
- Replace removed WebLogicJtaTransactionManager with JtaTransactionManager from Spring Framework 6.2.x.
junit
22 recipes
- org.openrewrite.java.spring.boot2.SpringBoot2JUnit4to5Migration
- Migrate Spring Boot 2.x projects to JUnit 5 from JUnit 4
- This recipe will migrate a Spring Boot application's tests from JUnit 4 to JUnit 5. This spring-specific migration includes conversion of Spring Test runners to Spring Test extensions and awareness of the composable Spring Test annotations.
- org.openrewrite.java.testing.arquillian.ArquillianJUnit4ToArquillianJUnit5
- Use Arquillian JUnit 5 Extension
- Migrates Arquillian JUnit 4 to JUnit 5.
- org.openrewrite.java.testing.byteman.BytemanJUnit4ToBytemanJUnit5
- Use Byteman JUnit 5 dependency
- Migrates Byteman JUnit 4 to JUnit 5.
- org.openrewrite.java.testing.hamcrest.AddHamcrestIfUsed
- Add
org.hamcrest:hamcrestif it is used - JUnit Jupiter does not include hamcrest as a transitive dependency. If needed, add a direct dependency.
- Add
- org.openrewrite.java.testing.junit.JUnit6BestPractices
- JUnit 6 best practices
- Applies best practices to tests.
- org.openrewrite.java.testing.junit.JupiterBestPractices
- JUnit Jupiter best practices
- Applies best practices to tests.
- org.openrewrite.java.testing.junit5.CleanupAssertions
- Clean Up Assertions
- Simplifies JUnit Jupiter assertions to their most-direct equivalents.
- org.openrewrite.java.testing.junit5.IgnoreToDisabled
- Use JUnit Jupiter
@Disabled - Migrates JUnit 4.x
@Ignoreto JUnit Jupiter@Disabled.
- Use JUnit Jupiter
- org.openrewrite.java.testing.junit5.JUnit4to5Migration
- JUnit Jupiter migration from JUnit 4.x
- Migrates JUnit 4.x tests to JUnit Jupiter.
- org.openrewrite.java.testing.junit5.JUnit5BestPractices
- JUnit 5 best practices
- Applies best practices to tests.
- org.openrewrite.java.testing.junit5.MigrateAssertionFailedError
- Migrate JUnit 4 assertion failure exceptions to JUnit Jupiter
- Replace JUnit 4's
junit.framework.AssertionFailedErrorandorg.junit.ComparisonFailurewith JUnit Jupiter'sorg.opentest4j.AssertionFailedError.
- org.openrewrite.java.testing.junit5.MigrateAssumptions
- Use
Assertions#assume*(..)and Hamcrest'sMatcherAssume#assume*(..) - Many of JUnit 4's
Assume#assume(..)methods have no direct counterpart in JUnit 5 and require Hamcrest JUnit'sMatcherAssume.
- Use
- org.openrewrite.java.testing.junit5.StaticImports
- Statically import JUnit Jupiter assertions
- Always use a static import for assertion methods.
- org.openrewrite.java.testing.junit5.ThrowingRunnableToExecutable
- Use JUnit Jupiter
Executable - Migrates JUnit 4.x
ThrowingRunnableto JUnit JupiterExecutable.
- Use JUnit Jupiter
- org.openrewrite.java.testing.junit5.UpgradeOkHttpMockWebServer
- Use OkHttp 3 MockWebServer for JUnit 5
- Migrates OkHttp 3
MockWebServerto enable JUnit Jupiter Extension support.
- org.openrewrite.java.testing.junit5.UpgradeToJUnit513
- Upgrade to JUnit 5.13
- Upgrades JUnit 5 to 5.13.x and migrates all deprecated APIs.
- org.openrewrite.java.testing.junit5.UpgradeToJUnit514
- Upgrade to JUnit 5.14
- Upgrades JUnit 5 to 5.14.x and migrates all deprecated APIs.
- org.openrewrite.java.testing.junit5.UseHamcrestAssertThat
- Use
MatcherAssert#assertThat(..) - JUnit 4's
Assert#assertThat(..)This method was deprecated in JUnit 4 and removed in JUnit Jupiter.
- Use
- org.openrewrite.java.testing.junit5.UseMockitoExtension
- Use Mockito JUnit Jupiter extension
- Migrate uses of
@RunWith(MockitoJUnitRunner.class)(and similar annotations) to@ExtendWith(MockitoExtension.class).
- org.openrewrite.java.testing.junit5.UseXMLUnitLegacy
- Use XMLUnit Legacy for JUnit 5
- Migrates XMLUnit 1.x to XMLUnit legacy 2.x.
- org.openrewrite.java.testing.junit5.VertxUnitToVertxJunit5
- Use Vert.x JUnit 5 Extension
- Migrates Vert.x
@RunWithVertxUnitRunnerto the JUnit Jupiter@ExtendWithVertxExtension.
- org.openrewrite.java.testing.junit6.JUnit5to6Migration
- JUnit 6 migration from JUnit 5.x
- Migrates JUnit 5.x tests to JUnit 6.x.
jupiter
2 recipes
- org.openrewrite.java.spring.boot2.SpringBoot2JUnit4to5Migration
- Migrate Spring Boot 2.x projects to JUnit 5 from JUnit 4
- This recipe will migrate a Spring Boot application's tests from JUnit 4 to JUnit 5. This spring-specific migration includes conversion of Spring Test runners to Spring Test extensions and awareness of the composable Spring Test annotations.
- org.openrewrite.java.testing.junit6.JUnit5to6Migration
- JUnit 6 migration from JUnit 5.x
- Migrates JUnit 5.x tests to JUnit 6.x.
kafka
23 recipes
- io.moderne.java.spring.boot3.UpgradeSpringKafka_3_3
- Migrate to Spring Kafka 3.3
- Migrate applications to the latest Spring Kafka 3.3 release.
- io.moderne.java.spring.boot4.UpgradeSpringKafka_4_0
- Migrate to Spring Kafka 4.0
- Migrate applications to Spring Kafka 4.0. This includes removing deprecated configuration options that are no longer supported.
- io.moderne.kafka.MigrateToKafka23
- Migrate to Kafka 2.3
- Migrate applications to the latest Kafka 2.3 release.
- io.moderne.kafka.MigrateToKafka24
- Migrate to Kafka 2.4
- Migrate applications to the latest Kafka 2.4 release.
- io.moderne.kafka.MigrateToKafka25
- Migrate to Kafka 2.5
- Migrate applications to the latest Kafka 2.5 release.
- io.moderne.kafka.MigrateToKafka26
- Migrate to Kafka 2.6
- Migrate applications to the latest Kafka 2.6 release.
- io.moderne.kafka.MigrateToKafka27
- Migrate to Kafka 2.7
- Migrate applications to the latest Kafka 2.7 release.
- io.moderne.kafka.MigrateToKafka28
- Migrate to Kafka 2.8
- Migrate applications to the latest Kafka 2.8 release.
- io.moderne.kafka.MigrateToKafka30
- Migrate to Kafka 3.0
- Migrate applications to the latest Kafka 3.0 release.
- io.moderne.kafka.MigrateToKafka31
- Migrate to Kafka 3.1
- Migrate applications to the latest Kafka 3.1 release.
- io.moderne.kafka.MigrateToKafka32
- Migrate to Kafka 3.2
- Migrate applications to the latest Kafka 3.2 release.
- io.moderne.kafka.MigrateToKafka33
- Migrate to Kafka 3.3
- Migrate applications to the latest Kafka 3.3 release.
- io.moderne.kafka.MigrateToKafka40
- Migrate to Kafka 4.0
- Migrate applications to the latest Kafka 4.0 release. This includes updating dependencies to 4.0.x, ensuring Java 11+ for clients and Java 17+ for brokers/tools, and handling changes.
- io.moderne.kafka.MigrateToKafka41
- Migrate to Kafka 4.1
- Migrate applications to the latest Kafka 4.1 release. This includes updating dependencies to 4.1.x, migrating deprecated Admin API methods, updating Streams configuration properties, and removing deprecated broker properties.
- io.moderne.kafka.streams.MigrateJoinedNameMethod
- Migrate
Joined.named()toJoined.as() - In Kafka Streams 2.3,
Joined.named()was deprecated in favor ofJoined.as(). Additionally, thename()method was deprecated for removal and should not be used.
- Migrate
- io.moderne.kafka.streams.MigrateTaskAndThreadMetadata
- Migrate TaskMetadata and ThreadMetadata
- Migrates TaskMetadata and ThreadMetadata from org.apache.kafka.streams.processor package to org.apache.kafka.streams package, and updates TaskMetadata.taskId() calls to include .toString() for String compatibility.
- io.moderne.kafka.streams.ProcessingGuaranteeExactlyOnceToBeta
- Migrate
exactly_oncetoexactly_once_beta - Kafka Streams 2.6 introduces the exactly-once semantics v2, which is a more efficient implementation with improved internal handling. Though it is beta, it’s fully backward-compatible from the API standpoint, but internally it uses a different transaction/commit protocol. Starting from 3.0, it becomes the default "exactly_once_v2".
- Migrate
- io.moderne.kafka.streams.ProcessingGuaranteeExactlyOnceToV2
- Migrate
exactly_onceandexactly_once_betatoexactly_once_v2 - Kafka Streams 2.6 introduces the exactly-once semantics v2, which is a more efficient implementation with improved internal handling. Starting from 3.0, it becomes the default "exactly_once_v2".
- Migrate
- org.openrewrite.java.spring.kafka.UpgradeSpringKafka_2_8_ErrorHandlers
- Migrates Spring Kafka deprecated error handlers
- Migrate error handlers deprecated in Spring Kafka
2.8.xto their replacements.
- org.openrewrite.java.spring.kafka.UpgradeSpringKafka_3_0
- Migrate to Spring Kafka 3.0
- Migrate applications to the latest Spring Kafka 3.0 release.
- org.openrewrite.java.spring.kafka.UpgradeSpringKafka_4_0
- Migrate to Spring Kafka 4.0
- Migrate applications to the latest Spring Kafka 4.0 release.
- org.openrewrite.quarkus.spring.SpringKafkaToQuarkusClassic
- Replace Spring Kafka with Quarkus Kafka Client
- Migrates
spring-kafkatoquarkus-kafka-clientwhen no reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringKafkaToQuarkusReactive
- Replace Spring Kafka with Quarkus Messaging Kafka
- Migrates
spring-kafkatoquarkus-messaging-kafkawhen reactor dependencies are present.
kotlin
16 recipes
- org.openrewrite.kotlin.compose.ReplaceDeprecatedComposeMethods
- Replace deprecated Jetpack Compose methods
- Replace deprecated Jetpack Compose method calls with their recommended replacements, based on
@Deprecated(replaceWith=ReplaceWith(...))annotations.
- org.openrewrite.kotlin.exposed.ExposedChangeMethodNames
- Rename Exposed deprecated methods for 1.0
- Rename deprecated Exposed method and property references to their 1.0 replacements.
- org.openrewrite.kotlin.exposed.ExposedChangeTypes
- Migrate Exposed type references to 1.0 packages
- Change fully qualified type references from Exposed 0.x packages to Exposed 1.0 packages. The 1.0 release reorganized all packages under
org.jetbrains.exposed.v1.*and split classes acrosscore,jdbc, anddaomodules.
- org.openrewrite.kotlin.exposed.ExposedUpgradeGradleDependencies
- Upgrade Exposed Gradle dependencies to 1.0
- Update JetBrains Exposed Gradle dependencies for the 1.0.0 migration. Upgrades dependency versions and handles the
exposed-migrationmodule split.
- org.openrewrite.kotlin.exposed.UpgradeToExposed_1
- Migrate to JetBrains Exposed 1.0
- Migrate from JetBrains Exposed 0.x to 1.0.0. This includes package reorganization (adding
v1prefix), type moves between modules, class renames, method renames, and Gradle dependency updates. Some changes require manual intervention and are not covered by this recipe:Table.uuid()should be changed toTable.javaUUID()forjava.util.UUIDvalues,DateColumnTypewith constructor parametertime=falseortime=trueshould be split intoJodaLocalDateColumnTypeorJodaLocalDateTimeColumnType,SqlExpressionBuilder.*usages should be replaced with top-level function imports, andStatement.execute()calls should useBlockingExecutablewrapping.
- org.openrewrite.kotlin.kotlinx.ReplaceDeprecatedKotlinxMethods
- Replace deprecated
kotlinxmethods - Replace deprecated Kotlin extension library method calls with their recommended replacements, based on
@Deprecated(replaceWith=ReplaceWith(...))annotations.
- Replace deprecated
- org.openrewrite.kotlin.migrate.RemoveDeprecatedKotlinGradleProperties
- Remove deprecated Kotlin Gradle properties
- Remove deprecated Kotlin Gradle properties from
gradle.properties.kotlin.experimental.coroutineswas removed in Kotlin 2.x.
- org.openrewrite.kotlin.migrate.RemoveRedundantKotlinStdlib
- Remove redundant kotlin-stdlib dependencies
- Remove explicit
kotlin-stdlib,kotlin-stdlib-jdk7,kotlin-stdlib-jdk8, andkotlin-stdlib-commondependencies. The Kotlin Gradle plugin has automatically included the stdlib since Kotlin 1.4, making explicit declarations redundant.
- org.openrewrite.kotlin.migrate.ReplaceDeprecatedAppendln
- Replace deprecated
appendlnwithappendLine - Replace
appendln()withappendLine(). This was deprecated in Kotlin 1.4 and becomes an error in Kotlin 2.1.
- Replace deprecated
- org.openrewrite.kotlin.migrate.ReplaceDeprecatedCapitalizeAndDecapitalize
- Replace deprecated
capitalizeanddecapitalize - Replace
String.capitalize()withString.replaceFirstChar \{ if (it.isLowerCase()) it.titlecase() else it.toString() \}andString.decapitalize()withString.replaceFirstChar \{ it.lowercase() \}. These were deprecated in Kotlin 1.5 and become errors in Kotlin 2.1.
- Replace deprecated
- org.openrewrite.kotlin.migrate.ReplaceDeprecatedCharCaseConversions
- Replace deprecated Char case conversions
- Replace
Char.toLowerCase()withChar.lowercaseChar()andChar.toUpperCase()withChar.uppercaseChar(). These were deprecated in Kotlin 1.5 and become errors in Kotlin 2.1.
- org.openrewrite.kotlin.migrate.ReplaceDeprecatedStringCaseConversions
- Replace deprecated String case conversions
- Replace
String.toLowerCase()withString.lowercase()andString.toUpperCase()withString.uppercase(). These were deprecated in Kotlin 1.5 and become errors in Kotlin 2.1.
- org.openrewrite.kotlin.migrate.ReplaceEnumValuesFunctionWithEnumEntries
- Replace
enumValues<T>()withenumEntries<T>() - Replace calls to
enumValues<T>()withenumEntries<T>(). TheenumEntriesfunction returns an efficient immutable list instead of creating a new array. Deprecated since Kotlin 1.9, recommended replacement for Kotlin 2.x.
- Replace
- org.openrewrite.kotlin.migrate.UpgradeKotlinGradlePlugins
- Upgrade Kotlin Gradle plugins to 2.x
- Upgrade all
org.jetbrains.kotlin.*Gradle plugins to Kotlin 2.x. This includes the core kotlin-jvm plugin as well as all official Kotlin Gradle plugins such as serialization, Spring, allopen, noarg, JPA, and parcelize.
- org.openrewrite.kotlin.migrate.UpgradeToKotlin2
- Migrate to Kotlin 2
- Migrate deprecated Kotlin 1.x APIs to their Kotlin 2.x replacements and update Gradle build files for Kotlin 2.x compatibility. Deprecated APIs were deprecated in Kotlin 1.4-1.5 and become errors in Kotlin 2.1.
- org.openrewrite.kotlin.replace.ReplaceKotlinMethod
- Replace Kotlin method
- Replaces Kotlin method calls based on
@Deprecated(replaceWith=ReplaceWith(...))annotations.
kotlinx
1 recipe
- org.openrewrite.kotlin.kotlinx.ReplaceDeprecatedKotlinxMethods
- Replace deprecated
kotlinxmethods - Replace deprecated Kotlin extension library method calls with their recommended replacements, based on
@Deprecated(replaceWith=ReplaceWith(...))annotations.
- Replace deprecated
kubernetes
27 recipes
- org.openrewrite.kubernetes.ImagePullPolicyAlways
- Ensure image pull policy is
Always - Ensures the latest version of a tag is deployed each time.
- Ensure image pull policy is
- org.openrewrite.kubernetes.KubernetesBestPractices
- Kubernetes best practices
- Applies best practices to Kubernetes manifests.
- org.openrewrite.kubernetes.LifecycleRuleOnStorageBucket
- Ensure lifecycle rule on
StorageBucket - When defining a rule, you can specify any set of conditions for any action. The following configuration defines a rule to delete all objects older than 7 days in a bucket.
- Ensure lifecycle rule on
- org.openrewrite.kubernetes.LimitContainerCapabilities
- Limit root capabilities in a container
- Limiting the admission of containers with capabilities ensures that only a small number of containers have extended capabilities outside the default range.
- org.openrewrite.kubernetes.MissingCpuLimits
- Ensure CPU limits are set
- A system without managed quotas could eventually collapse due to inadequate resources for the tasks it bares.
- org.openrewrite.kubernetes.MissingCpuRequest
- Ensure CPU request is set
- If a container is created in a namespace that has a default CPU limit, and the container does not specify its own CPU limit, then the container is assigned the default CPU limit.
- org.openrewrite.kubernetes.MissingMemoryLimits
- Ensure memory limits are set
- With no limit set, kubectl allocates more and more memory to the container until it runs out.
- org.openrewrite.kubernetes.MissingMemoryRequest
- Ensure memory request is set
- A container is guaranteed to have as much memory as it requests, but is not allowed to use more memory than the limit set. This configuration may save resources and prevent an attack on an exploited container.
- org.openrewrite.kubernetes.MissingPodLivenessProbe
- Ensure liveness probe is configured
- The kubelet uses liveness probes to know when to schedule restarts for containers. Restarting a container in a deadlock state can help to make the application more available, despite bugs.
- org.openrewrite.kubernetes.MissingPodReadinessProbe
- Ensure readiness probe is configured
- Using the Readiness Probe ensures teams define what actions need to be taken to prevent failure and ensure recovery in case of unexpected errors.
- org.openrewrite.kubernetes.NoHostIPCSharing
- No host IPC sharing
- Preventing sharing of host PID/IPC namespace, networking, and ports ensures proper isolation between Docker containers and the underlying host.
- org.openrewrite.kubernetes.NoHostNetworkSharing
- No host network sharing
- When using the host network mode for a container, that container’s network stack is not isolated from the Docker host, so the container shares the host’s networking namespace and does not get its own IP-address allocation.
- org.openrewrite.kubernetes.NoHostProcessIdSharing
- No host process ID sharing
- Sharing the host process ID namespace breaks the isolation between container images and can make processes visible to other containers in the pod. This includes all information in the /proc directory, which can sometimes include passwords or keys, passed as environment variables.
- org.openrewrite.kubernetes.NoPrivilegeEscalation
- No privilege escalation
- Does not allow a process to gain more privileges than its parent process.
- org.openrewrite.kubernetes.NoPrivilegedContainers
- No privileged containers
- Privileged containers are containers that have all of the root capabilities of a host machine, allowing access to resources that are not accessible in ordinary containers.
- org.openrewrite.kubernetes.NoRootContainers
- No root containers
- Containers that run as root frequently have more permissions than their workload requires which, in case of compromise, could help an attacker further their exploits.
- org.openrewrite.kubernetes.ReadOnlyRootFilesystem
- Read-only root filesystem
- Using an immutable root filesystem and a verified boot mechanism prevents against attackers from "owning" the machine through permanent local changes.
- org.openrewrite.kubernetes.migrate.MigrateToAPIv1_16
- Migrate to Kubernetes API v1.16
- This recipe will apply changes commonly needed when migrating to Kubernetes API v1.16.
- org.openrewrite.kubernetes.migrate.MigrateToAPIv1_22
- Migrate to Kubernetes API v1.22
- This recipe will apply changes commonly needed when migrating to Kubernetes API v1.22.
- org.openrewrite.kubernetes.migrate.MigrateToAPIv1_25
- Migrate to Kubernetes API v1.25
- This recipe will apply changes commonly needed when migrating to Kubernetes API v1.25.
- org.openrewrite.kubernetes.migrate.MigrateToAPIv1_26
- Migrate to Kubernetes API v1.26
- This recipe will apply changes commonly needed when migrating to Kubernetes API v1.26.
- org.openrewrite.kubernetes.migrate.MigrateToAPIv1_27
- Migrate to Kubernetes API v1.27
- This recipe will apply changes commonly needed when migrating to Kubernetes API v1.27.
- org.openrewrite.kubernetes.migrate.MigrateToAPIv1_29
- Migrate to Kubernetes API v1.29
- This recipe will apply changes commonly needed when migrating to Kubernetes API v1.29.
- org.openrewrite.kubernetes.migrate.MigrateToAPIv1_32
- Migrate to Kubernetes API v1.32
- This recipe will apply changes commonly needed when migrating to Kubernetes API v1.32.
- org.openrewrite.kubernetes.migrate.MigrateToAPIv1_33
- Migrate to Kubernetes API v1.33
- This recipe will apply changes commonly needed when migrating to Kubernetes API v1.33.
- org.openrewrite.kubernetes.migrate.MigrateToAPIv1_34
- Migrate to Kubernetes API v1.34
- This recipe will apply changes commonly needed when migrating to Kubernetes API v1.34.
- org.openrewrite.kubernetes.migrate.MigrateToAPIv1_35
- Migrate to Kubernetes API v1.35
- This recipe will apply changes commonly needed when migrating to Kubernetes API v1.35.
lang
1 recipe
- org.openrewrite.apache.commons.lang.UpgradeApacheCommonsLang_2_3
- Migrates to Apache Commons Lang 3.x
- Migrate applications to the latest Apache Commons Lang 3.x release. This recipe modifies application's build files, and changes the package as per the migration release notes.
langchain
7 recipes
- org.openrewrite.python.migrate.langchain.FindDeprecatedLangchainAgents
- Find deprecated LangChain agent patterns
- Find usage of deprecated LangChain agent patterns including
initialize_agent,AgentExecutor, andLLMChain. These were deprecated in LangChain v0.2 and removed in v1.0.
- org.openrewrite.python.migrate.langchain.FindLangchainCreateReactAgent
- Find
create_react_agentusage (replace withcreate_agent) - Find
from langgraph.prebuilt import create_react_agentwhich should be replaced withfrom langchain.agents import create_agentin LangChain v1.0.
- Find
- org.openrewrite.python.migrate.langchain.ReplaceLangchainClassicImports
- Replace
langchainlegacy imports withlangchain_classic - Migrate legacy chain, retriever, and indexing imports from
langchaintolangchain_classic. These were moved in LangChain v1.0.
- Replace
- org.openrewrite.python.migrate.langchain.ReplaceLangchainCommunityImports
- Replace
langchainimports withlangchain_community - Migrate third-party integration imports from
langchaintolangchain_community. These integrations were moved in LangChain v0.2.
- Replace
- org.openrewrite.python.migrate.langchain.ReplaceLangchainProviderImports
- Replace
langchain_communityimports with provider packages - Migrate provider-specific imports from
langchain_communityto dedicated provider packages likelangchain_openai,langchain_anthropic, etc.
- Replace
- org.openrewrite.python.migrate.langchain.UpgradeToLangChain02
- Upgrade to LangChain 0.2
- Migrate to LangChain 0.2 by updating imports from
langchaintolangchain_communityand provider-specific packages.
- org.openrewrite.python.migrate.langchain.UpgradeToLangChain1
- Upgrade to LangChain 1.0
- Migrate to LangChain 1.0 by applying all v0.2 migrations and then moving legacy functionality to
langchain_classic.
linq
27 recipes
- OpenRewrite.Recipes.CodeQuality.Linq.CombineLinqMethods
- Combine LINQ methods
- Combine
.Where(predicate).First()and similar patterns into.First(predicate), and consecutive.Where().Where()calls into a single.Where()with a combined predicate. Eliminating intermediate LINQ calls improves readability.
- OpenRewrite.Recipes.CodeQuality.Linq.FindOptimizeCountUsage
- Find Count() comparison that could be optimized
- Detect
Count(pred) == nandCount() > ncomparisons which could useWhere().Take(n+1).Count()orSkip(n).Any()for better performance.
- OpenRewrite.Recipes.CodeQuality.Linq.FindWhereBeforeOrderBy
- Use Where before OrderBy
- Place
.Where()before.OrderBy()to filter elements before sorting. This reduces the number of items that need to be sorted.
- OpenRewrite.Recipes.CodeQuality.Linq.LinqCodeQuality
- LINQ code quality
- Optimize LINQ method calls for better readability and performance.
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqSelectAverage
- Optimize LINQ Select().Average()
- Replace
items.Select(selector).Average()withitems.Average(selector).
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqSelectMax
- Optimize LINQ Select().Max()
- Replace
items.Select(selector).Max()withitems.Max(selector). Passing the selector directly toMaxavoids an intermediate iterator.
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqSelectMin
- Optimize LINQ Select().Min()
- Replace
items.Select(selector).Min()withitems.Min(selector). Passing the selector directly toMinavoids an intermediate iterator.
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqSelectSum
- Optimize LINQ Select().Sum()
- Replace
items.Select(selector).Sum()withitems.Sum(selector).
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereAny
- Optimize LINQ Where().Any()
- Replace
items.Where(predicate).Any()withitems.Any(predicate). Passing the predicate directly toAnyavoids an intermediate iterator.
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereCount
- Optimize LINQ Where().Count()
- Replace
items.Where(predicate).Count()withitems.Count(predicate). Passing the predicate directly toCountavoids an intermediate iterator.
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereCountLong
- Optimize LINQ Where().LongCount()
- Replace
.Where(predicate).LongCount()with.LongCount(predicate).
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereFirst
- Optimize LINQ Where().First()
- Replace
items.Where(predicate).First()withitems.First(predicate).
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereFirstOrDefault
- Optimize LINQ Where().FirstOrDefault()
- Replace
items.Where(predicate).FirstOrDefault()withitems.FirstOrDefault(predicate).
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereLast
- Optimize LINQ Where().Last()
- Replace
items.Where(predicate).Last()withitems.Last(predicate).
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereLastOrDefault
- Optimize LINQ Where().LastOrDefault()
- Replace
.Where(predicate).LastOrDefault()with.LastOrDefault(predicate).
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereSingle
- Optimize LINQ Where().Single()
- Replace
items.Where(predicate).Single()withitems.Single(predicate).
- OpenRewrite.Recipes.CodeQuality.Linq.OptimizeLinqWhereSingleOrDefault
- Optimize LINQ Where().SingleOrDefault()
- Replace
items.Where(predicate).SingleOrDefault()withitems.SingleOrDefault(predicate).
- OpenRewrite.Recipes.CodeQuality.Linq.RemoveUselessOrderBy
- Remove useless OrderBy call
- Replace
.OrderBy(a).OrderBy(b)with.OrderBy(b). A secondOrderBycompletely replaces the first sort, making the first call useless.
- OpenRewrite.Recipes.CodeQuality.Linq.UseAnyInsteadOfCount
- Use Any() instead of Count() > 0
- Replace
.Count() > 0with.Any().Any()short-circuits after the first match, whileCount()enumerates all elements.
- OpenRewrite.Recipes.CodeQuality.Linq.UseCastInsteadOfSelect
- Use Cast<T>() instead of Select with cast
- Replace
.Select(x => (T)x)with.Cast<T>(). TheCast<T>()method is more concise and clearly expresses the intent.
- OpenRewrite.Recipes.CodeQuality.Linq.UseOrderByDescendingThenByDescending
- Use OrderByDescending().ThenByDescending()
- Replace
.OrderByDescending(a).OrderByDescending(b)with.OrderByDescending(a).ThenByDescending(b).
- OpenRewrite.Recipes.CodeQuality.Linq.UseOrderByThenBy
- Use ThenBy instead of second OrderBy
- Replace
items.OrderBy(a).OrderBy(b)withitems.OrderBy(a).ThenBy(b). A secondOrderBydiscards the first sort;ThenBypreserves it as a secondary key.
- OpenRewrite.Recipes.CodeQuality.Linq.UseOrderByThenByDescending
- Use OrderBy().ThenByDescending()
- Replace
.OrderBy(a).OrderByDescending(b)with.OrderBy(a).ThenByDescending(b).
- OpenRewrite.Recipes.CodeQuality.Linq.UseOrderInsteadOfOrderBy
- Use Order() instead of OrderBy() with identity
- Replace
.OrderBy(x => x)with.Order(). TheOrder()method (available since .NET 7) is a cleaner way to sort elements in their natural order.
- OpenRewrite.Recipes.CodeQuality.Performance.FindLinqOnDirectMethods
- Find LINQ methods replaceable with direct methods
- Detect LINQ methods like
.Count()that could be replaced with direct collection properties. Direct access avoids enumeration overhead.
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseIndexerInsteadOfLinq
- Find LINQ methods replaceable with indexer
- Detect LINQ methods like
.First()and.Last()that could be replaced with direct indexer access for better performance.
- OpenRewrite.Recipes.Net10.FindQueryableMaxByMinByObsolete
- Find obsolete
Queryable.MaxBy/MinBywithIComparer<TSource>(SYSLIB0061) - Finds
Queryable.MaxByandQueryable.MinByoverloads takingIComparer<TSource>which are obsolete in .NET 10. Use the overloads takingIComparer<TKey>instead.
- Find obsolete
LoadTimeWeaver
1 recipe
- com.oracle.weblogic.rewrite.spring.framework.ReplaceWebLogicLoadTimeWeaver
- Replace Removed WebLogicLoadTimeWeaver from Spring Framework 5.3.x to 6.2.x
- Replace removed WebLogicLoadTimeWeaver with LoadTimeWeaver from Spring Framework 6.2.x.
local
1 recipe
- org.openrewrite.java.netty.EventLoopGroupToMultiThreadIoEventLoopGroupRecipes$LocalEventLoopGroupFactoryRecipe
- Replace
LocalEventLoopGroupwithMultiThreadIoEventLoopGroup - Replace
new LocalEventLoopGroup()withnew MultiThreadIoEventLoopGroup(LocalIoHandler.newFactory()).
- Replace
locale
1 recipe
- org.openrewrite.python.migrate.FindLocaleGetdefaultlocale
- Find deprecated
locale.getdefaultlocale()usage locale.getdefaultlocale()was deprecated in Python 3.11. Uselocale.setlocale(),locale.getlocale(), orlocale.getpreferredencoding(False)instead.
- Find deprecated
lodash
4 recipes
- org.openrewrite.codemods.migrate.lodash.LodashUnderscoreArray
- Replace lodash and underscore array functions with native JavaScript
-
_.head(x)->x[0]-_.head(x, n)->x.slice(n)-_.first(alias for_.head) -_.tail(x)->x.slice(1)-_.tail(x, n)->x.slice(n)-_.rest(alias for_.tail) -_.last(x)->x[x.length - 1]-_.last(x, n)->x.slice(x.length - n).
- org.openrewrite.codemods.migrate.lodash.LodashUnderscoreFunction
- Replace lodash and underscore function functions with native JavaScript
-
_.bind(fn, obj, ...x)->fn.bind(obj, ...x)-_.partial(fn, a, b);->(...args) => fn(a, b, ...args).
- org.openrewrite.codemods.migrate.lodash.LodashUnderscoreObjects
- Replace lodash and underscore object functions with native JavaScript
-
_.clone(x)->\{ ...x \}-_.extend(\{\}, x, y)->\{ ...x, ...y \}-_.extend(obj, x, y)->Object.assign(obj, x, y)-_.keys(x)->Object.keys(x)-_.pairs(x)->Object.entries(x)-_.values(x)->Object.values(x).
- org.openrewrite.codemods.migrate.lodash.LodashUnderscoreUtil
- Replace lodash and underscore utility functions with native JavaScript
-
_.isArray(x)->Array.isArray(x)-_.isBoolean(x)->typeof(x) === 'boolean'-_.isFinite(x)->Number.isFinite(x)-_.isFunction(x)->typeof(x) === 'function'-_.isNull(x)->x === null-_.isString(x)->typeof(x) === 'string'-_.isUndefined(x)->typeof(x) === 'undefined'.
log4j
10 recipes
- org.openrewrite.java.logging.log4j.CommonsLoggingToLog4j
- Migrate JCL to Log4j 2.x API
- Transforms code written using Apache Commons Logging to use Log4j 2.x API.
- org.openrewrite.java.logging.log4j.JulToLog4j
- Migrate JUL to Log4j 2.x API
- Transforms code written using
java.util.loggingto use Log4j 2.x API.
- org.openrewrite.java.logging.log4j.Log4j1ToLog4j2
- Migrate Log4j 1.x to Log4j 2.x
- Migrates Log4j 1.x to Log4j 2.x.
- org.openrewrite.java.logging.log4j.ParameterizedLogging
- Parameterize Log4j 2.x logging statements
- Use Log4j 2.x parameterized logging, which can significantly boost performance for messages that otherwise would be assembled with String concatenation. Particularly impactful when the log level is not enabled, as no work is done to assemble the message.
- org.openrewrite.java.logging.log4j.Slf4jToLog4j
- Migrate SLF4J to Log4j 2.x API
- Transforms code written using SLF4J to use Log4j 2.x API.
- org.openrewrite.java.logging.log4j.UpgradeLog4J2DependencyVersion
- Upgrade Log4j 2.x dependency version
- Upgrades the Log4j 2.x dependencies to the latest 2.x version. Mitigates the Log4Shell and other Log4j2-related vulnerabilities.
- org.openrewrite.java.logging.logback.Log4jToLogback
- Migrate Log4j 2.x to Logback
- Migrates usage of Apache Log4j 2.x to using
logbackas an SLF4J implementation directly. Note, this currently does not modifylog4j.propertiesfiles.
- org.openrewrite.java.logging.slf4j.Log4j1ToSlf4j1
- Migrate Log4j 1.x to SLF4J 1.x
- Transforms usages of Log4j 1.x to leveraging SLF4J 1.x directly. Note, this currently does not modify
log4j.propertiesfiles.
- org.openrewrite.java.logging.slf4j.Log4j2ToSlf4j1
- Migrate Log4j 2.x to SLF4J 1.x
- Transforms usages of Log4j 2.x to leveraging SLF4J 1.x directly. Note, this currently does not modify
log4j.propertiesfiles.
- org.openrewrite.java.logging.slf4j.Log4jToSlf4j
- Migrate Log4j to SLF4J
- Migrates usage of Apache Log4j to using SLF4J directly. Use of the traditional Log4j to SLF4J bridge can result in loss of performance, as the Log4j messages must be formatted before they can be passed to SLF4J. Note, this currently does not modify
log4j.propertiesfiles.
log4shell
1 recipe
- org.openrewrite.java.logging.log4j.UpgradeLog4J2DependencyVersion
- Upgrade Log4j 2.x dependency version
- Upgrades the Log4j 2.x dependencies to the latest 2.x version. Mitigates the Log4Shell and other Log4j2-related vulnerabilities.
logback
1 recipe
- org.openrewrite.java.logging.logback.Log4jToLogback
- Migrate Log4j 2.x to Logback
- Migrates usage of Apache Log4j 2.x to using
logbackas an SLF4J implementation directly. Note, this currently does not modifylog4j.propertiesfiles.
logging
27 recipes
- OpenRewrite.Recipes.AspNetCore2.FindLoggerFactoryAddProvider
- Find ILoggerFactory.Add() calls*
- Flags
ILoggerFactory.AddConsole(),AddDebug(), and similar extension methods. In ASP.NET Core 2.2+, logging should be configured viaConfigureLoggingin the host builder.
- OpenRewrite.Recipes.AspNetCore3.FindNewLoggerFactory
- Find new LoggerFactory() calls
- Flags
new LoggerFactory()calls that should be replaced withLoggerFactory.Create(builder => ...)in .NET Core 3.0+.
- io.moderne.java.spring.framework7.RemoveSpringJcl
- Remove spring-jcl dependency
- The
spring-jclmodule has been removed in Spring Framework 7.0 in favor of Apache Commons Logging 1.3.0. This recipe removes any explicit dependency onorg.springframework:spring-jcl. The change should be transparent for most applications, as spring-jcl was typically a transitive dependency and the logging API calls (org.apache.commons.logging.*) remain unchanged.
- org.openrewrite.java.logging.jboss.JBossLoggingBestPractices
- JBoss Logging Best Practices
- This recipe applies best practices for logging in JBoss applications. It includes converting argument arrays to varargs for better readability and performance.
- org.openrewrite.java.logging.log4j.CommonsLoggingToLog4j
- Migrate JCL to Log4j 2.x API
- Transforms code written using Apache Commons Logging to use Log4j 2.x API.
- org.openrewrite.java.logging.log4j.JulToLog4j
- Migrate JUL to Log4j 2.x API
- Transforms code written using
java.util.loggingto use Log4j 2.x API.
- org.openrewrite.java.logging.log4j.Log4j1ToLog4j2
- Migrate Log4j 1.x to Log4j 2.x
- Migrates Log4j 1.x to Log4j 2.x.
- org.openrewrite.java.logging.log4j.ParameterizedLogging
- Parameterize Log4j 2.x logging statements
- Use Log4j 2.x parameterized logging, which can significantly boost performance for messages that otherwise would be assembled with String concatenation. Particularly impactful when the log level is not enabled, as no work is done to assemble the message.
- org.openrewrite.java.logging.log4j.Slf4jToLog4j
- Migrate SLF4J to Log4j 2.x API
- Transforms code written using SLF4J to use Log4j 2.x API.
- org.openrewrite.java.logging.log4j.UpgradeLog4J2DependencyVersion
- Upgrade Log4j 2.x dependency version
- Upgrades the Log4j 2.x dependencies to the latest 2.x version. Mitigates the Log4Shell and other Log4j2-related vulnerabilities.
- org.openrewrite.java.logging.logback.Log4jToLogback
- Migrate Log4j 2.x to Logback
- Migrates usage of Apache Log4j 2.x to using
logbackas an SLF4J implementation directly. Note, this currently does not modifylog4j.propertiesfiles.
- org.openrewrite.java.logging.slf4j.CommonsLogging1ToSlf4j1
- Migrate Apache Commons Logging 1.x to SLF4J 1.x
- Transforms usages of Apache Commons Logging 1.x to leveraging SLF4J 1.x directly.
- org.openrewrite.java.logging.slf4j.CompleteExceptionLogging
- Enhances logging of exceptions by including the full stack trace in addition to the exception message
- It is a common mistake to call
Exception.getMessage()when passing an exception into a log method. Not all exception types have useful messages, and even if the message is useful this omits the stack trace. Including a complete stack trace of the error along with the exception message in the log allows developers to better understand the context of the exception and identify the source of the error more quickly and accurately. If the method invocation includes any call toException.getMessage()orException.getLocalizedMessage()and not an exception is already passed as the last parameter to the log method, then we will append the exception as the last parameter in the log method.
- org.openrewrite.java.logging.slf4j.JBossLoggingToSlf4j
- Migrate JBoss Logging to SLF4J
- Migrates usage of the JBoss Logging facade to using SLF4J.
- org.openrewrite.java.logging.slf4j.JulToSlf4j
- Migrate JUL to SLF4J
- Migrates usage of Java Util Logging (JUL) to using SLF4J directly.
- org.openrewrite.java.logging.slf4j.Log4j1ToSlf4j1
- Migrate Log4j 1.x to SLF4J 1.x
- Transforms usages of Log4j 1.x to leveraging SLF4J 1.x directly. Note, this currently does not modify
log4j.propertiesfiles.
- org.openrewrite.java.logging.slf4j.Log4j2ToSlf4j1
- Migrate Log4j 2.x to SLF4J 1.x
- Transforms usages of Log4j 2.x to leveraging SLF4J 1.x directly. Note, this currently does not modify
log4j.propertiesfiles.
- org.openrewrite.java.logging.slf4j.Log4jToSlf4j
- Migrate Log4j to SLF4J
- Migrates usage of Apache Log4j to using SLF4J directly. Use of the traditional Log4j to SLF4J bridge can result in loss of performance, as the Log4j messages must be formatted before they can be passed to SLF4J. Note, this currently does not modify
log4j.propertiesfiles.
- org.openrewrite.java.logging.slf4j.LoggersNamedForEnclosingClass
- Loggers should be named for their enclosing classes
- Ensure
LoggerFactory#getLogger(Class)is called with the enclosing class as argument.
- org.openrewrite.java.logging.slf4j.MessageFormatToParameterizedLogging
MessageFormat.format()in logging statements should use SLF4J parameterized logging- Replace
MessageFormat.format()calls in SLF4J logging statements with parameterized placeholders for improved performance.
- org.openrewrite.java.logging.slf4j.ParameterizedLogging
- Parameterize SLF4J's logging statements
- Use SLF4J's parameterized logging, which can significantly boost performance for messages that otherwise would be assembled with String concatenation. Particularly impactful when the log level is not enabled, as no work is done to assemble the message.
- org.openrewrite.java.logging.slf4j.RemoveUnnecessaryLogLevelGuards
- Remove unnecessary log level guards
- Remove
ifstatement guards around SLF4J logging calls when parameterized logging makes them unnecessary.
- org.openrewrite.java.logging.slf4j.Slf4jBestPractices
- SLF4J best practices
- Applies best practices to logging with SLF4J.
- org.openrewrite.java.logging.slf4j.Slf4jLogShouldBeConstant
- SLF4J logging statements should begin with constants
- Logging statements shouldn't begin with
String#format, calls totoString(), etc.
- org.openrewrite.java.logging.slf4j.StringFormatToParameterizedLogging
String.format()in logging statements should use SLF4J parameterized logging- Replace
String.format()calls in SLF4J logging statements with parameterized placeholders for improved performance.
- org.openrewrite.java.migrate.logging.JavaLoggingAPIs
- Use modernized
java.util.loggingAPIs - Certain Java logging APIs have become deprecated and their usages changed, necessitating usage changes.
- Use modernized
- org.openrewrite.java.spring.boot3.MigrateSapCfJavaLoggingSupport
- Migrate SAP cloud foundry logging support to Spring Boot 3.x
- Migrate SAP cloud foundry logging support from
cf-java-logging-support-servlettocf-java-logging-support-servlet-jakarta, to use Jakarta with Spring Boot 3.
lombok
6 recipes
- org.openrewrite.java.migrate.lombok.LombokOnXToOnX_
- Migrate Lombok's
@__syntax toonX_for Java 8+ - Migrates Lombok's
onXannotations from the Java 7 style using@__to the Java 8+ style usingonX_. For example,@Getter(onMethod=@__(\{@Id\}))becomes@Getter(onMethod_=\{@Id\}).
- Migrate Lombok's
- org.openrewrite.java.migrate.lombok.LombokValToFinalVar
- Prefer
final varoverlombok.val - Prefer the Java standard library's
final varandvarover third-party usage of Lombok'slombok.valandlombok.varin Java 10 or higher.
- Prefer
- org.openrewrite.java.migrate.lombok.LombokValueToRecord
- Convert
@lombok.Valueclass to Record - Convert Lombok
@Valueannotated classes to standard Java Records.
- Convert
- org.openrewrite.java.migrate.lombok.UpdateLombokToJava11
- Migrate Lombok to a Java 11 compatible version
- Update Lombok dependency to a version that is compatible with Java 11 and migrate experimental Lombok types that have been promoted.
- org.openrewrite.java.migrate.lombok.UseLombokGetter
- Convert getter methods to annotations
- Convert trivial getter methods to
@Getterannotations on their respective fields.
- org.openrewrite.java.migrate.lombok.UseLombokSetter
- Convert setter methods to annotations
- Convert trivial setter methods to
@Setterannotations on their respective fields.
macpath
1 recipe
- org.openrewrite.python.migrate.FindMacpathModule
- Find removed
macpathmodule usage - The
macpathmodule was removed in Python 3.8. Useos.pathinstead.
- Find removed
mail
1 recipe
- org.openrewrite.quarkus.spring.SpringBootMailToQuarkus
- Replace Spring Boot Mail with Quarkus Mailer
- Migrates
spring-boot-starter-mailtoquarkus-mailer.
material
78 recipes
- org.openrewrite.codemods.migrate.mui.AdapterV
- Converts components to use the v4 adapter module
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.All
- Combination of all deprecations
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.AutocompleteRenameCloseicon
- Renames
closeIconprop tocloseButtonIcon - See Material UI codemod projects for more details.
- Tags: material-ui
- Renames
- org.openrewrite.codemods.migrate.mui.AutocompleteRenameOption
- Renames
optionprop togetOptionLabel - See Material UI codemod projects for more details.
- Tags: material-ui
- Renames
- org.openrewrite.codemods.migrate.mui.AvatarCircleCircular
- Updates
circleprop tovariant="circular" - See Material UI codemod projects for more details.
- Tags: material-ui
- Updates
- org.openrewrite.codemods.migrate.mui.BadgeOverlapValue
- Updates
overlapprop tovariant="dot" - See Material UI codemod projects for more details.
- Tags: material-ui
- Updates
- org.openrewrite.codemods.migrate.mui.BaseHookImports
- Converts base imports to use React hooks
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.BaseRemoveComponentProp
- Removes
componentprop from base components - See Material UI codemod projects for more details.
- Tags: material-ui
- Removes
- org.openrewrite.codemods.migrate.mui.BaseRemoveUnstyledSuffix
- Removes
Unstyledsuffix from base components - See Material UI codemod projects for more details.
- Tags: material-ui
- Removes
- org.openrewrite.codemods.migrate.mui.BaseRenameComponentsToSlots
- Renames base components to slots
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.BaseUseNamedExports
- Updates base imports to use named exports
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.BoxBorderradiusValues
- Updates
borderRadiusprop values - See Material UI codemod projects for more details.
- Tags: material-ui
- Updates
- org.openrewrite.codemods.migrate.mui.BoxRenameCss
- Renames CSS properties for Box component
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.BoxRenameGap
- Renames
gapprop tospacing - See Material UI codemod projects for more details.
- Tags: material-ui
- Renames
- org.openrewrite.codemods.migrate.mui.BoxSxProp
- Converts
sxprop tosxstyle prop - See Material UI codemod projects for more details.
- Tags: material-ui
- Converts
- org.openrewrite.codemods.migrate.mui.ButtonColorProp
- Renames
colorprop tocolorOverride - See Material UI codemod projects for more details.
- Tags: material-ui
- Renames
- org.openrewrite.codemods.migrate.mui.ChipVariantProp
- Updates
variantprop for Chip component - See Material UI codemod projects for more details.
- Tags: material-ui
- Updates
- org.openrewrite.codemods.migrate.mui.CircularprogressVariant
- Updates
variantprop for CircularProgress component - See Material UI codemod projects for more details.
- Tags: material-ui
- Updates
- org.openrewrite.codemods.migrate.mui.CollapseRenameCollapsedheight
- Renames
collapsedHeightprop totransitionCollapsedHeight - See Material UI codemod projects for more details.
- Tags: material-ui
- Renames
- org.openrewrite.codemods.migrate.mui.ComponentRenameProp
- Renames
componentprop toas - See Material UI codemod projects for more details.
- Tags: material-ui
- Renames
- org.openrewrite.codemods.migrate.mui.CoreStylesImport
- Updates import paths for core styles
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.CreateTheme
- Updates createMuiTheme usage
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.DatePickersMovedToX
- Moves date pickers to
@mui/x-date-picker - See Material UI codemod projects for more details.
- Tags: material-ui
- Moves date pickers to
- org.openrewrite.codemods.migrate.mui.DialogProps
- Updates props for Dialog component
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.DialogTitleProps
- Updates props for DialogTitle component
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.EmotionPrependCache
- Prepends emotion cache
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.ExpansionPanelComponent
- Converts ExpansionPanel to use ExpansionPanel component
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.FabVariant
- Updates
variantprop for Fab component - See Material UI codemod projects for more details.
- Tags: material-ui
- Updates
- org.openrewrite.codemods.migrate.mui.FadeRenameAlpha
- Renames
alphaprop toopacity - See Material UI codemod projects for more details.
- Tags: material-ui
- Renames
- org.openrewrite.codemods.migrate.mui.GridJustifyJustifycontent
- Updates
justifyprop tojustifyContentfor Grid component - See Material UI codemod projects for more details.
- Tags: material-ui
- Updates
- org.openrewrite.codemods.migrate.mui.GridListComponent
- Converts GridList to use Grid component
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.GridVProps
- Updates the usage of the
@mui/material/Grid2,@mui/system/Grid, and@mui/joy/Gridcomponents to their updated APIs - See Material UI codemod projects for more details.
- Tags: material-ui
- Updates the usage of the
- org.openrewrite.codemods.migrate.mui.HiddenDownProps
- Updates
downprop for Hidden component - See Material UI codemod projects for more details.
- Tags: material-ui
- Updates
- org.openrewrite.codemods.migrate.mui.IconButtonSize
- Updates
sizeprop for IconButton component - See Material UI codemod projects for more details.
- Tags: material-ui
- Updates
- org.openrewrite.codemods.migrate.mui.JoyAvatarRemoveImgprops
- Removes
imgPropsprop from Avatar component - See Material UI codemod projects for more details.
- Tags: material-ui
- Removes
- org.openrewrite.codemods.migrate.mui.JoyRenameClassnamePrefix
- Renames
Muiclassname prefix - See Material UI codemod projects for more details.
- Tags: material-ui
- Renames
- org.openrewrite.codemods.migrate.mui.JoyRenameComponentsToSlots
- Renames components to slots
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.JoyRenameRowProp
- Renames
rowprop toflexDirection="row" - See Material UI codemod projects for more details.
- Tags: material-ui
- Renames
- org.openrewrite.codemods.migrate.mui.JoyTextFieldToInput
- Renames
TextFieldtoInput - See Material UI codemod projects for more details.
- Tags: material-ui
- Renames
- org.openrewrite.codemods.migrate.mui.JssToStyled
- Converts JSS styles to styled-components
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.JssToTssReact
- Converts JSS to TypeScript in React components
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.LinkUnderlineHover
- Updates link underline on hover
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.MaterialUiStyles
- Updates usage of
@mui/styles - See Material UI codemod projects for more details.
- Tags: material-ui
- Updates usage of
- org.openrewrite.codemods.migrate.mui.MaterialUiTypes
- Updates usage of
@mui/types - See Material UI codemod projects for more details.
- Tags: material-ui
- Updates usage of
- org.openrewrite.codemods.migrate.mui.ModalProps
- Updates props for Modal component
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.MovedLabModules
- Moves lab modules to
@mui/material - See Material UI codemod projects for more details.
- Tags: material-ui
- Moves lab modules to
- org.openrewrite.codemods.migrate.mui.MuiReplace
- Replaces
@muiimports with@mui/material - See Material UI codemod projects for more details.
- Tags: material-ui
- Replaces
- org.openrewrite.codemods.migrate.mui.OptimalImports
- Optimizes imports
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.PaginationRoundCircular
- Updates
circularprop tovariant="circular" - See Material UI codemod projects for more details.
- Tags: material-ui
- Updates
- org.openrewrite.codemods.migrate.mui.PresetSafe
- Ensures presets are safe to use
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.RenameCssVariables
- Renames CSS variables
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.RootRef
- Converts
rootReftoref - See Material UI codemod projects for more details.
- Tags: material-ui
- Converts
- org.openrewrite.codemods.migrate.mui.SkeletonVariant
- Updates
variantprop for Skeleton component - See Material UI codemod projects for more details.
- Tags: material-ui
- Updates
- org.openrewrite.codemods.migrate.mui.Styled
- Updates the usage of
styledfrom@mui/system@v5to be compatible with@pigment-css/react - See Material UI codemod projects for more details.
- Tags: material-ui
- Updates the usage of
- org.openrewrite.codemods.migrate.mui.StyledEngineProvider
- Updates usage of styled engine provider
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.SxProp
- Update the usage of the
sxprop to be compatible with@pigment-css/react - See Material UI codemod projects for more details.
- Tags: material-ui
- Update the usage of the
- org.openrewrite.codemods.migrate.mui.SystemProps
- Remove system props and add them to the
sxprop - See Material UI codemod projects for more details.
- Tags: material-ui
- Remove system props and add them to the
- org.openrewrite.codemods.migrate.mui.TableProps
- Updates props for Table component
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.TabsScrollButtons
- Updates scroll buttons for Tabs component
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.TextareaMinmaxRows
- Updates
minRowsandmaxRowsprops for TextareaAutosize component - See Material UI codemod projects for more details.
- Tags: material-ui
- Updates
- org.openrewrite.codemods.migrate.mui.ThemeAugment
- Adds
DefaultThememodule augmentation to typescript projects - See Material UI codemod projects for more details.
- Tags: material-ui
- Adds
- org.openrewrite.codemods.migrate.mui.ThemeBreakpoints
- Updates theme breakpoints
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.ThemeBreakpointsWidth
- Updates
widthvalues for theme breakpoints - See Material UI codemod projects for more details.
- Tags: material-ui
- Updates
- org.openrewrite.codemods.migrate.mui.ThemeOptions
- Updates theme options
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.ThemePaletteMode
- Updates theme palette mode
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.ThemeProvider
- Updates usage of ThemeProvider
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.ThemeSpacing
- Updates theme spacing
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.ThemeSpacingApi
- Updates theme spacing API
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.ThemeTypographyRound
- Updates
roundvalues for theme typography - See Material UI codemod projects for more details.
- Tags: material-ui
- Updates
- org.openrewrite.codemods.migrate.mui.ThemeV
- Update the theme creation from
@mui/system@v5to be compatible with@pigment-css/react - See Material UI codemod projects for more details.
- Tags: material-ui
- Update the theme creation from
- org.openrewrite.codemods.migrate.mui.TopLevelImports
- Converts all
@mui/materialsubmodule imports to the root module - See Material UI codemod projects for more details.
- Tags: material-ui
- Converts all
- org.openrewrite.codemods.migrate.mui.Transitions
- Updates usage of transitions
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.TreeViewMovedToX
- Moves tree view to
@mui/x-tree-view - See Material UI codemod projects for more details.
- Tags: material-ui
- Moves tree view to
- org.openrewrite.codemods.migrate.mui.UseAutocomplete
- Updates usage of useAutocomplete
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.UseTransitionprops
- Updates usage of useTransitionProps
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.VariantProp
- Updates
variantprop usage - See Material UI codemod projects for more details.
- Tags: material-ui
- Updates
- org.openrewrite.codemods.migrate.mui.WithMobileDialog
- Updates withMobileDialog higher-order component
- See Material UI codemod projects for more details.
- Tags: material-ui
- org.openrewrite.codemods.migrate.mui.WithWidth
- Updates withWidth higher-order component
- See Material UI codemod projects for more details.
- Tags: material-ui
math
1 recipe
- org.openrewrite.apache.commons.math.UpgradeApacheCommonsMath_2_3
- Migrates to Apache Commons Math 3.x
- Migrate applications to the latest Apache Commons Math 3.x release. This recipe modifies application's build files, make changes to deprecated/preferred APIs, and migrates configuration settings that have changes between versions.
maven
2 recipes
- org.openrewrite.quarkus.spring.CustomizeQuarkusPluginGoals
- Customize Quarkus Maven Plugin Goals
- Allows customization of Quarkus Maven plugin goals. Adds or modifies the executions and goals for the quarkus-maven-plugin.
- org.openrewrite.quarkus.spring.MigrateMavenPlugin
- Add or replace Spring Boot build plugin with Quarkus build plugin
- Remove Spring Boot Maven plugin if present and add Quarkus Maven plugin using the same version as the quarkus-bom.
messaging
2 recipes
- org.openrewrite.quarkus.spring.SpringBootAmqpToQuarkusReactive
- Replace Spring Boot AMQP with Quarkus Messaging AMQP
- Migrates
spring-boot-starter-amqptoquarkus-messaging-amqpwhen reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringKafkaToQuarkusReactive
- Replace Spring Kafka with Quarkus Messaging Kafka
- Migrates
spring-kafkatoquarkus-messaging-kafkawhen reactor dependencies are present.
metrics
1 recipe
- org.openrewrite.quarkus.spring.MigrateSpringActuator
- Migrate Spring Boot Actuator to Quarkus Health and Metrics
- Migrates Spring Boot Actuator to Quarkus SmallRye Health and Metrics extensions. Converts HealthIndicator implementations to Quarkus HealthCheck pattern.
micrometer
3 recipes
- org.openrewrite.java.migrate.metrics.SimplifyMicrometerMeterTags
- Simplify Micrometer meter tags
- Use the simplest method to add new tags.
- org.openrewrite.java.spring.cloud2022.MigrateCloudSleuthToMicrometerTracing
- Migrate Spring Cloud Sleuth 3.1 to Micrometer Tracing 1.0
- Spring Cloud Sleuth has been discontinued and only compatible with Spring Boot 2.x.
- org.openrewrite.micrometer.UpgradeMicrometer_1_13
- Migrate to Micrometer 1.13
- Migrate applications to the latest Micrometer 1.13 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions as described in the Micrometer 1.13 migration guide.
migration
159 recipes
- OpenRewrite.Recipes.AspNet.UpgradeAspNetFrameworkToCore
- Migrate ASP.NET Framework to ASP.NET Core
- Migrate ASP.NET Framework (System.Web.Mvc, System.Web.Http) types to their ASP.NET Core equivalents. Based on the .NET Upgrade Assistant's UA0002 and UA0010 diagnostics. See https://learn.microsoft.com/en-us/aspnet/core/migration/proper-to-2x.
- OpenRewrite.Recipes.AspNetCore2.FindBuildWebHost
- Find BuildWebHost method
- Flags
BuildWebHostmethod declarations that should be renamed toCreateWebHostBuilderand refactored for ASP.NET Core 2.1.
- OpenRewrite.Recipes.AspNetCore2.FindIAuthenticationManager
- Find IAuthenticationManager usage
- Flags references to
IAuthenticationManagerwhich was removed in ASP.NET Core 2.0. UseHttpContextextension methods fromMicrosoft.AspNetCore.Authenticationinstead.
- OpenRewrite.Recipes.AspNetCore2.FindLoggerFactoryAddProvider
- Find ILoggerFactory.Add() calls*
- Flags
ILoggerFactory.AddConsole(),AddDebug(), and similar extension methods. In ASP.NET Core 2.2+, logging should be configured viaConfigureLoggingin the host builder.
- OpenRewrite.Recipes.AspNetCore2.FindSetCompatibilityVersion
- Find SetCompatibilityVersion() calls
- Flags
SetCompatibilityVersioncalls. This method is a no-op in ASP.NET Core 3.0+ and should be removed during migration.
- OpenRewrite.Recipes.AspNetCore2.FindUseKestrelWithConfig
- Find UseKestrel() with configuration
- Flags
UseKestrelcalls with configuration lambdas that should be replaced withConfigureKestrelto avoid conflicts with the IIS in-process hosting model.
- OpenRewrite.Recipes.AspNetCore2.UpgradeToAspNetCore20
- Migrate to ASP.NET Core 2.0
- Migrate ASP.NET Core 1.x projects to ASP.NET Core 2.0, applying authentication and Identity changes. See https://learn.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/identity-2x.
- OpenRewrite.Recipes.AspNetCore2.UpgradeToAspNetCore21
- Migrate to ASP.NET Core 2.1
- Migrate ASP.NET Core 2.0 projects to ASP.NET Core 2.1, including host builder changes and obsolete API replacements. See https://learn.microsoft.com/en-us/aspnet/core/migration/20-to-21.
- OpenRewrite.Recipes.AspNetCore2.UpgradeToAspNetCore22
- Migrate to ASP.NET Core 2.2
- Migrate ASP.NET Core 2.1 projects to ASP.NET Core 2.2, including Kestrel configuration and logging changes. See https://learn.microsoft.com/en-us/aspnet/core/migration/21-to-22.
- OpenRewrite.Recipes.AspNetCore2.UseGetExternalAuthenticationSchemesAsync
- Use GetExternalAuthenticationSchemesAsync()
- Replace
GetExternalAuthenticationSchemes()withGetExternalAuthenticationSchemesAsync(). The synchronous method was removed in ASP.NET Core 2.0.
- OpenRewrite.Recipes.AspNetCore2.UseHttpContextAuthExtensions
- Use HttpContext authentication extensions
- Replace
HttpContext.Authentication.Method(...)calls withHttpContext.Method(...)extension methods. TheIAuthenticationManagerinterface was removed in ASP.NET Core 2.0.
- OpenRewrite.Recipes.AspNetCore2.UseUseAuthentication
- Replace UseIdentity() with UseAuthentication()
- Replace
app.UseIdentity()withapp.UseAuthentication(). TheUseIdentitymethod was removed in ASP.NET Core 2.0 in favor ofUseAuthentication.
- OpenRewrite.Recipes.AspNetCore3.FindAddMvc
- Find AddMvc() calls
- Flags
AddMvc()calls that should be replaced with more specific service registrations (AddControllers,AddControllersWithViews, orAddRazorPages) in ASP.NET Core 3.0.
- OpenRewrite.Recipes.AspNetCore3.FindIApplicationLifetime
- Find IApplicationLifetime usage
- Flags usages of
IApplicationLifetimewhich should be replaced withIHostApplicationLifetimein ASP.NET Core 3.0.
- OpenRewrite.Recipes.AspNetCore3.FindIHostingEnvironment
- Find IHostingEnvironment usage
- Flags usages of
IHostingEnvironmentwhich should be replaced withIWebHostEnvironmentin ASP.NET Core 3.0.
- OpenRewrite.Recipes.AspNetCore3.FindNewLoggerFactory
- Find new LoggerFactory() calls
- Flags
new LoggerFactory()calls that should be replaced withLoggerFactory.Create(builder => ...)in .NET Core 3.0+.
- OpenRewrite.Recipes.AspNetCore3.FindNewtonsoftJsonUsage
- Find Newtonsoft.Json usage in ASP.NET Core
- Flags
JsonConvertand otherNewtonsoft.Jsonusage. ASP.NET Core 3.0 usesSystem.Text.Jsonby default.
- OpenRewrite.Recipes.AspNetCore3.FindUseMvcOrUseSignalR
- Find UseMvc()/UseSignalR() calls
- Flags
UseMvc()andUseSignalR()calls that should be replaced with endpoint routing (UseRouting()+UseEndpoints()) in ASP.NET Core 3.0.
- OpenRewrite.Recipes.AspNetCore3.FindWebHostBuilder
- Find WebHostBuilder usage
- Flags
WebHostBuilderandWebHost.CreateDefaultBuilderusage that should migrate to the Generic Host pattern in ASP.NET Core 3.0+.
- OpenRewrite.Recipes.AspNetCore3.UpgradeToAspNetCore30
- Migrate to ASP.NET Core 3.0
- Migrate ASP.NET Core 2.2 projects to ASP.NET Core 3.0, including endpoint routing, Generic Host, and System.Text.Json changes. See https://learn.microsoft.com/en-us/aspnet/core/migration/22-to-30.
- OpenRewrite.Recipes.Net10.UpgradeToDotNet10
- Migrate to .NET 10
- Migrate C# projects to .NET 10, applying necessary API changes. Includes all .NET 9 (and earlier) migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/10.0.
- OpenRewrite.Recipes.Net3_0.UpgradeToDotNet3_0
- Migrate to .NET Core 3.0
- Migrate C# projects from .NET Core 2.x to .NET Core 3.0, applying necessary API changes for removed and replaced types. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/3.0.
- OpenRewrite.Recipes.Net3_0.UseApiControllerBase
- Migrate ApiController to ControllerBase
- Replace
ApiControllerbase class (from the removed WebApiCompatShim) withControllerBaseand add the[ApiController]attribute. The shim was removed in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_1.UpgradeToDotNet3_1
- Migrate to .NET Core 3.1
- Migrate C# projects from .NET Core 3.0 to .NET Core 3.1. Includes all .NET Core 3.0 migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/3.1.
- OpenRewrite.Recipes.Net5.UpgradeToDotNet5
- Migrate to .NET 5
- Migrate C# projects from .NET Core 3.1 to .NET 5.0. Includes all .NET Core 3.0 and 3.1 migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/5.0.
- OpenRewrite.Recipes.Net6.UpgradeToDotNet6
- Migrate to .NET 6
- Migrate C# projects to .NET 6, applying necessary API changes for obsoleted cryptographic types and other breaking changes. Includes all .NET Core 3.0, 3.1, and .NET 5 migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/6.0.
- OpenRewrite.Recipes.Net7.UpgradeToDotNet7
- Migrate to .NET 7
- Migrate C# projects to .NET 7, applying necessary API changes. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/7.0.
- OpenRewrite.Recipes.Net8.UpgradeToDotNet8
- Migrate to .NET 8
- Migrate C# projects to .NET 8, applying necessary API changes. Includes all .NET 7 migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/8.0.
- OpenRewrite.Recipes.Net9.MigrateSwashbuckleToOpenApi
- Migrate Swashbuckle to built-in OpenAPI
- Migrate from Swashbuckle to the built-in OpenAPI support in ASP.NET Core 9. Replaces
AddSwaggerGen()withAddOpenApi(),UseSwaggerUI()withMapOpenApi(), removesUseSwagger(), removes Swashbuckle packages, and addsMicrosoft.AspNetCore.OpenApi.
- OpenRewrite.Recipes.Net9.UpgradeToDotNet9
- Migrate to .NET 9
- Migrate C# projects to .NET 9, applying necessary API changes. Includes all .NET 7 and .NET 8 migration steps. See https://learn.microsoft.com/en-us/dotnet/core/compatibility/9.0.
- OpenRewrite.Recipes.Net9.UseMapStaticAssets
- Use MapStaticAssets()
- Replace
UseStaticFiles()withMapStaticAssets()for ASP.NET Core 9. Only applies when the receiver supportsIEndpointRouteBuilder(WebApplication / minimal hosting). Skips Startup.cs patterns usingIApplicationBuilderwhereMapStaticAssetsis not available.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.AsyncLifetimeToBeforeAfterTest
- Find
IAsyncLifetimeneeding TUnit migration - Find classes implementing
IAsyncLifetimethat should use[Before(Test)]and[After(Test)]for TUnit.
- Find
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.ChangeXUnitUsings
- Change xUnit using directives to TUnit
- Replace
using Xunit;withusing TUnit.Core;andusing TUnit.Assertions;, and removeusing Xunit.Abstractions;andusing Xunit.Sdk;.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.ClassFixtureToClassDataSource
- Find
IClassFixture<T>needing TUnit migration - Find classes implementing
IClassFixture<T>that should use[ClassDataSource<T>]for TUnit.
- Find
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.CollectionToNotInParallel
- Replace
[Collection]with[NotInParallel] - Replace the xUnit
[Collection("name")]attribute with the TUnit[NotInParallel("name")]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.ConstructorToBeforeTest
- Find test constructors needing
[Before(Test)] - Find constructors in test classes that should be converted to
[Before(Test)]methods for TUnit.
- Find test constructors needing
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.DisposableToAfterTest
- Replace
IDisposablewith[After(Test)] - Remove
IDisposablefrom the base type list and add[After(Test)]to theDispose()method.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.FactSkipToSkipAttribute
- Extract
Skipinto[Skip]attribute - Extract the
Skipargument from[Fact(Skip = "...")]or[Theory(Skip = "...")]into a separate TUnit[Skip("...")]attribute.
- Extract
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.FactTimeoutToTimeoutAttribute
- Extract
Timeoutinto[Timeout]attribute - Extract the
Timeoutargument from[Fact(Timeout = ...)]or[Theory(Timeout = ...)]into a separate TUnit[Timeout(...)]attribute.
- Extract
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.FactToTest
- Replace
[Fact]with[Test] - Replace the xUnit
[Fact]attribute with the TUnit[Test]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.InlineDataToArguments
- Replace
[InlineData]with[Arguments] - Replace the xUnit
[InlineData]attribute with the TUnit[Arguments]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MemberDataToMethodDataSource
- Replace
[MemberData]with[MethodDataSource] - Replace the xUnit
[MemberData]attribute with the TUnit[MethodDataSource]attribute. Fields and properties referenced by MemberData are converted to methods.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateFromXUnit
- Migrate from xUnit to TUnit
- Migrate xUnit test attributes, assertions, and lifecycle patterns to their TUnit equivalents.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateFromXUnitAttributes
- Migrate xUnit attributes to TUnit
- Replace xUnit test attributes ([Fact], [Theory], [InlineData], etc.) with their TUnit equivalents.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateXUnitAssertions
- Migrate xUnit assertions to TUnit
- Replace xUnit
Assert.*calls with TUnit's fluentawait Assert.That(...).Is*()assertions. Note: test methods may need to be changed toasync Taskseparately.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateXUnitDependencies
- Migrate xUnit NuGet dependencies to TUnit
- Remove xUnit NuGet package references, add TUnit, and upgrade the target framework to at least .NET 9.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TestOutputHelperToTestContext
- Find
ITestOutputHelperneeding TUnit migration - Find usages of xUnit's
ITestOutputHelperthat should be replaced with TUnit'sTestContext.
- Find
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TheoryToTest
- Replace
[Theory]with[Test] - Replace the xUnit
[Theory]attribute with the TUnit[Test]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TraitCategoryToCategory
- Replace
[Trait("Category", ...)]with[Category] - Replace xUnit
[Trait("Category", "X")]with TUnit's dedicated[Category("X")]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TraitToProperty
- Replace
[Trait]with[Property] - Replace the xUnit
[Trait]attribute with the TUnit[Property]attribute.
- Replace
- com.oracle.weblogic.rewrite.JakartaEE9_1
- Migrate to Jakarta EE 9.1
- These recipes help with Migration to Jakarta EE 9.1, flagging and updating deprecated methods.
- com.oracle.weblogic.rewrite.jakarta.JakartaEeNamespaces9_1
- Migrate from JavaX to Jakarta EE 9.1 Namespaces
- These recipes help with Migration From JavaX to Jakarta EE 9.1 Namespaces.
- io.moderne.elastic.elastic9.ChangeApiNumericFieldTypes
- Change numeric field types for Elasticsearch 9
- Handles changes between different numeric types (
LongtoInteger,inttoLong...) in Elasticsearch 9 API responses by adding appropriate conversion methods with null checks.
- io.moderne.elastic.elastic9.MigrateDenseVectorElementType
- Migrate DenseVectorProperty.elementType from String to DenseVectorElementType enum
- In Elasticsearch 9,
DenseVectorProperty.elementType()returnsDenseVectorElementTypeenum instead ofString, and the builder methodelementType(String)now accepts the enum type. This recipe handles both builder calls and getter calls.
- io.moderne.elastic.elastic9.MigrateDenseVectorSimilarity
- Migrate DenseVectorProperty.similarity from String to DenseVectorSimilarity enum
- In Elasticsearch 9,
DenseVectorProperty.similarity()returnsDenseVectorSimilarityenum instead ofString, and the builder methodsimilarity(String)now accepts the enum type. This recipe handles both builder calls and getter calls.
- io.moderne.elastic.elastic9.MigrateMatchedQueries
- Migrate
matchedQueriesfrom List to Map - In Elasticsearch Java Client 9.0,
Hit.matchedQueries()changed from returningList<String>toMap<String, Double>. This recipe migrates the usage by adding.keySet()for iterations and usingnew ArrayList<>(result.keySet())for assignments.
- Migrate
- io.moderne.elastic.elastic9.MigrateSpanTermQueryValue
- Migrate
SpanTermQuery.value()from String to FieldValue - In Elasticsearch 9,
SpanTermQuery.value()returns aFieldValueinstead ofString. This recipe updates calls to handle the new return type by checking if it's a string and extracting the string value.
- Migrate
- io.moderne.elastic.elastic9.MigrateToElasticsearch9
- Migrate from Elasticsearch 8 to 9
- This recipe performs a comprehensive migration from Elasticsearch 8 to Elasticsearch 9, addressing breaking changes, API removals, deprecations, and required code modifications.
- io.moderne.elastic.elastic9.RenameApiField
- Rename
Elasticsearch valueBody()methods - In Elasticsearch Java Client 9.0, the generic
valueBody()method andvalueBody(...)builder methods have been replaced with specific getter and setter methods that better reflect the type of data being returned. Similarly, forGetRepositoryResponse, theresultfield also got altered torepositories.
- Rename
- io.moderne.elastic.elastic9.RenameApiFields
- Rename API fields for Elasticsearch 9
- Renames various API response fields from
valueBodyto align with Elasticsearch 9 specifications.
- org.openrewrite.java.spring.opentelemetry.MigrateBraveToOpenTelemetry
- Migrate Brave API to OpenTelemetry API
- Migrate Java code using Brave (Zipkin) tracing API to OpenTelemetry API. This recipe handles the migration of Brave Tracer, Span, and related classes to OpenTelemetry equivalents.
- org.openrewrite.java.spring.opentelemetry.MigrateDatadogToOpenTelemetry
- Migrate Datadog tracing to OpenTelemetry
- Migrate from Datadog Java tracing annotations to OpenTelemetry annotations. Replace Datadog @Trace annotations with @WithSpan annotations.
- org.openrewrite.java.spring.opentelemetry.MigrateFromZipkinToOpenTelemetry
- Migrate from Zipkin to OpenTelemetry OTLP
- Migrate from Zipkin tracing to OpenTelemetry OTLP. This recipe replaces Zipkin dependencies with OpenTelemetry OTLP exporter and updates the related configuration properties.
- org.openrewrite.java.spring.opentelemetry.MigrateNewRelicToOpenTelemetry
- Migrate New Relic Agent to OpenTelemetry
- Migrate from New Relic Java Agent annotations to OpenTelemetry annotations. Replace @Trace annotations with @WithSpan annotations.
- org.openrewrite.java.spring.opentelemetry.MigrateOpenTracingToOpenTelemetry
- Migrate OpenTracing API to OpenTelemetry API
- Migrate Java code using OpenTracing API to OpenTelemetry API. OpenTracing has been superseded by OpenTelemetry and is no longer actively maintained.
- org.openrewrite.java.spring.opentelemetry.MigrateSleuthToOpenTelemetry
- Migrate from Spring Cloud Sleuth to OpenTelemetry
- Migrate from Spring Cloud Sleuth to OpenTelemetry. Spring Cloud Sleuth has been deprecated and is replaced by Micrometer Tracing with OpenTelemetry as a backend. This recipe removes Sleuth dependencies and adds OpenTelemetry instrumentation.
- org.openrewrite.java.spring.opentelemetry.MigrateToOpenTelemetry
- Complete migration to OpenTelemetry
- Comprehensive migration to OpenTelemetry including dependencies, configuration properties, and Java code changes. This recipe handles migration from Spring Cloud Sleuth, Brave/Zipkin, and OpenTracing to OpenTelemetry.
- org.openrewrite.python.migrate.FindAifcModule
- Find deprecated
aifcmodule usage - The
aifcmodule was deprecated in Python 3.11 and removed in Python 3.13. Use third-party audio libraries instead.
- Find deprecated
- org.openrewrite.python.migrate.FindAudioopModule
- Find deprecated
audioopmodule usage - The
audioopmodule was deprecated in Python 3.11 and removed in Python 3.13. Use pydub, numpy, or scipy for audio operations.
- Find deprecated
- org.openrewrite.python.migrate.FindCgiModule
- Find deprecated
cgimodule usage - The
cgimodule was deprecated in Python 3.11 and removed in Python 3.13. Useurllib.parsefor query string parsing,html.escape()for escaping, and web frameworks oremail.messagefor form handling.
- Find deprecated
- org.openrewrite.python.migrate.FindCgitbModule
- Find deprecated
cgitbmodule usage - The
cgitbmodule was deprecated in Python 3.11 and removed in Python 3.13. Use the standardloggingandtracebackmodules for error handling.
- Find deprecated
- org.openrewrite.python.migrate.FindChunkModule
- Find deprecated
chunkmodule usage - The
chunkmodule was deprecated in Python 3.11 and removed in Python 3.13. Implement IFF chunk reading manually or use specialized libraries.
- Find deprecated
- org.openrewrite.python.migrate.FindCryptModule
- Find deprecated
cryptmodule usage - The
cryptmodule was deprecated in Python 3.11 and removed in Python 3.13. Usebcrypt,argon2-cffi, orpasslibinstead.
- Find deprecated
- org.openrewrite.python.migrate.FindImghdrModule
- Find deprecated
imghdrmodule usage - The
imghdrmodule was deprecated in Python 3.11 and removed in Python 3.13. Usefiletype,python-magic, orPillowinstead.
- Find deprecated
- org.openrewrite.python.migrate.FindImpUsage
- Find deprecated imp module usage
- Find imports of the deprecated
impmodule which was removed in Python 3.12. Migrate toimportlib.
- org.openrewrite.python.migrate.FindLocaleGetdefaultlocale
- Find deprecated
locale.getdefaultlocale()usage locale.getdefaultlocale()was deprecated in Python 3.11. Uselocale.setlocale(),locale.getlocale(), orlocale.getpreferredencoding(False)instead.
- Find deprecated
- org.openrewrite.python.migrate.FindMacpathModule
- Find removed
macpathmodule usage - The
macpathmodule was removed in Python 3.8. Useos.pathinstead.
- Find removed
- org.openrewrite.python.migrate.FindMailcapModule
- Find deprecated
mailcapmodule usage - The
mailcapmodule was deprecated in Python 3.11 and removed in Python 3.13. Usemimetypesmodule for MIME type handling.
- Find deprecated
- org.openrewrite.python.migrate.FindMsilibModule
- Find deprecated
msilibmodule usage - The
msilibmodule was deprecated in Python 3.11 and removed in Python 3.13. Use platform-specific tools for MSI creation.
- Find deprecated
- org.openrewrite.python.migrate.FindNisModule
- Find deprecated
nismodule usage - The
nismodule was deprecated in Python 3.11 and removed in Python 3.13. There is no direct replacement.
- Find deprecated
- org.openrewrite.python.migrate.FindNntplibModule
- Find deprecated
nntplibmodule usage - The
nntplibmodule was deprecated in Python 3.11 and removed in Python 3.13. NNTP is largely obsolete; consider alternatives if needed.
- Find deprecated
- org.openrewrite.python.migrate.FindOsPopen
- Find deprecated
os.popen()usage os.popen()has been deprecated since Python 3.6. Usesubprocess.run()orsubprocess.Popen()instead for better control over process creation and output handling.
- Find deprecated
- org.openrewrite.python.migrate.FindOsSpawn
- Find deprecated
os.spawn*()usage - The
os.spawn*()family of functions are deprecated. Usesubprocess.run()orsubprocess.Popen()instead.
- Find deprecated
- org.openrewrite.python.migrate.FindOssaudiodevModule
- Find deprecated
ossaudiodevmodule usage - The
ossaudiodevmodule was deprecated in Python 3.11 and removed in Python 3.13. There is no direct replacement.
- Find deprecated
- org.openrewrite.python.migrate.FindPathlibLinkTo
- Find deprecated
Path.link_to()usage - Find usage of
Path.link_to()which was deprecated in Python 3.10 and removed in 3.12. Usehardlink_to()instead (note: argument order is reversed).
- Find deprecated
- org.openrewrite.python.migrate.FindPipesModule
- Find deprecated
pipesmodule usage - The
pipesmodule was deprecated in Python 3.11 and removed in Python 3.13. Use subprocess with shlex.quote() for shell escaping.
- Find deprecated
- org.openrewrite.python.migrate.FindShutilRmtreeOnerror
- Find deprecated
shutil.rmtree(onerror=...)parameter - The
onerrorparameter ofshutil.rmtree()was deprecated in Python 3.12 in favor ofonexc. Theonexccallback receives the exception object directly rather than an exc_info tuple.
- Find deprecated
- org.openrewrite.python.migrate.FindSndhdrModule
- Find deprecated
sndhdrmodule usage - The
sndhdrmodule was deprecated in Python 3.11 and removed in Python 3.13. Usefiletypeor audio libraries likepydubinstead.
- Find deprecated
- org.openrewrite.python.migrate.FindSpwdModule
- Find deprecated
spwdmodule usage - The
spwdmodule was deprecated in Python 3.11 and removed in Python 3.13. There is no direct replacement.
- Find deprecated
- org.openrewrite.python.migrate.FindSunauModule
- Find deprecated
sunaumodule usage - The
sunaumodule was deprecated in Python 3.11 and removed in Python 3.13. Usesoundfileorpydubinstead.
- Find deprecated
- org.openrewrite.python.migrate.FindSysCoroutineWrapper
- Find removed
sys.set_coroutine_wrapper()/sys.get_coroutine_wrapper() sys.set_coroutine_wrapper()andsys.get_coroutine_wrapper()were deprecated in Python 3.7 and removed in Python 3.8.
- Find removed
- org.openrewrite.python.migrate.FindTelnetlibModule
- Find deprecated
telnetlibmodule usage - The
telnetlibmodule was deprecated in Python 3.11 and removed in Python 3.13. Consider usingtelnetlib3from PyPI, direct socket usage, or SSH-based alternatives like paramiko.
- Find deprecated
- org.openrewrite.python.migrate.FindTempfileMktemp
- Find deprecated
tempfile.mktemp()usage - Find usage of
tempfile.mktemp()which is deprecated due to security concerns (race condition). Usemkstemp()orNamedTemporaryFile()instead.
- Find deprecated
- org.openrewrite.python.migrate.FindUrllibParseSplitFunctions
- Find deprecated urllib.parse split functions
- Find usage of deprecated urllib.parse split functions (splithost, splitport, etc.) removed in Python 3.14. Use urlparse() instead.
- org.openrewrite.python.migrate.FindUrllibParseToBytes
- Find deprecated
urllib.parse.to_bytes()usage - Find usage of
urllib.parse.to_bytes()which was deprecated in Python 3.8 and removed in 3.14. Use str.encode() directly.
- Find deprecated
- org.openrewrite.python.migrate.FindUuModule
- Find deprecated
uumodule usage - The
uumodule was deprecated in Python 3.11 and removed in Python 3.13. Usebase64module instead for encoding binary data.
- Find deprecated
- org.openrewrite.python.migrate.FindXdrlibModule
- Find deprecated
xdrlibmodule usage - The
xdrlibmodule was deprecated in Python 3.11 and removed in Python 3.13. Usestructmodule for binary packing/unpacking.
- Find deprecated
- org.openrewrite.python.migrate.RemoveFutureImports
- Remove obsolete
__future__imports - Remove
from __future__ import ...statements for features that are enabled by default in Python 3.
- Remove obsolete
- org.openrewrite.python.migrate.ReplaceArrayFromstring
- Replace
array.fromstring()witharray.frombytes() - Replace
fromstring()withfrombytes()on array objects. The fromstring() method was deprecated in Python 3.2 and removed in 3.14.
- Replace
- org.openrewrite.python.migrate.ReplaceArrayTostring
- Replace
array.tostring()witharray.tobytes() - Replace
tostring()withtobytes()on array objects. The tostring() method was deprecated in Python 3.2 and removed in 3.14.
- Replace
- org.openrewrite.python.migrate.ReplaceCgiParseQs
- Replace
cgi.parse_qs()withurllib.parse.parse_qs() cgi.parse_qs()was removed in Python 3.8. Useurllib.parse.parse_qs()instead. Note: this rewrites call sites but does not manage imports. Use withChangeImportin a composite recipe to updatefromimports.
- Replace
- org.openrewrite.python.migrate.ReplaceCgiParseQsl
- Replace
cgi.parse_qsl()withurllib.parse.parse_qsl() cgi.parse_qsl()was removed in Python 3.8. Useurllib.parse.parse_qsl()instead. Note: this rewrites call sites but does not manage imports. Use withChangeImportin a composite recipe to updatefromimports.
- Replace
- org.openrewrite.python.migrate.ReplaceCollectionsAbcImports
- Replace
collectionsABC imports withcollections.abc - Migrate deprecated abstract base class imports from
collectionstocollections.abc. These imports were deprecated in Python 3.3 and removed in Python 3.10.
- Replace
- org.openrewrite.python.migrate.ReplaceConditionNotifyAll
- Replace
Condition.notifyAll()withCondition.notify_all() - Replace
notifyAll()method calls withnotify_all(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceElementGetchildren
- Replace
Element.getchildren()withlist(element) - Replace
getchildren()withlist(element)on XML Element objects. Deprecated in Python 3.9.
- Replace
- org.openrewrite.python.migrate.ReplaceElementGetiterator
- Replace
Element.getiterator()withElement.iter() - Replace
getiterator()withiter()on XML Element objects. The getiterator() method was deprecated in Python 3.9.
- Replace
- org.openrewrite.python.migrate.ReplaceEventIsSet
- Replace
Event.isSet()withEvent.is_set() - Replace
isSet()method calls withis_set(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceHtmlParserUnescape
- Replace
HTMLParser.unescape()withhtml.unescape() HTMLParser.unescape()was removed in Python 3.9. Usehtml.unescape()instead.
- Replace
- org.openrewrite.python.migrate.ReplacePercentFormatWithFString
- Replace
%formatting with f-string - Replace
"..." % (...)expressions with f-strings (Python 3.6+). Only converts%sand%rspecifiers where the format string is a literal and the conversion is safe.
- Replace
- org.openrewrite.python.migrate.ReplacePlatformPopen
- Replace
platform.popen()withsubprocess.check_output() platform.popen()was removed in Python 3.8. Usesubprocess.check_output(cmd, shell=True)instead. Note: this rewrites call sites but does not manage imports.
- Replace
- org.openrewrite.python.migrate.ReplaceReTemplate
- Replace
re.template()withre.compile()and flagre.TEMPLATE/re.T re.template()was deprecated in Python 3.11 and removed in 3.13. Calls are auto-replaced withre.compile().re.TEMPLATE/re.Tflags have no direct replacement and are flagged for manual review.
- Replace
- org.openrewrite.python.migrate.ReplaceStrFormatWithFString
- Replace
str.format()with f-string - Replace
"...".format(...)calls with f-strings (Python 3.6+). Only converts cases where the format string is a literal and the conversion is safe.
- Replace
- org.openrewrite.python.migrate.ReplaceSysLastExcInfo
- Replace
sys.last_valuewithsys.last_excand flagsys.last_type/sys.last_traceback sys.last_type,sys.last_value, andsys.last_tracebackwere deprecated in Python 3.12.sys.last_valueis auto-replaced withsys.last_exc;sys.last_typeandsys.last_tracebackare flagged for manual review.
- Replace
- org.openrewrite.python.migrate.ReplaceTarfileFilemode
- Replace
tarfile.filemodewithstat.filemode tarfile.filemodewas removed in Python 3.8. Usestat.filemode()instead.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadGetName
- Replace
Thread.getName()withThread.name - Replace
getName()method calls with thenameproperty. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadIsAlive
- Replace
Thread.isAlive()withThread.is_alive() - Replace
isAlive()method calls withis_alive(). Deprecated in Python 3.1 and removed in 3.9.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadIsDaemon
- Replace
Thread.isDaemon()withThread.daemon - Replace
isDaemon()method calls with thedaemonproperty. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadSetDaemon
- Replace
Thread.setDaemon()withThread.daemon = ... - Replace
setDaemon()method calls withdaemonproperty assignment. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadSetName
- Replace
Thread.setName()withThread.name = ... - Replace
setName()method calls withnameproperty assignment. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadingActiveCount
- Replace
threading.activeCount()withthreading.active_count() - Replace
threading.activeCount()withthreading.active_count(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadingCurrentThread
- Replace
threading.currentThread()withthreading.current_thread() - Replace
threading.currentThread()withthreading.current_thread(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceTypingOptionalWithUnion
- Replace
typing.Optional[X]withX | None - PEP 604 introduced the
|operator for union types in Python 3.10. ReplaceOptional[X]with the more conciseX | Nonesyntax.
- Replace
- org.openrewrite.python.migrate.ReplaceTypingUnionWithPipe
- Replace
typing.Union[X, Y]withX | Y - PEP 604 introduced the
|operator for union types in Python 3.10. ReplaceUnion[X, Y, ...]with the more conciseX | Y | ...syntax.
- Replace
- org.openrewrite.python.migrate.UpgradeToPython310
- Upgrade to Python 3.10
- Migrate deprecated APIs and adopt new syntax for Python 3.10 compatibility. This includes adopting PEP 604 union type syntax (
X | Y) and other modernizations between Python 3.9 and 3.10.
- org.openrewrite.python.migrate.UpgradeToPython311
- Upgrade to Python 3.11
- Migrate deprecated and removed APIs for Python 3.11 compatibility. This includes handling removed modules, deprecated functions, and API changes between Python 3.10 and 3.11.
- org.openrewrite.python.migrate.UpgradeToPython312
- Upgrade to Python 3.12
- Migrate deprecated and removed APIs for Python 3.12 compatibility. This includes detecting usage of the removed
impmodule and other legacy modules that were removed in Python 3.12.
- org.openrewrite.python.migrate.UpgradeToPython313
- Upgrade to Python 3.13
- Migrate deprecated and removed APIs for Python 3.13 compatibility. This includes detecting usage of modules removed in PEP 594 ('dead batteries') and other API changes between Python 3.12 and 3.13.
- org.openrewrite.python.migrate.UpgradeToPython314
- Upgrade to Python 3.14
- Migrate deprecated and removed APIs for Python 3.14 compatibility. This includes replacing deprecated AST node types with
ast.Constantand other API changes between Python 3.13 and 3.14.
- org.openrewrite.python.migrate.UpgradeToPython38
- Upgrade to Python 3.8
- Migrate deprecated APIs and detect legacy patterns for Python 3.8 compatibility.
- org.openrewrite.python.migrate.UpgradeToPython39
- Upgrade to Python 3.9
- Migrate deprecated APIs for Python 3.9 compatibility. This includes PEP 585 built-in generics, removed base64 functions, and deprecated XML Element methods.
- org.openrewrite.python.migrate.langchain.FindDeprecatedLangchainAgents
- Find deprecated LangChain agent patterns
- Find usage of deprecated LangChain agent patterns including
initialize_agent,AgentExecutor, andLLMChain. These were deprecated in LangChain v0.2 and removed in v1.0.
- org.openrewrite.python.migrate.langchain.FindLangchainCreateReactAgent
- Find
create_react_agentusage (replace withcreate_agent) - Find
from langgraph.prebuilt import create_react_agentwhich should be replaced withfrom langchain.agents import create_agentin LangChain v1.0.
- Find
- org.openrewrite.python.migrate.langchain.ReplaceLangchainClassicImports
- Replace
langchainlegacy imports withlangchain_classic - Migrate legacy chain, retriever, and indexing imports from
langchaintolangchain_classic. These were moved in LangChain v1.0.
- Replace
- org.openrewrite.python.migrate.langchain.ReplaceLangchainCommunityImports
- Replace
langchainimports withlangchain_community - Migrate third-party integration imports from
langchaintolangchain_community. These integrations were moved in LangChain v0.2.
- Replace
- org.openrewrite.python.migrate.langchain.ReplaceLangchainProviderImports
- Replace
langchain_communityimports with provider packages - Migrate provider-specific imports from
langchain_communityto dedicated provider packages likelangchain_openai,langchain_anthropic, etc.
- Replace
- org.openrewrite.python.migrate.langchain.UpgradeToLangChain02
- Upgrade to LangChain 0.2
- Migrate to LangChain 0.2 by updating imports from
langchaintolangchain_communityand provider-specific packages.
- org.openrewrite.python.migrate.langchain.UpgradeToLangChain1
- Upgrade to LangChain 1.0
- Migrate to LangChain 1.0 by applying all v0.2 migrations and then moving legacy functionality to
langchain_classic.
- org.openrewrite.quarkus.spring.ConfigureNativeBuild
- Configure Quarkus Native Build Support
- Adds configuration and dependencies required for Quarkus native image compilation with GraalVM. Includes native profile configuration and reflection hints where needed.
- org.openrewrite.quarkus.spring.CustomizeQuarkusPluginGoals
- Customize Quarkus Maven Plugin Goals
- Allows customization of Quarkus Maven plugin goals. Adds or modifies the executions and goals for the quarkus-maven-plugin.
- org.openrewrite.quarkus.spring.CustomizeQuarkusVersion
- Customize Quarkus BOM Version
- Allows customization of the Quarkus BOM version used in the migration. By default uses 3.x (latest 3.x version), but can be configured to use a specific version.
- org.openrewrite.quarkus.spring.EnableAnnotationsToQuarkusDependencies
- Migrate
@EnableXyzannotations to Quarkus extensions - Removes Spring
@EnableXyzannotations and adds the corresponding Quarkus extensions as dependencies.
- Migrate
- org.openrewrite.quarkus.spring.MigrateBootStarters
- Replace Spring Boot starter dependencies with Quarkus equivalents
- Migrates Spring Boot starter dependencies to their Quarkus equivalents, removing version tags as Quarkus manages versions through its BOM.
- org.openrewrite.quarkus.spring.MigrateConfigurationProperties
- Migrate @ConfigurationProperties to Quarkus @ConfigMapping
- Migrates Spring Boot @ConfigurationProperties to Quarkus @ConfigMapping. This recipe converts configuration property classes to the native Quarkus pattern.
- org.openrewrite.quarkus.spring.MigrateEntitiesToPanache
- Migrate JPA Entities to Panache Entities
- Converts standard JPA entities to Quarkus Panache entities using the Active Record pattern. Entities will extend PanacheEntity and gain built-in CRUD operations.
- org.openrewrite.quarkus.spring.MigrateMavenPlugin
- Add or replace Spring Boot build plugin with Quarkus build plugin
- Remove Spring Boot Maven plugin if present and add Quarkus Maven plugin using the same version as the quarkus-bom.
- org.openrewrite.quarkus.spring.MigrateRequestParameterEdgeCases
- Migrate Additional Spring Web Parameter Annotations
- Migrates additional Spring Web parameter annotations not covered by the main WebToJaxRs recipe. Includes @MatrixVariable, @CookieValue, and other edge cases.
- org.openrewrite.quarkus.spring.MigrateSpringActuator
- Migrate Spring Boot Actuator to Quarkus Health and Metrics
- Migrates Spring Boot Actuator to Quarkus SmallRye Health and Metrics extensions. Converts HealthIndicator implementations to Quarkus HealthCheck pattern.
- org.openrewrite.quarkus.spring.MigrateSpringBootDevTools
- Remove Spring Boot DevTools
- Removes Spring Boot DevTools dependency and configuration. Quarkus has built-in dev mode with hot reload that replaces DevTools functionality.
- org.openrewrite.quarkus.spring.MigrateSpringCloudConfig
- Migrate Spring Cloud Config Client to Quarkus Config
- Migrates Spring Cloud Config Client to Quarkus configuration sources. Converts bootstrap.yml/properties patterns to Quarkus config.
- org.openrewrite.quarkus.spring.MigrateSpringCloudServiceDiscovery
- Migrate Spring Cloud Service Discovery to Quarkus
- Migrates Spring Cloud Service Discovery annotations and configurations to Quarkus equivalents. Converts @EnableDiscoveryClient and related patterns to Quarkus Stork service discovery.
- org.openrewrite.quarkus.spring.MigrateSpringDataMongodb
- Migrate Spring Data MongoDB to Quarkus Panache MongoDB
- Migrates Spring Data MongoDB repositories to Quarkus MongoDB with Panache. Converts MongoRepository interfaces to PanacheMongoRepository pattern.
- org.openrewrite.quarkus.spring.MigrateSpringEvents
- Migrate Spring Events to CDI Events
- Migrates Spring's event mechanism to CDI events. Converts ApplicationEventPublisher to CDI Event and @EventListener to @Observes.
- org.openrewrite.quarkus.spring.MigrateSpringTesting
- Migrate Spring Boot Testing to Quarkus Testing
- Migrates Spring Boot test annotations and utilities to Quarkus test equivalents. Converts @SpringBootTest to @QuarkusTest, @MockBean to @InjectMock, etc.
- org.openrewrite.quarkus.spring.MigrateSpringTransactional
- Migrate Spring @Transactional to Jakarta @Transactional
- Migrates Spring's @Transactional annotation to Jakarta's @Transactional. Maps propagation attributes to TxType and removes Spring-specific attributes.
- org.openrewrite.quarkus.spring.MigrateSpringValidation
- Migrate Spring Validation to Quarkus
- Migrates Spring Boot validation to Quarkus Hibernate Validator. Adds the quarkus-hibernate-validator dependency and handles validation annotation imports.
- org.openrewrite.quarkus.spring.SpringBootToQuarkus
- Migrate Spring Boot to Quarkus
- Replace Spring Boot with Quarkus.
- org.openrewrite.sql.MigrateOracleToPostgres
- Migrate Oracle SQL to PostgreSQL
- Converts Oracle-specific SQL syntax and functions to PostgreSQL equivalents.
- org.openrewrite.sql.MigrateSqlServerToPostgres
- Migrate SQL Server to PostgreSQL
- Converts Microsoft SQL Server-specific SQL syntax and functions to PostgreSQL equivalents.
- org.openrewrite.tapestry.MigrateTapestry4To5
- Migrate Tapestry 4 to Tapestry 5
- Migrates Apache Tapestry 4 applications to Tapestry 5. This includes package renames, removing base class inheritance, converting listener interfaces to annotations, and updating dependencies.
mockito
7 recipes
- org.openrewrite.java.testing.junit5.UseMockitoExtension
- Use Mockito JUnit Jupiter extension
- Migrate uses of
@RunWith(MockitoJUnitRunner.class)(and similar annotations) to@ExtendWith(MockitoExtension.class).
- org.openrewrite.java.testing.mockito.Mockito1to3Migration
- Mockito 3.x migration from 1.x
- Upgrade Mockito from 1.x to 3.x.
- org.openrewrite.java.testing.mockito.Mockito1to4Migration
- Mockito 4.x upgrade
- Upgrade Mockito from 1.x to 4.x.
- org.openrewrite.java.testing.mockito.Mockito1to5Migration
- Mockito 5.x upgrade
- Upgrade Mockito from 1.x to 5.x.
- org.openrewrite.java.testing.mockito.Mockito4to5Only
- Mockito 4 to 5.x upgrade only
- Upgrade Mockito from 4.x to 5.x. Does not include 1.x to 4.x migration.
- org.openrewrite.java.testing.mockito.MockitoBestPractices
- Mockito best practices
- Applies best practices for Mockito tests.
- org.openrewrite.java.testing.mockito.ReplacePowerMockito
- Replace PowerMock with raw Mockito
- PowerMockito with raw Mockito; best executed as part of a Mockito upgrade.
modernization
29 recipes
- OpenRewrite.Recipes.Net6.UseEnvironmentCurrentManagedThreadId
- Use Environment.CurrentManagedThreadId
- Replace
Thread.CurrentThread.ManagedThreadIdwithEnvironment.CurrentManagedThreadId(CA1840). Available since .NET 6.
- OpenRewrite.Recipes.Net6.UseEnvironmentProcessId
- Use Environment.ProcessId
- Replace
Process.GetCurrentProcess().IdwithEnvironment.ProcessId(CA1837). Available since .NET 6.
- OpenRewrite.Recipes.Net6.UseEnvironmentProcessPath
- Use Environment.ProcessPath
- Replace
Process.GetCurrentProcess().MainModule.FileNamewithEnvironment.ProcessPath(CA1839). Available since .NET 6.
- OpenRewrite.Recipes.Net6.UseLinqDistinctBy
- Use LINQ DistinctBy()
- Replace
collection.GroupBy(selector).Select(g => g.First())withcollection.DistinctBy(selector). Available since .NET 6.
- OpenRewrite.Recipes.Net6.UseLinqMaxMinBy
- Use LINQ MaxBy() and MinBy()
- Replace
collection.OrderByDescending(selector).First()withcollection.MaxBy(selector)andcollection.OrderBy(selector).First()withcollection.MinBy(selector). Also handles.Last()variants (OrderBy().Last() → MaxBy, OrderByDescending().Last() → MinBy). Note: MinBy/MaxBy return default for empty reference-type sequences instead of throwing. Available since .NET 6.
- OpenRewrite.Recipes.Net6.UseRandomShared
- Use Random.Shared
- Replace
new Random().Method(...)withRandom.Shared.Method(...). Available since .NET 6.
- OpenRewrite.Recipes.Net6.UseStringContainsChar
- Use string.Contains(char) overload
- Finds calls to
string.Contains("x")with a single-character string literal that could use thestring.Contains('x')overload for better performance.
- OpenRewrite.Recipes.Net6.UseStringStartsEndsWithChar
- Use string.StartsWith(char)/EndsWith(char) overload
- Finds calls to
string.StartsWith("x")andstring.EndsWith("x")with a single-character string literal that could use the char overload for better performance.
- OpenRewrite.Recipes.Net6.UseThrowIfNull
- Use ArgumentNullException.ThrowIfNull()
- Replace
if (x == null) throw new ArgumentNullException(nameof(x))guard clauses withArgumentNullException.ThrowIfNull(x)(CA1510). Handles== null,is null, reversednull ==, string literal param names, and braced then-blocks. Available since .NET 6.
- OpenRewrite.Recipes.Net7.UseLinqOrder
- Use LINQ Order() and OrderDescending()
- Replace
collection.OrderBy(x => x)withcollection.Order()andcollection.OrderByDescending(x => x)withcollection.OrderDescending(). Available since .NET 7.
- OpenRewrite.Recipes.Net7.UseThrowIfNegative
- Use ArgumentOutOfRangeException.ThrowIfNegative()
- Replace
if (value < 0) throw new ArgumentOutOfRangeException(nameof(value))guard clauses withArgumentOutOfRangeException.ThrowIfNegative(value). Also handles reversed0 > value. Available since .NET 7.
- OpenRewrite.Recipes.Net7.UseThrowIfNegativeOrZero
- Use ArgumentOutOfRangeException.ThrowIfNegativeOrZero()
- Replace
if (value <= 0) throw new ArgumentOutOfRangeException(nameof(value))guard clauses withArgumentOutOfRangeException.ThrowIfNegativeOrZero(value). Also handles reversed0 >= value. Available since .NET 7.
- OpenRewrite.Recipes.Net7.UseThrowIfNullOrEmpty
- Use ArgumentException.ThrowIfNullOrEmpty()
- Replace
if (string.IsNullOrEmpty(s)) throw new ArgumentException("...", nameof(s))guard clauses withArgumentException.ThrowIfNullOrEmpty(s). Available since .NET 7.
- OpenRewrite.Recipes.Net8.FindFrozenCollection
- Find ToImmutable() that could use Frozen collections*
- Finds usages of
ToImmutableDictionary()andToImmutableHashSet(). In .NET 8+,ToFrozenDictionary()andToFrozenSet()provide better read performance.
- OpenRewrite.Recipes.Net8.FindTimeAbstraction
- Find DateTime.Now/UtcNow usage (TimeProvider in .NET 8)
- Finds usages of
DateTime.Now,DateTime.UtcNow,DateTimeOffset.Now, andDateTimeOffset.UtcNow. In .NET 8+,TimeProvideris the recommended abstraction for time.
- OpenRewrite.Recipes.Net8.UseThrowIfGreaterThan
- Use ArgumentOutOfRangeException.ThrowIfGreaterThan()
- Replace
if (value > other) throw new ArgumentOutOfRangeException(nameof(value))guard clauses withArgumentOutOfRangeException.ThrowIfGreaterThan(value, other). Also handles reversedother < valueand>=/ThrowIfGreaterThanOrEqual. Available since .NET 8.
- OpenRewrite.Recipes.Net8.UseThrowIfLessThan
- Use ArgumentOutOfRangeException.ThrowIfLessThan()
- Replace
if (value < other) throw new ArgumentOutOfRangeException(nameof(value))guard clauses withArgumentOutOfRangeException.ThrowIfLessThan(value, other). Also handles reversedother > valueand<=/ThrowIfLessThanOrEqual. Available since .NET 8.
- OpenRewrite.Recipes.Net8.UseThrowIfNullOrWhiteSpace
- Use ArgumentException.ThrowIfNullOrWhiteSpace()
- Replace
if (string.IsNullOrWhiteSpace(s)) throw new ArgumentException("...", nameof(s))guard clauses withArgumentException.ThrowIfNullOrWhiteSpace(s). Available since .NET 8.
- OpenRewrite.Recipes.Net8.UseThrowIfZero
- Use ArgumentOutOfRangeException.ThrowIfZero()
- Replace
if (value == 0) throw new ArgumentOutOfRangeException(nameof(value))guard clauses withArgumentOutOfRangeException.ThrowIfZero(value). Also handles reversed0 == value. Available since .NET 8.
- OpenRewrite.Recipes.Net8.UseTimeProvider
- Use TimeProvider instead of DateTime/DateTimeOffset static properties
- Replace
DateTime.UtcNow,DateTime.Now,DateTimeOffset.UtcNow, andDateTimeOffset.NowwithTimeProvider.System.GetUtcNow()/GetLocalNow()equivalents. TimeProvider enables testability and consistent time sources. Available since .NET 8.
- OpenRewrite.Recipes.Net9.RemoveConfigureAwaitFalse
- Remove ConfigureAwait(false)
- Remove
.ConfigureAwait(false)calls that are unnecessary in ASP.NET Core and modern .NET applications (no SynchronizationContext). Do not apply to library code targeting .NET Framework.
- OpenRewrite.Recipes.Net9.UseEscapeSequenceE
- Use \e escape sequence
- Replace
\u001band\x1bescape sequences with\e. C# 13 introduced\eas a dedicated escape sequence for the escape character (U+001B).
- OpenRewrite.Recipes.Net9.UseFrozenCollections
- Use Frozen collections instead of Immutable
- Replace
ToImmutableDictionary()withToFrozenDictionary()andToImmutableHashSet()withToFrozenSet(). Frozen collections (.NET 8+) provide better read performance for collections populated once and read many times.
- OpenRewrite.Recipes.Net9.UseGuidCreateVersion7
- Use Guid.CreateVersion7()
- Replace
Guid.NewGuid()withGuid.CreateVersion7(). Version 7 GUIDs are time-ordered and better for database primary keys, indexing, and sorting. Available since .NET 9.
- OpenRewrite.Recipes.Net9.UseLinqAggregateBy
- Use LINQ AggregateBy()
- Replace
collection.GroupBy(keySelector).ToDictionary(g => g.Key, g => g.Aggregate(seed, func))withcollection.AggregateBy(keySelector, seed, func).ToDictionary(). Available since .NET 9.
- OpenRewrite.Recipes.Net9.UseLinqCountBy
- Use LINQ CountBy()
- Replace
collection.GroupBy(selector).Select(g => g.Count())withcollection.CountBy(selector). Available since .NET 9.
- OpenRewrite.Recipes.Net9.UseLinqIndex
- Use LINQ Index()
- Replace
collection.Select((item, index) => (index, item))withcollection.Index(). Available since .NET 9.
- OpenRewrite.Recipes.Net9.UseLockObject
- Use System.Threading.Lock for lock fields
- Replace
objectfields initialized withnew object()withSystem.Threading.Lockinitialized withnew(). The Lock type provides better performance with the lock statement. Available since .NET 9.
- OpenRewrite.Recipes.Net9.UseTaskCompletedTask
- Use Task.CompletedTask
- Replace
Task.FromResult(0),Task.FromResult(true), andTask.FromResult(false)withTask.CompletedTaskwhen the return type isTask(notTask<T>).
mongodb
3 recipes
- io.moderne.java.spring.boot4.AddMongoDbRepresentationProperties
- Add MongoDB representation properties for UUID and BigDecimal
- Adds the 'spring.mongodb.representation.uuid' property with value 'standard' and the 'spring.data.mongodb.representation.big-decimal' property with the value 'decimal128' to Spring configuration files when a MongoDB dependency is detected.
- org.openrewrite.quarkus.spring.MigrateSpringDataMongodb
- Migrate Spring Data MongoDB to Quarkus Panache MongoDB
- Migrates Spring Data MongoDB repositories to Quarkus MongoDB with Panache. Converts MongoRepository interfaces to PanacheMongoRepository pattern.
- org.openrewrite.quarkus.spring.SpringBootDataMongoToQuarkus
- Replace Spring Boot Data MongoDB with Quarkus MongoDB Panache
- Migrates
spring-boot-starter-data-mongodbtoquarkus-mongodb-panache.
mssql
3 recipes
- org.openrewrite.sql.ConvertSqlServerDataTypesToPostgres
- Convert SQL Server data types to PostgreSQL
- Replaces SQL Server-specific data types with PostgreSQL equivalents.
- org.openrewrite.sql.ConvertSqlServerFunctionsToPostgres
- Convert SQL Server functions to PostgreSQL
- Replaces SQL Server-specific functions with PostgreSQL equivalents.
- org.openrewrite.sql.MigrateSqlServerToPostgres
- Migrate SQL Server to PostgreSQL
- Converts Microsoft SQL Server-specific SQL syntax and functions to PostgreSQL equivalents.
mui
78 recipes
- org.openrewrite.codemods.migrate.mui.AdapterV
- Converts components to use the v4 adapter module
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.All
- Combination of all deprecations
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.AutocompleteRenameCloseicon
- Renames
closeIconprop tocloseButtonIcon - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.AutocompleteRenameOption
- Renames
optionprop togetOptionLabel - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.AvatarCircleCircular
- Updates
circleprop tovariant="circular" - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.BadgeOverlapValue
- Updates
overlapprop tovariant="dot" - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.BaseHookImports
- Converts base imports to use React hooks
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.BaseRemoveComponentProp
- Removes
componentprop from base components - See Material UI codemod projects for more details.
- Removes
- org.openrewrite.codemods.migrate.mui.BaseRemoveUnstyledSuffix
- Removes
Unstyledsuffix from base components - See Material UI codemod projects for more details.
- Removes
- org.openrewrite.codemods.migrate.mui.BaseRenameComponentsToSlots
- Renames base components to slots
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.BaseUseNamedExports
- Updates base imports to use named exports
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.BoxBorderradiusValues
- Updates
borderRadiusprop values - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.BoxRenameCss
- Renames CSS properties for Box component
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.BoxRenameGap
- Renames
gapprop tospacing - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.BoxSxProp
- Converts
sxprop tosxstyle prop - See Material UI codemod projects for more details.
- Converts
- org.openrewrite.codemods.migrate.mui.ButtonColorProp
- Renames
colorprop tocolorOverride - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.ChipVariantProp
- Updates
variantprop for Chip component - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.CircularprogressVariant
- Updates
variantprop for CircularProgress component - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.CollapseRenameCollapsedheight
- Renames
collapsedHeightprop totransitionCollapsedHeight - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.ComponentRenameProp
- Renames
componentprop toas - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.CoreStylesImport
- Updates import paths for core styles
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.CreateTheme
- Updates createMuiTheme usage
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.DatePickersMovedToX
- Moves date pickers to
@mui/x-date-picker - See Material UI codemod projects for more details.
- Moves date pickers to
- org.openrewrite.codemods.migrate.mui.DialogProps
- Updates props for Dialog component
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.DialogTitleProps
- Updates props for DialogTitle component
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.EmotionPrependCache
- Prepends emotion cache
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.ExpansionPanelComponent
- Converts ExpansionPanel to use ExpansionPanel component
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.FabVariant
- Updates
variantprop for Fab component - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.FadeRenameAlpha
- Renames
alphaprop toopacity - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.GridJustifyJustifycontent
- Updates
justifyprop tojustifyContentfor Grid component - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.GridListComponent
- Converts GridList to use Grid component
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.GridVProps
- Updates the usage of the
@mui/material/Grid2,@mui/system/Grid, and@mui/joy/Gridcomponents to their updated APIs - See Material UI codemod projects for more details.
- Updates the usage of the
- org.openrewrite.codemods.migrate.mui.HiddenDownProps
- Updates
downprop for Hidden component - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.IconButtonSize
- Updates
sizeprop for IconButton component - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.JoyAvatarRemoveImgprops
- Removes
imgPropsprop from Avatar component - See Material UI codemod projects for more details.
- Removes
- org.openrewrite.codemods.migrate.mui.JoyRenameClassnamePrefix
- Renames
Muiclassname prefix - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.JoyRenameComponentsToSlots
- Renames components to slots
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.JoyRenameRowProp
- Renames
rowprop toflexDirection="row" - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.JoyTextFieldToInput
- Renames
TextFieldtoInput - See Material UI codemod projects for more details.
- Renames
- org.openrewrite.codemods.migrate.mui.JssToStyled
- Converts JSS styles to styled-components
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.JssToTssReact
- Converts JSS to TypeScript in React components
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.LinkUnderlineHover
- Updates link underline on hover
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.MaterialUiStyles
- Updates usage of
@mui/styles - See Material UI codemod projects for more details.
- Updates usage of
- org.openrewrite.codemods.migrate.mui.MaterialUiTypes
- Updates usage of
@mui/types - See Material UI codemod projects for more details.
- Updates usage of
- org.openrewrite.codemods.migrate.mui.ModalProps
- Updates props for Modal component
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.MovedLabModules
- Moves lab modules to
@mui/material - See Material UI codemod projects for more details.
- Moves lab modules to
- org.openrewrite.codemods.migrate.mui.MuiReplace
- Replaces
@muiimports with@mui/material - See Material UI codemod projects for more details.
- Replaces
- org.openrewrite.codemods.migrate.mui.OptimalImports
- Optimizes imports
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.PaginationRoundCircular
- Updates
circularprop tovariant="circular" - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.PresetSafe
- Ensures presets are safe to use
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.RenameCssVariables
- Renames CSS variables
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.RootRef
- Converts
rootReftoref - See Material UI codemod projects for more details.
- Converts
- org.openrewrite.codemods.migrate.mui.SkeletonVariant
- Updates
variantprop for Skeleton component - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.Styled
- Updates the usage of
styledfrom@mui/system@v5to be compatible with@pigment-css/react - See Material UI codemod projects for more details.
- Updates the usage of
- org.openrewrite.codemods.migrate.mui.StyledEngineProvider
- Updates usage of styled engine provider
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.SxProp
- Update the usage of the
sxprop to be compatible with@pigment-css/react - See Material UI codemod projects for more details.
- Update the usage of the
- org.openrewrite.codemods.migrate.mui.SystemProps
- Remove system props and add them to the
sxprop - See Material UI codemod projects for more details.
- Remove system props and add them to the
- org.openrewrite.codemods.migrate.mui.TableProps
- Updates props for Table component
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.TabsScrollButtons
- Updates scroll buttons for Tabs component
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.TextareaMinmaxRows
- Updates
minRowsandmaxRowsprops for TextareaAutosize component - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.ThemeAugment
- Adds
DefaultThememodule augmentation to typescript projects - See Material UI codemod projects for more details.
- Adds
- org.openrewrite.codemods.migrate.mui.ThemeBreakpoints
- Updates theme breakpoints
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.ThemeBreakpointsWidth
- Updates
widthvalues for theme breakpoints - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.ThemeOptions
- Updates theme options
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.ThemePaletteMode
- Updates theme palette mode
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.ThemeProvider
- Updates usage of ThemeProvider
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.ThemeSpacing
- Updates theme spacing
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.ThemeSpacingApi
- Updates theme spacing API
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.ThemeTypographyRound
- Updates
roundvalues for theme typography - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.ThemeV
- Update the theme creation from
@mui/system@v5to be compatible with@pigment-css/react - See Material UI codemod projects for more details.
- Update the theme creation from
- org.openrewrite.codemods.migrate.mui.TopLevelImports
- Converts all
@mui/materialsubmodule imports to the root module - See Material UI codemod projects for more details.
- Converts all
- org.openrewrite.codemods.migrate.mui.Transitions
- Updates usage of transitions
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.TreeViewMovedToX
- Moves tree view to
@mui/x-tree-view - See Material UI codemod projects for more details.
- Moves tree view to
- org.openrewrite.codemods.migrate.mui.UseAutocomplete
- Updates usage of useAutocomplete
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.UseTransitionprops
- Updates usage of useTransitionProps
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.VariantProp
- Updates
variantprop usage - See Material UI codemod projects for more details.
- Updates
- org.openrewrite.codemods.migrate.mui.WithMobileDialog
- Updates withMobileDialog higher-order component
- See Material UI codemod projects for more details.
- org.openrewrite.codemods.migrate.mui.WithWidth
- Updates withWidth higher-order component
- See Material UI codemod projects for more details.
mvc
1 recipe
- com.oracle.weblogic.rewrite.jakarta.MigrateJavaxMVCToJakartaEE9
- Migrate javax.mvc to 2.0 (Jakarta EE 9)
- Upgrade Jakarta Model-View-Controller libraries to 2.0 (Jakarta EE9) versions.
myfaces
5 recipes
- com.oracle.weblogic.rewrite.jakarta.UpgradeFacesOpenSourceLibraries2
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.
- com.oracle.weblogic.rewrite.jakarta.UpgradeFacesOpenSourceLibraries3
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.
- org.openrewrite.java.migrate.jakarta.UpgradeFaces3OpenSourceLibraries
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.
- org.openrewrite.java.migrate.jakarta.UpgradeFaces41OpenSourceLibraries
- Upgrade Faces open source libraries
- Upgrade OmniFaces and MyFaces/Mojarra libraries to Jakarta EE11 versions.
- org.openrewrite.java.migrate.jakarta.UpgradeFaces4OpenSourceLibraries
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE10 versions.
mysql
1 recipe
- org.openrewrite.java.flyway.AddFlywayModuleMySQL
- Add missing Flyway module for MySQL
- Database modules for Flyway 10 have been split out into separate modules for maintainability. Add the
flyway-mysqldependency if you are using MySQL with Flyway 10, as detailed on https://github.com/flyway/flyway/issues/3780.
namespaces
1 recipe
- com.oracle.weblogic.rewrite.jakarta.JakartaEeNamespaces9_1
- Migrate from JavaX to Jakarta EE 9.1 Namespaces
- These recipes help with Migration From JavaX to Jakarta EE 9.1 Namespaces.
naming
6 recipes
- OpenRewrite.Recipes.CodeQuality.Naming.FindAttributeNameShouldEndWithAttribute
- Attribute name should end with 'Attribute'
- Classes that inherit from
System.Attributeshould have names ending with 'Attribute' by convention.
- OpenRewrite.Recipes.CodeQuality.Naming.FindEventArgsNameConvention
- EventArgs name should end with 'EventArgs'
- Classes that inherit from
System.EventArgsshould have names ending with 'EventArgs' by convention.
- OpenRewrite.Recipes.CodeQuality.Naming.FindExceptionNameShouldEndWithException
- Exception name should end with 'Exception'
- Classes that inherit from
System.Exceptionshould have names ending with 'Exception' by convention.
- OpenRewrite.Recipes.CodeQuality.Naming.FindFixTodoComment
- Find TODO/HACK/FIXME comments
- Detect TODO, HACK, UNDONE, and FIXME comments that indicate unfinished work.
- OpenRewrite.Recipes.CodeQuality.Naming.NamingCodeQuality
- Naming code quality
- Naming convention recipes for C# code.
- OpenRewrite.Recipes.CodeQuality.Style.FindMethodReturningIAsyncEnumerable
- Find IAsyncEnumerable method without Async suffix
- Detect methods returning
IAsyncEnumerable<T>that don't end withAsync.
native
3 recipes
- io.moderne.java.spring.framework7.RenameMemberCategoryConstants
- Rename MemberCategory field constants for Spring Framework 7.0
- Renames deprecated
MemberCategoryconstants to their new names in Spring Framework 7.0.MemberCategory.PUBLIC_FIELDSis renamed toMemberCategory.INVOKE_PUBLIC_FIELDSandMemberCategory.DECLARED_FIELDSis renamed toMemberCategory.INVOKE_DECLARED_FIELDS. These renames clarify the original intent of these categories and align with the rest of the API.
- io.moderne.java.spring.framework7.UpdateGraalVmNativeHints
- Update GraalVM native reflection hints for Spring Framework 7.0
- Migrates GraalVM native reflection hints to Spring Framework 7.0 conventions. Spring Framework 7.0 adopts the unified reachability metadata format for GraalVM. This recipe renames deprecated
MemberCategoryconstants and simplifies reflection hint registrations where explicit member categories are no longer needed.
- org.openrewrite.quarkus.spring.ConfigureNativeBuild
- Configure Quarkus Native Build Support
- Adds configuration and dependencies required for Quarkus native image compilation with GraalVM. Includes native profile configuration and reflection hints where needed.
net10
31 recipes
- OpenRewrite.Recipes.Net10.FindActionContextAccessorObsolete
- Find obsolete
IActionContextAccessor/ActionContextAccessor(ASPDEPR006) - Finds usages of
IActionContextAccessorandActionContextAccessorwhich are obsolete in .NET 10. UseIHttpContextAccessorandHttpContext.GetEndpoint()instead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindActivitySampling
- Find
ActivitySamplingResult.PropagationDatabehavior change - Finds usages of
ActivitySamplingResult.PropagationDatawhich has changed behavior in .NET 10. Activities with a recorded parent and PropagationData sampling no longer setActivity.Recorded = true.
- Find
- OpenRewrite.Recipes.Net10.FindBackgroundServiceExecuteAsync
- Find
BackgroundService.ExecuteAsyncbehavior change - Finds methods that override
ExecuteAsyncfromBackgroundService. In .NET 10, the entire method runs on a background thread; synchronous code before the firstawaitno longer blocks host startup.
- Find
- OpenRewrite.Recipes.Net10.FindBufferedStreamWriteByte
- Find
BufferedStream.WriteByteimplicit flush behavior change - Finds calls to
BufferedStream.WriteByte()which no longer performs an implicit flush when the internal buffer is full in .NET 10. CallFlush()explicitly if needed.
- Find
- OpenRewrite.Recipes.Net10.FindClipboardGetData
- Find obsolete
Clipboard.GetDatacalls (WFDEV005) - Finds calls to
Clipboard.GetData(string). In .NET 10, this method is obsolete (WFDEV005). UseClipboard.TryGetDatamethods instead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindDistributedContextPropagator
- Find
DistributedContextPropagatordefault propagator change - Finds usages of
DistributedContextPropagator.CurrentandDistributedContextPropagator.CreateDefaultPropagator()which now default to W3C format in .NET 10. The 'baggage' header is used instead of 'Correlation-Context'.
- Find
- OpenRewrite.Recipes.Net10.FindDllImportSearchPath
- Find
DllImportSearchPath.AssemblyDirectorybehavior change - Finds usages of
DllImportSearchPath.AssemblyDirectorywhich has changed behavior in .NET 10. Specifying onlyAssemblyDirectoryno longer falls back to OS default search paths.
- Find
- OpenRewrite.Recipes.Net10.FindDriveInfoDriveFormat
- Find
DriveInfo.DriveFormatbehavior change - Finds usages of
DriveInfo.DriveFormatwhich returns Linux kernel filesystem type strings instead of mapped names in .NET 10. Verify that comparisons match the new format.
- Find
- OpenRewrite.Recipes.Net10.FindFormOnClosingObsolete
- Find obsolete
Form.OnClosing/OnClosedusage (WFDEV004) - Finds usage of
Form.OnClosing,Form.OnClosed, and theClosing/Closedevents. In .NET 10, these are obsolete (WFDEV004). UseOnFormClosing/OnFormClosedandFormClosing/FormClosedinstead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindGnuTarPaxTarEntry
- Find
GnuTarEntry/PaxTarEntrydefault timestamp change - Finds
new GnuTarEntry(...)andnew PaxTarEntry(...)constructor calls. In .NET 10, these no longer set atime and ctime by default. SetAccessTime/ChangeTimeexplicitly if needed.
- Find
- OpenRewrite.Recipes.Net10.FindIpNetworkObsolete
- Find obsolete
IPNetwork/KnownNetworks(ASPDEPR005) - Finds usages of
Microsoft.AspNetCore.HttpOverrides.IPNetworkandForwardedHeadersOptions.KnownNetworkswhich are obsolete in .NET 10. UseSystem.Net.IPNetworkandKnownIPNetworksinstead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindKeyedServiceAnyKey
- Find
KeyedService.AnyKeybehavior change - Finds usages of
KeyedService.AnyKeywhich has changed behavior in .NET 10.GetKeyedService(AnyKey)now throwsInvalidOperationExceptionandGetKeyedServices(AnyKey)no longer returns AnyKey registrations.
- Find
- OpenRewrite.Recipes.Net10.FindMakeGenericSignatureType
- Find
Type.MakeGenericSignatureTypevalidation change - Finds calls to
Type.MakeGenericSignatureType()which now validates that the first argument is a generic type definition in .NET 10.
- Find
- OpenRewrite.Recipes.Net10.FindQueryableMaxByMinByObsolete
- Find obsolete
Queryable.MaxBy/MinBywithIComparer<TSource>(SYSLIB0061) - Finds
Queryable.MaxByandQueryable.MinByoverloads takingIComparer<TSource>which are obsolete in .NET 10. Use the overloads takingIComparer<TKey>instead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindRazorRuntimeCompilationObsolete
- Find obsolete
AddRazorRuntimeCompilationcalls (ASPDEPR003) - Finds calls to
AddRazorRuntimeCompilationwhich is obsolete in .NET 10. Use Hot Reload instead for development scenarios.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindRfc2898DeriveBytesObsolete
- Find obsolete
Rfc2898DeriveBytesconstructors (SYSLIB0060) - Finds
new Rfc2898DeriveBytes(...)constructor calls which are obsolete in .NET 10. Use the staticRfc2898DeriveBytes.Pbkdf2()method instead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindSslAuthEnumTypes
- Find obsolete SSL authentication enum types
- Finds usage of
ExchangeAlgorithmType,CipherAlgorithmType, andHashAlgorithmTypefromSystem.Security.Authentication. These enum types are obsolete in .NET 10 (SYSLIB0058). UseSslStream.NegotiatedCipherSuiteinstead.
- OpenRewrite.Recipes.Net10.FindSslStreamObsoleteProperties
- Find obsolete
SslStreamcipher properties (SYSLIB0058) - Finds usages of
SslStream.KeyExchangeAlgorithm,KeyExchangeStrength,CipherAlgorithm,CipherStrength,HashAlgorithm, andHashStrengthwhich are obsolete in .NET 10. UseSslStream.NegotiatedCipherSuiteinstead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindSystemDrawingExceptionChange
- Find
catch (OutOfMemoryException)that may needExternalException - In .NET 10, System.Drawing GDI+ errors now throw
ExternalExceptioninstead ofOutOfMemoryException. This recipe finds catch blocks that catchOutOfMemoryExceptionwhich may need to also catchExternalException.
- Find
- OpenRewrite.Recipes.Net10.FindSystemEventsThreadShutdownObsolete
- Find obsolete
SystemEvents.EventsThreadShutdown(SYSLIB0059) - Finds usages of
SystemEvents.EventsThreadShutdownwhich is obsolete in .NET 10. UseAppDomain.ProcessExitinstead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindWebHostBuilderObsolete
- Find obsolete
WebHostBuilder/IWebHost/WebHostusage (ASPDEPR004/ASPDEPR008) - Finds usages of
WebHostBuilder,IWebHost, andWebHostwhich are obsolete in .NET 10. Migrate toHostBuilderorWebApplicationBuilderinstead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindWinFormsObsoleteApis
- Find obsolete Windows Forms APIs (WFDEV004/005/006)
- Finds usages of Windows Forms APIs that are obsolete in .NET 10, including
Form.OnClosing/OnClosed(WFDEV004),Clipboard.GetData(WFDEV005), and legacy controls likeContextMenu,DataGrid,MainMenu(WFDEV006).
- OpenRewrite.Recipes.Net10.FindWithOpenApiDeprecated
- Find deprecated
WithOpenApicalls (ASPDEPR002) - Finds calls to
.WithOpenApi()which is deprecated in .NET 10. Remove the call or useAddOpenApiOperationTransformerinstead.
- Find deprecated
- OpenRewrite.Recipes.Net10.FindX500DistinguishedNameValidation
- Find
X500DistinguishedNamestring constructor stricter validation - Finds
new X500DistinguishedName(string, ...)constructor calls which have stricter validation in .NET 10. Non-Windows environments may reject previously accepted values.
- Find
- OpenRewrite.Recipes.Net10.FindXsltSettingsEnableScriptObsolete
- Find obsolete
XsltSettings.EnableScript(SYSLIB0062) - Finds usages of
XsltSettings.EnableScriptwhich is obsolete in .NET 10.
- Find obsolete
- OpenRewrite.Recipes.Net10.FormOnClosingRename
- Rename
Form.OnClosing/OnClosedtoOnFormClosing/OnFormClosed(WFDEV004) - Renames
Form.OnClosingtoOnFormClosingandForm.OnClosedtoOnFormClosedfor .NET 10 compatibility. Parameter type changes (CancelEventArgs→FormClosingEventArgs,EventArgs→FormClosedEventArgs) must be updated manually.
- Rename
- OpenRewrite.Recipes.Net10.InsertAdjacentElementOrientParameterRename
- Rename
orientparameter toorientationinHtmlElement.InsertAdjacentElement - The
orientparameter ofHtmlElement.InsertAdjacentElementwas renamed toorientationin .NET 10. This recipe updates named arguments in method calls to use the new parameter name.
- Rename
- OpenRewrite.Recipes.Net10.KnownNetworksRename
- Rename
KnownNetworkstoKnownIPNetworks(ASPDEPR005) - Renames
ForwardedHeadersOptions.KnownNetworkstoKnownIPNetworksfor .NET 10 compatibility.
- Rename
- OpenRewrite.Recipes.Net10.MlDsaSlhDsaSecretKeyToPrivateKey
- Rename MLDsa/SlhDsa
SecretKeymembers toPrivateKey - Renames
SecretKeytoPrivateKeyin MLDsa and SlhDsa post-quantum cryptography APIs to align with .NET 10 naming conventions.
- Rename MLDsa/SlhDsa
- OpenRewrite.Recipes.Net10.RazorRuntimeCompilationObsolete
- Remove obsolete
AddRazorRuntimeCompilationcalls (ASPDEPR003) - Removes
AddRazorRuntimeCompilation()calls which are obsolete in .NET 10. Use Hot Reload instead for development scenarios.
- Remove obsolete
- OpenRewrite.Recipes.Net10.WithOpenApiDeprecated
- Remove deprecated
WithOpenApicalls (ASPDEPR002) - Removes
.WithOpenApi()calls which are deprecated in .NET 10. The call is removed from fluent method chains.
- Remove deprecated
net3.0
10 recipes
- OpenRewrite.Recipes.Net3_0.FindCompactOnMemoryPressure
- Find
CompactOnMemoryPressureusage (removed in ASP.NET Core 3.0) - Finds usages of
CompactOnMemoryPressurewhich was removed fromMemoryCacheOptionsin ASP.NET Core 3.0.
- Find
- OpenRewrite.Recipes.Net3_0.FindConnectionAdapter
- Find
IConnectionAdapterusage (removed in ASP.NET Core 3.0) - Finds usages of
IConnectionAdapterwhich was removed from Kestrel in ASP.NET Core 3.0. Use Connection Middleware instead.
- Find
- OpenRewrite.Recipes.Net3_0.FindHttpContextAuthentication
- Find
HttpContext.Authenticationusage (removed in ASP.NET Core 3.0) - Finds usages of
HttpContext.Authenticationwhich was removed in ASP.NET Core 3.0. Use dependency injection to getIAuthenticationServiceinstead.
- Find
- OpenRewrite.Recipes.Net3_0.FindNewtonsoftJson
- Find Newtonsoft.Json usage
- Finds usages of Newtonsoft.Json types (
JObject,JArray,JToken,JsonConvert) that should be migrated toSystem.Text.Jsonor explicitly preserved viaMicrosoft.AspNetCore.Mvc.NewtonsoftJsonin ASP.NET Core 3.0+.
- OpenRewrite.Recipes.Net3_0.FindObsoleteLocalizationApis
- Find obsolete localization APIs (ASP.NET Core 3.0)
- Finds usages of
ResourceManagerWithCultureStringLocalizerandWithCulture()which are obsolete in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_0.FindSpaServices
- Find SpaServices/NodeServices usage (obsolete in ASP.NET Core 3.0)
- Finds usages of
SpaServicesandNodeServiceswhich are obsolete in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_0.FindSynchronousIO
- Find synchronous IO usage (disabled in ASP.NET Core 3.0)
- Finds references to
AllowSynchronousIOwhich indicates synchronous IO usage that is disabled by default in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_0.FindUseMvc
- Find
UseMvc/AddMvcusage (replaced in ASP.NET Core 3.0) - Finds usages of
app.UseMvc(),app.UseMvcWithDefaultRoute(), andservices.AddMvc()which should be migrated to endpoint routing and more specific service registration in ASP.NET Core 3.0.
- Find
- OpenRewrite.Recipes.Net3_0.FindWebApiCompatShim
- Find Web API compatibility shim usage (removed in ASP.NET Core 3.0)
- Finds usages of
ApiController,HttpResponseMessage, and other types fromMicrosoft.AspNetCore.Mvc.WebApiCompatShimwhich was removed in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_0.FindWebHostBuilder
- Find
WebHostBuilder/WebHost.CreateDefaultBuilderusage (replaced in ASP.NET Core 3.0) - Finds usages of
WebHost.CreateDefaultBuilder()andnew WebHostBuilder()which should be migrated toHost.CreateDefaultBuilder()withConfigureWebHostDefaults()in ASP.NET Core 3.0.
- Find
net3.1
1 recipe
- OpenRewrite.Recipes.Net3_1.FindSameSiteNone
- Find
SameSiteMode.Noneusage (behavior changed in .NET Core 3.1) - Finds usages of
SameSiteMode.Nonewhich changed behavior in .NET Core 3.1 due to Chrome 80 SameSite cookie changes. Apps using remote authentication may need browser sniffing.
- Find
net5
5 recipes
- OpenRewrite.Recipes.Net5.FindCodeAccessSecurity
- Find Code Access Security usage (obsolete in .NET 5)
- Finds usages of Code Access Security types (
SecurityPermission,PermissionSet, etc.) which are obsolete in .NET 5+.
- OpenRewrite.Recipes.Net5.FindPrincipalPermissionAttribute
- Find
PrincipalPermissionAttributeusage (SYSLIB0003) - Finds usages of
PrincipalPermissionAttributewhich is obsolete in .NET 5+ (SYSLIB0003) and throwsNotSupportedExceptionat runtime.
- Find
- OpenRewrite.Recipes.Net5.FindUtf7Encoding
- Find
Encoding.UTF7usage (SYSLIB0001) - Finds usages of
Encoding.UTF7andUTF7Encodingwhich are obsolete in .NET 5+ (SYSLIB0001). UTF-7 is insecure.
- Find
- OpenRewrite.Recipes.Net5.FindWinHttpHandler
- Find
WinHttpHandlerusage (removed in .NET 5) - Finds usages of
WinHttpHandlerwhich was removed from the .NET 5 runtime. Install theSystem.Net.Http.WinHttpHandlerNuGet package explicitly.
- Find
- OpenRewrite.Recipes.Net5.FindWinRTInterop
- Find WinRT interop usage (removed in .NET 5)
- Finds usages of WinRT interop types (
WindowsRuntimeType,WindowsRuntimeMarshal, etc.) which were removed in .NET 5.
net6
5 recipes
- OpenRewrite.Recipes.Net6.FindAssemblyCodeBase
- Find
Assembly.CodeBase/EscapedCodeBaseusage (SYSLIB0012) - Finds usages of
Assembly.CodeBaseandAssembly.EscapedCodeBasewhich are obsolete (SYSLIB0012). UseAssembly.Locationinstead.
- Find
- OpenRewrite.Recipes.Net6.FindIgnoreNullValues
- Find
JsonSerializerOptions.IgnoreNullValuesusage (SYSLIB0020) - Finds usages of
JsonSerializerOptions.IgnoreNullValueswhich is obsolete in .NET 6 (SYSLIB0020). UseDefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNullinstead.
- Find
- OpenRewrite.Recipes.Net6.FindThreadAbort
- Find
Thread.Abortusage (SYSLIB0006) - Finds calls to
Thread.Abort()which throwsPlatformNotSupportedExceptionin .NET 6+ (SYSLIB0006). UseCancellationTokenfor cooperative cancellation instead.
- Find
- OpenRewrite.Recipes.Net6.FindWebRequest
- Find
WebRequest/HttpWebRequest/WebClientusage (SYSLIB0014) - Finds usages of
WebRequest,HttpWebRequest, andWebClientwhich are obsolete in .NET 6 (SYSLIB0014). UseHttpClientinstead.
- Find
- OpenRewrite.Recipes.Net6.FindX509PrivateKey
- Find
X509Certificate2.PrivateKeyusage (SYSLIB0028) - Finds usages of
X509Certificate2.PrivateKeywhich is obsolete (SYSLIB0028). UseGetRSAPrivateKey(),GetECDsaPrivateKey(), or the appropriate algorithm-specific method instead.
- Find
net7
2 recipes
- OpenRewrite.Recipes.Net7.FindObsoleteSslProtocols
- Find obsolete
SslProtocols.Tls/Tls11usage (SYSLIB0039) - Finds usages of
SslProtocols.TlsandSslProtocols.Tls11which are obsolete in .NET 7 (SYSLIB0039). UseSslProtocols.Tls12,SslProtocols.Tls13, orSslProtocols.Noneinstead.
- Find obsolete
- OpenRewrite.Recipes.Net7.FindRfc2898InsecureCtors
- Find insecure
Rfc2898DeriveBytesconstructors (SYSLIB0041) - Finds
Rfc2898DeriveBytesconstructor calls that use default SHA1 or low iteration counts, which are obsolete in .NET 7 (SYSLIB0041). SpecifyHashAlgorithmNameand at least 600,000 iterations.
- Find insecure
net8
7 recipes
- OpenRewrite.Recipes.Net8.FindAddContext
- Find
JsonSerializerOptions.AddContextusage (SYSLIB0049) - Finds calls to
JsonSerializerOptions.AddContext<T>()which is obsolete in .NET 8 (SYSLIB0049). UseTypeInfoResolverChainorTypeInfoResolverinstead.
- Find
- OpenRewrite.Recipes.Net8.FindAesGcmOldConstructor
- Find
AesGcmconstructor without tag size (SYSLIB0053) - Finds
new AesGcm(key)constructor calls without an explicit tag size parameter. In .NET 8, the single-argument constructor is obsolete (SYSLIB0053). Usenew AesGcm(key, tagSizeInBytes)instead.
- Find
- OpenRewrite.Recipes.Net8.FindFormatterBasedSerialization
- Find formatter-based serialization types (SYSLIB0050/0051)
- Finds usage of formatter-based serialization types (
FormatterConverter,IFormatter,ObjectIDGenerator,ObjectManager,SurrogateSelector,SerializationInfo,StreamingContext). These are obsolete in .NET 8 (SYSLIB0050/0051).
- OpenRewrite.Recipes.Net8.FindFrozenCollection
- Find ToImmutable() that could use Frozen collections*
- Finds usages of
ToImmutableDictionary()andToImmutableHashSet(). In .NET 8+,ToFrozenDictionary()andToFrozenSet()provide better read performance.
- OpenRewrite.Recipes.Net8.FindRegexCompileToAssembly
- Find
Regex.CompileToAssemblyusage (SYSLIB0052) - Finds usage of
Regex.CompileToAssembly()andRegexCompilationInfo. These are obsolete in .NET 8 (SYSLIB0052). Use the Regex source generator instead.
- Find
- OpenRewrite.Recipes.Net8.FindSerializationConstructors
- Find legacy serialization constructors (SYSLIB0051)
- Finds legacy serialization constructors
.ctor(SerializationInfo, StreamingContext)which are obsolete in .NET 8 (SYSLIB0051). TheISerializablepattern is no longer recommended.
- OpenRewrite.Recipes.Net8.FindTimeAbstraction
- Find DateTime.Now/UtcNow usage (TimeProvider in .NET 8)
- Finds usages of
DateTime.Now,DateTime.UtcNow,DateTimeOffset.Now, andDateTimeOffset.UtcNow. In .NET 8+,TimeProvideris the recommended abstraction for time.
net9
20 recipes
- OpenRewrite.Recipes.Net9.FindAuthenticationManager
- Find
AuthenticationManagerusage (SYSLIB0009) - Finds usages of
AuthenticationManagerwhich is not supported in .NET 9 (SYSLIB0009). Methods will no-op or throwPlatformNotSupportedException.
- Find
- OpenRewrite.Recipes.Net9.FindBinaryFormatter
- Find
BinaryFormatterusage (removed in .NET 9) - Finds usages of
BinaryFormatterwhich always throwsNotSupportedExceptionin .NET 9. Migrate to a different serializer such asSystem.Text.Json,XmlSerializer, orDataContractSerializer.
- Find
- OpenRewrite.Recipes.Net9.FindBinaryReaderReadString
- Find
BinaryReader.ReadStringbehavior change - Finds calls to
BinaryReader.ReadString()which now returns the Unicode replacement character (\uFFFD) for malformed UTF-8 byte sequences in .NET 9, instead of the previous behavior. Verify your code handles the replacement character correctly.
- Find
- OpenRewrite.Recipes.Net9.FindDistributedCache
- Find IDistributedCache usage (HybridCache in .NET 9)
- Finds usages of
IDistributedCache. In .NET 9,HybridCacheis the recommended replacement with L1/L2 caching, stampede protection, and tag-based invalidation.
- OpenRewrite.Recipes.Net9.FindEnumConverter
- Find
EnumConverterconstructor validation change - Finds
new EnumConverter()constructor calls. In .NET 9,EnumConvertervalidates that the registered type is actually an enum and throwsArgumentExceptionif not.
- Find
- OpenRewrite.Recipes.Net9.FindExecuteUpdateSync
- Find synchronous ExecuteUpdate/ExecuteDelete (EF Core 9)
- Finds usages of synchronous
ExecuteUpdate()andExecuteDelete()which were removed in EF Core 9. UseExecuteUpdateAsync/ExecuteDeleteAsyncinstead.
- OpenRewrite.Recipes.Net9.FindHttpClientHandlerCast
- Find
HttpClientHandlerusage (HttpClientFactory default change) - Finds usages of
HttpClientHandlerwhich may break whenHttpClientFactoryswitches its default handler toSocketsHttpHandlerin .NET 9.
- Find
- OpenRewrite.Recipes.Net9.FindHttpListenerRequestUserAgent
- Find
HttpListenerRequest.UserAgentnullable change - Finds accesses to
HttpListenerRequest.UserAgentwhich changed fromstringtostring?in .NET 9. Code that assumesUserAgentis non-null may throwNullReferenceException.
- Find
- OpenRewrite.Recipes.Net9.FindImplicitAuthenticationDefault
- Find implicit authentication default scheme (ASP.NET Core 9)
- Finds calls to
AddAuthentication()with no arguments. In .NET 9, a single registered authentication scheme is no longer automatically used as the default.
- OpenRewrite.Recipes.Net9.FindInMemoryDirectoryInfo
- Find
InMemoryDirectoryInforootDir prepend change - Finds
new InMemoryDirectoryInfo()constructor calls. In .NET 9,rootDiris prepended to file paths that don't start with therootDir, which may change file matching behavior.
- Find
- OpenRewrite.Recipes.Net9.FindIncrementingPollingCounter
- Find
IncrementingPollingCounterasync callback change - Finds
new IncrementingPollingCounter()constructor calls. In .NET 9, the initial callback invocation is asynchronous instead of synchronous, which may change timing behavior.
- Find
- OpenRewrite.Recipes.Net9.FindJsonDocumentNullable
- Find
JsonSerializer.DeserializenullableJsonDocumentchange - Finds
JsonSerializer.Deserialize()calls. In .NET 9, nullableJsonDocumentproperties now deserialize to aJsonDocumentwithRootElement.ValueKind == JsonValueKind.Nullinstead of beingnull.
- Find
- OpenRewrite.Recipes.Net9.FindJsonStringEnumConverter
- Find non-generic JsonStringEnumConverter
- Finds usages of the non-generic
JsonStringEnumConverter. In .NET 9, the genericJsonStringEnumConverter<TEnum>is preferred for AOT compatibility.
- OpenRewrite.Recipes.Net9.FindRuntimeHelpersGetSubArray
- Find
RuntimeHelpers.GetSubArrayreturn type change - Finds calls to
RuntimeHelpers.GetSubArray()which may return a different array type in .NET 9. Code that depends on the runtime type of the returned array may break.
- Find
- OpenRewrite.Recipes.Net9.FindSafeEvpPKeyHandleDuplicate
- Find
SafeEvpPKeyHandle.DuplicateHandleup-ref change - Finds calls to
SafeEvpPKeyHandle.DuplicateHandle(). In .NET 9, this method now increments the reference count instead of creating a deep copy, which may affect handle lifetime.
- Find
- OpenRewrite.Recipes.Net9.FindServicePointManager
- Find
ServicePointManagerusage (SYSLIB0014) - Finds usages of
ServicePointManagerwhich is fully obsolete in .NET 9 (SYSLIB0014). Settings onServicePointManagerdon't affectSslStreamorHttpClient.
- Find
- OpenRewrite.Recipes.Net9.FindSwashbuckle
- Find Swashbuckle usage (ASP.NET Core 9 built-in OpenAPI)
- Finds usages of Swashbuckle APIs (
AddSwaggerGen,UseSwagger,UseSwaggerUI). .NET 9 includes built-in OpenAPI support. Consider migrating toAddOpenApi()/MapOpenApi().
- OpenRewrite.Recipes.Net9.FindX509CertificateConstructors
- Find obsolete
X509Certificate2/X509Certificateconstructors (SYSLIB0057) - Finds usages of
X509Certificate2andX509Certificateconstructors that accept binary content or file paths, which are obsolete in .NET 9 (SYSLIB0057). UseX509CertificateLoadermethods instead.
- Find obsolete
- OpenRewrite.Recipes.Net9.FindZipArchiveCompressionLevel
- Find
ZipArchive.CreateEntrywithCompressionLevel(bit flag change) - Finds
ZipArchive.CreateEntry()andZipFileExtensions.CreateEntryFromFile()calls with aCompressionLevelparameter. In .NET 9, theCompressionLevelvalue now sets general-purpose bit flags in the ZIP central directory header, which may affect interoperability.
- Find
- OpenRewrite.Recipes.Net9.FindZipArchiveEntryEncoding
- Find
ZipArchiveEntryname/comment UTF-8 encoding change - Finds access to
ZipArchiveEntry.Name,FullName, orCommentproperties. In .NET 9, these now respect the UTF-8 flag in ZIP entries, which may change decoded values.
- Find
netty
5 recipes
- org.openrewrite.java.netty.EventLoopGroupToMultiThreadIoEventLoopGroupRecipes
- Replace all
EventLoopGroups withMultiThreadIoEventLoopGroup - Replaces Netty's
new *EventLoopGroupwithnew MultiThreadIoEventLoopGroup(*IoHandler.newFactory()).
- Replace all
- org.openrewrite.java.netty.EventLoopGroupToMultiThreadIoEventLoopGroupRecipes$EpollEventLoopGroupFactoryRecipe
- Replace
EpollEventLoopGroupwithMultiThreadIoEventLoopGroup - Replace
new EpollEventLoopGroup()withnew MultiThreadIoEventLoopGroup(EpollIoHandler.newFactory()).
- Replace
- org.openrewrite.java.netty.EventLoopGroupToMultiThreadIoEventLoopGroupRecipes$LocalEventLoopGroupFactoryRecipe
- Replace
LocalEventLoopGroupwithMultiThreadIoEventLoopGroup - Replace
new LocalEventLoopGroup()withnew MultiThreadIoEventLoopGroup(LocalIoHandler.newFactory()).
- Replace
- org.openrewrite.java.netty.EventLoopGroupToMultiThreadIoEventLoopGroupRecipes$NioEventLoopGroupFactoryRecipe
- Replace
NioEventLoopGroupwithMultiThreadIoEventLoopGroup - Replace
new NioEventLoopGroup()withnew MultiThreadIoEventLoopGroup(NioIoHandler.newFactory()).
- Replace
- org.openrewrite.netty.UpgradeNetty_4_1_to_4_2
- Migrates from Netty 4.1.x to Netty 4.2.x
- Migrate applications to the latest Netty 4.2.x release.
networking
8 recipes
- OpenRewrite.Recipes.Net5.FindWinHttpHandler
- Find
WinHttpHandlerusage (removed in .NET 5) - Finds usages of
WinHttpHandlerwhich was removed from the .NET 5 runtime. Install theSystem.Net.Http.WinHttpHandlerNuGet package explicitly.
- Find
- OpenRewrite.Recipes.Net6.FindWebRequest
- Find
WebRequest/HttpWebRequest/WebClientusage (SYSLIB0014) - Finds usages of
WebRequest,HttpWebRequest, andWebClientwhich are obsolete in .NET 6 (SYSLIB0014). UseHttpClientinstead.
- Find
- OpenRewrite.Recipes.Net7.FindObsoleteSslProtocols
- Find obsolete
SslProtocols.Tls/Tls11usage (SYSLIB0039) - Finds usages of
SslProtocols.TlsandSslProtocols.Tls11which are obsolete in .NET 7 (SYSLIB0039). UseSslProtocols.Tls12,SslProtocols.Tls13, orSslProtocols.Noneinstead.
- Find obsolete
- OpenRewrite.Recipes.Net9.FindAuthenticationManager
- Find
AuthenticationManagerusage (SYSLIB0009) - Finds usages of
AuthenticationManagerwhich is not supported in .NET 9 (SYSLIB0009). Methods will no-op or throwPlatformNotSupportedException.
- Find
- OpenRewrite.Recipes.Net9.FindHttpClientHandlerCast
- Find
HttpClientHandlerusage (HttpClientFactory default change) - Finds usages of
HttpClientHandlerwhich may break whenHttpClientFactoryswitches its default handler toSocketsHttpHandlerin .NET 9.
- Find
- OpenRewrite.Recipes.Net9.FindHttpListenerRequestUserAgent
- Find
HttpListenerRequest.UserAgentnullable change - Finds accesses to
HttpListenerRequest.UserAgentwhich changed fromstringtostring?in .NET 9. Code that assumesUserAgentis non-null may throwNullReferenceException.
- Find
- OpenRewrite.Recipes.Net9.FindServicePointManager
- Find
ServicePointManagerusage (SYSLIB0014) - Finds usages of
ServicePointManagerwhich is fully obsolete in .NET 9 (SYSLIB0014). Settings onServicePointManagerdon't affectSslStreamorHttpClient.
- Find
- org.openrewrite.java.migrate.net.JavaNetAPIs
- Use modernized
java.netAPIs - Certain Java networking APIs have become deprecated and their usages changed, necessitating usage changes.
- Use modernized
newrelic
1 recipe
- org.openrewrite.java.spring.opentelemetry.MigrateNewRelicToOpenTelemetry
- Migrate New Relic Agent to OpenTelemetry
- Migrate from New Relic Java Agent annotations to OpenTelemetry annotations. Replace @Trace annotations with @WithSpan annotations.
nextjs
12 recipes
- org.openrewrite.codemods.migrate.nextjs.NextJsCodemods
- Next.js Codemods for API Updates
- Next.js provides Codemod transformations to help upgrade your Next.js codebase when an API is updated or deprecated.
- org.openrewrite.codemods.migrate.nextjs.v10.AddMissingReactImport
- Add React imports
- Transforms files that do not import
Reactto include the import in order for the new React JSX transform to work.
- org.openrewrite.codemods.migrate.nextjs.v11.CraToNext
- Rename Next Image Imports
- Safely renames
next/imageimports in existing Next.js1011or12applications tonext/legacy/imagein Next.js 13. Also renamesnext/future/imagetonext/image.
- org.openrewrite.codemods.migrate.nextjs.v13_0.NewLink
- Remove
<a>Tags From Link Components - Remove
&lt;a&gt;tags inside Link Components or add alegacyBehaviorprop to Links that cannot be auto-fixed.
- Remove
- org.openrewrite.codemods.migrate.nextjs.v13_0.NextImageExperimental
- Migrate to the New Image Component
- Dangerously migrates from
next/legacy/imageto the newnext/imageby adding inline styles and removing unused props.
- org.openrewrite.codemods.migrate.nextjs.v13_0.NextImageToLegacyImage
- Rename Next Image Imports
- Safely renames
next/imageimports in existing Next.js1011or12applications tonext/legacy/imagein Next.js 13. Also renamesnext/future/imagetonext/image.
- org.openrewrite.codemods.migrate.nextjs.v13_2.BuiltInNextFont
- Use Built-in Font
- This codemod uninstalls the
@next/fontpackage and transforms@next/fontimports into the built-innext/font.
- org.openrewrite.codemods.migrate.nextjs.v14_0.MetadataToViewportExport
- Use
viewportexport - This codemod migrates certain viewport metadata to
viewportexport.
- Use
- org.openrewrite.codemods.migrate.nextjs.v14_0.NextOgImport
- Migrate
ImageResponseimports - This codemod moves transforms imports from
next/servertonext/ogfor usage of Dynamic OG Image Generation.
- Migrate
- org.openrewrite.codemods.migrate.nextjs.v6.UrlToWithrouter
- Use
withRouter - Transforms the deprecated automatically injected url property on top-level pages to using
withRouterand therouterproperty it injects. Read more here.
- Use
- org.openrewrite.codemods.migrate.nextjs.v8.WithampToConfig
- Transform AMP HOC into page config
- Transforms the
withAmpHOC into Next.js 9 page configuration.
- org.openrewrite.codemods.migrate.nextjs.v9.NameDefaultComponent
- Transform Anonymous Components into Named Components
- Transforms anonymous components into named components to make sure they work with Fast Refresh. The component will have a camel-cased name based on the name of the file, and it also works with arrow functions.
nio
1 recipe
- org.openrewrite.java.netty.EventLoopGroupToMultiThreadIoEventLoopGroupRecipes$NioEventLoopGroupFactoryRecipe
- Replace
NioEventLoopGroupwithMultiThreadIoEventLoopGroup - Replace
new NioEventLoopGroup()withnew MultiThreadIoEventLoopGroup(NioIoHandler.newFactory()).
- Replace
nodejs
1 recipe
- org.openrewrite.github.SetupNodeUpgradeNodeVersion
- Upgrade
actions/setup-nodenode-version - Update the Node.js version used by
actions/setup-nodeif it is below the expected version number.
- Upgrade
non
1 recipe
- com.oracle.weblogic.rewrite.jakarta.MitigateUnaffectedNonEEJakarta9Packages
- Mitigate Unaffected Non-EE Jakarta 9 Packages
- Mitigate Unaffected Non-EE Jakarta 9 Packages. Reference: https://github.com/jakartaee/platform/blob/main/namespace/unaffected-packages.adoc
- Tags: non-eejakarta
oauth2
2 recipes
- org.openrewrite.quarkus.spring.SpringBootOAuth2ClientToQuarkus
- Replace Spring Boot OAuth2 Client with Quarkus OIDC Client
- Migrates spring-boot-starter-oauth2-client
toquarkus-oidc-client`.
- org.openrewrite.quarkus.spring.SpringBootOAuth2ResourceServerToQuarkus
- Replace Spring Boot OAuth2 Resource Server with Quarkus OIDC
- Migrates
spring-boot-starter-oauth2-resource-servertoquarkus-oidc.
observability
3 recipes
- io.moderne.java.spring.boot3.UpdateOpenTelemetryResourceAttributes
- Update OpenTelemetry resource attributes
- The
service.groupresource attribute has been deprecated for OpenTelemetry in Spring Boot 3.5. Consider using alternative attributes or remove the deprecated attribute.
- org.openrewrite.java.spring.opentelemetry.MigrateSleuthToOpenTelemetry
- Migrate from Spring Cloud Sleuth to OpenTelemetry
- Migrate from Spring Cloud Sleuth to OpenTelemetry. Spring Cloud Sleuth has been deprecated and is replaced by Micrometer Tracing with OpenTelemetry as a backend. This recipe removes Sleuth dependencies and adds OpenTelemetry instrumentation.
- org.openrewrite.java.spring.opentelemetry.MigrateToOpenTelemetry
- Complete migration to OpenTelemetry
- Comprehensive migration to OpenTelemetry including dependencies, configuration properties, and Java code changes. This recipe handles migration from Spring Cloud Sleuth, Brave/Zipkin, and OpenTracing to OpenTelemetry.
okhttp
1 recipe
- org.openrewrite.java.testing.junit5.UpgradeOkHttpMockWebServer
- Use OkHttp 3 MockWebServer for JUnit 5
- Migrates OkHttp 3
MockWebServerto enable JUnit Jupiter Extension support.
omnifaces
6 recipes
- com.oracle.weblogic.rewrite.jakarta.UpgradeFacesOpenSourceLibraries2
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.
- com.oracle.weblogic.rewrite.jakarta.UpgradeFacesOpenSourceLibraries3
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.
- org.openrewrite.java.migrate.jakarta.OmniFacesNamespaceMigration
- OmniFaces Namespace Migration
- Find and replace legacy OmniFaces namespaces.
- org.openrewrite.java.migrate.jakarta.UpgradeFaces3OpenSourceLibraries
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.
- org.openrewrite.java.migrate.jakarta.UpgradeFaces41OpenSourceLibraries
- Upgrade Faces open source libraries
- Upgrade OmniFaces and MyFaces/Mojarra libraries to Jakarta EE11 versions.
- org.openrewrite.java.migrate.jakarta.UpgradeFaces4OpenSourceLibraries
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE10 versions.
openapi
10 recipes
- org.openrewrite.java.springdoc.MigrateSpringdocCommon
- Migrate from springdoc-openapi-common to springdoc-openapi-starter-common
- Migrate from springdoc-openapi-common to springdoc-openapi-starter-common.
- org.openrewrite.java.springdoc.SpringFoxToSpringDoc
- Migrate from SpringFox Swagger to SpringDoc and OpenAPI
- Migrate from SpringFox Swagger to SpringDoc and OpenAPI.
- org.openrewrite.java.springdoc.SwaggerToSpringDoc
- Migrate from Swagger to SpringDoc and OpenAPI
- Migrate from Swagger to SpringDoc and OpenAPI.
- org.openrewrite.openapi.swagger.MigrateApiImplicitParamsToParameters
- Migrate from
@ApiImplicitParamsto@Parameters - Converts
@ApiImplicitParamsto@Parametersand the@ApiImplicitParamannotation to@Parameterand converts the directly mappable attributes and removes the others.
- Migrate from
- org.openrewrite.openapi.swagger.MigrateApiModelPropertyToSchema
- Migrate from
@ApiModelPropertyto@Schema - Converts the
@ApiModelPropertyannotation to@Schemaand converts the "value" attribute to "description".
- Migrate from
- org.openrewrite.openapi.swagger.MigrateApiOperationToOperation
- Migrate from
@ApiOperationto@Operation - Converts the
@ApiOperationannotation to@Operationand converts the directly mappable attributes and removes the others.
- Migrate from
- org.openrewrite.openapi.swagger.MigrateApiParamToParameter
- Migrate from
@ApiParamto@Parameter - Converts the
@ApiParamannotation to@Parameterand converts the directly mappable attributes.
- Migrate from
- org.openrewrite.openapi.swagger.MigrateApiResponsesToApiResponses
- Migrate from
@ApiResponsesto@ApiResponses - Changes the namespace of the
@ApiResponsesand@ApiResponseannotations and converts its attributes (ex. code -> responseCode, message -> description, response -> content).
- Migrate from
- org.openrewrite.openapi.swagger.SwaggerToOpenAPI
- Migrate from Swagger to OpenAPI
- Migrate from Swagger to OpenAPI.
- org.openrewrite.openapi.swagger.UseJakartaSwaggerArtifacts
- Use Jakarta Swagger Artifacts
- Migrate from javax Swagger artifacts to Jakarta versions.
opentelemetry
8 recipes
- io.moderne.java.spring.boot3.UpdateOpenTelemetryResourceAttributes
- Update OpenTelemetry resource attributes
- The
service.groupresource attribute has been deprecated for OpenTelemetry in Spring Boot 3.5. Consider using alternative attributes or remove the deprecated attribute.
- org.openrewrite.java.spring.opentelemetry.MigrateBraveToOpenTelemetry
- Migrate Brave API to OpenTelemetry API
- Migrate Java code using Brave (Zipkin) tracing API to OpenTelemetry API. This recipe handles the migration of Brave Tracer, Span, and related classes to OpenTelemetry equivalents.
- org.openrewrite.java.spring.opentelemetry.MigrateDatadogToOpenTelemetry
- Migrate Datadog tracing to OpenTelemetry
- Migrate from Datadog Java tracing annotations to OpenTelemetry annotations. Replace Datadog @Trace annotations with @WithSpan annotations.
- org.openrewrite.java.spring.opentelemetry.MigrateFromZipkinToOpenTelemetry
- Migrate from Zipkin to OpenTelemetry OTLP
- Migrate from Zipkin tracing to OpenTelemetry OTLP. This recipe replaces Zipkin dependencies with OpenTelemetry OTLP exporter and updates the related configuration properties.
- org.openrewrite.java.spring.opentelemetry.MigrateNewRelicToOpenTelemetry
- Migrate New Relic Agent to OpenTelemetry
- Migrate from New Relic Java Agent annotations to OpenTelemetry annotations. Replace @Trace annotations with @WithSpan annotations.
- org.openrewrite.java.spring.opentelemetry.MigrateOpenTracingToOpenTelemetry
- Migrate OpenTracing API to OpenTelemetry API
- Migrate Java code using OpenTracing API to OpenTelemetry API. OpenTracing has been superseded by OpenTelemetry and is no longer actively maintained.
- org.openrewrite.java.spring.opentelemetry.MigrateSleuthToOpenTelemetry
- Migrate from Spring Cloud Sleuth to OpenTelemetry
- Migrate from Spring Cloud Sleuth to OpenTelemetry. Spring Cloud Sleuth has been deprecated and is replaced by Micrometer Tracing with OpenTelemetry as a backend. This recipe removes Sleuth dependencies and adds OpenTelemetry instrumentation.
- org.openrewrite.java.spring.opentelemetry.MigrateToOpenTelemetry
- Complete migration to OpenTelemetry
- Comprehensive migration to OpenTelemetry including dependencies, configuration properties, and Java code changes. This recipe handles migration from Spring Cloud Sleuth, Brave/Zipkin, and OpenTracing to OpenTelemetry.
opentracing
1 recipe
- org.openrewrite.java.spring.opentelemetry.MigrateOpenTracingToOpenTelemetry
- Migrate OpenTracing API to OpenTelemetry API
- Migrate Java code using OpenTracing API to OpenTelemetry API. OpenTracing has been superseded by OpenTelemetry and is no longer actively maintained.
optimization
1 recipe
- org.openrewrite.docker.DockerBuildOptimization
- Optimize Docker builds
- Apply build optimization best practices to Dockerfiles. This includes combining RUN instructions to reduce layers and adding cleanup commands to reduce image size.
oracle
4 recipes
- org.openrewrite.java.flyway.AddFlywayModuleOracle
- Add missing Flyway module for Oracle
- Database modules for Flyway 10 have been split out into separate modules for maintainability. Add the
flyway-database-oracledependency if you are using Oracle with Flyway 10, as detailed on https://github.com/flyway/flyway/issues/3780.
- org.openrewrite.sql.ConvertOracleDataTypesToPostgres
- Convert Oracle data types to PostgreSQL
- Replaces Oracle-specific data types with PostgreSQL equivalents.
- org.openrewrite.sql.ConvertOracleFunctionsToPostgres
- Convert Oracle functions to PostgreSQL
- Replaces Oracle-specific functions with PostgreSQL equivalents.
- org.openrewrite.sql.MigrateOracleToPostgres
- Migrate Oracle SQL to PostgreSQL
- Converts Oracle-specific SQL syntax and functions to PostgreSQL equivalents.
orm
2 recipes
- com.oracle.weblogic.rewrite.hibernate.AddHibernateOrmCore61
- Add Hibernate ORM Core if has dependencies
- This recipe will add Hibernate ORM Core if has dependencies.
- org.openrewrite.java.migrate.jakarta.JavaxOrmXmlToJakartaOrmXml
- Migrate xmlns entries in
orm.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
oss
1 recipe
- org.openrewrite.java.AddApache2LicenseHeader
- Add ASLv2 license header
- Adds the Apache Software License Version 2.0 to Java source files which are missing a license header.
panache
2 recipes
- org.openrewrite.quarkus.spring.MigrateEntitiesToPanache
- Migrate JPA Entities to Panache Entities
- Converts standard JPA entities to Quarkus Panache entities using the Active Record pattern. Entities will extend PanacheEntity and gain built-in CRUD operations.
- org.openrewrite.quarkus.spring.MigrateSpringDataMongodb
- Migrate Spring Data MongoDB to Quarkus Panache MongoDB
- Migrates Spring Data MongoDB repositories to Quarkus MongoDB with Panache. Converts MongoRepository interfaces to PanacheMongoRepository pattern.
pathlib
1 recipe
- org.openrewrite.python.migrate.FindPathlibLinkTo
- Find deprecated
Path.link_to()usage - Find usage of
Path.link_to()which was deprecated in Python 3.10 and removed in 3.12. Usehardlink_to()instead (note: argument order is reversed).
- Find deprecated
PEP 594
19 recipes
- org.openrewrite.python.migrate.FindAifcModule
- Find deprecated
aifcmodule usage - The
aifcmodule was deprecated in Python 3.11 and removed in Python 3.13. Use third-party audio libraries instead.
- Find deprecated
- org.openrewrite.python.migrate.FindAudioopModule
- Find deprecated
audioopmodule usage - The
audioopmodule was deprecated in Python 3.11 and removed in Python 3.13. Use pydub, numpy, or scipy for audio operations.
- Find deprecated
- org.openrewrite.python.migrate.FindCgiModule
- Find deprecated
cgimodule usage - The
cgimodule was deprecated in Python 3.11 and removed in Python 3.13. Useurllib.parsefor query string parsing,html.escape()for escaping, and web frameworks oremail.messagefor form handling.
- Find deprecated
- org.openrewrite.python.migrate.FindCgitbModule
- Find deprecated
cgitbmodule usage - The
cgitbmodule was deprecated in Python 3.11 and removed in Python 3.13. Use the standardloggingandtracebackmodules for error handling.
- Find deprecated
- org.openrewrite.python.migrate.FindChunkModule
- Find deprecated
chunkmodule usage - The
chunkmodule was deprecated in Python 3.11 and removed in Python 3.13. Implement IFF chunk reading manually or use specialized libraries.
- Find deprecated
- org.openrewrite.python.migrate.FindCryptModule
- Find deprecated
cryptmodule usage - The
cryptmodule was deprecated in Python 3.11 and removed in Python 3.13. Usebcrypt,argon2-cffi, orpasslibinstead.
- Find deprecated
- org.openrewrite.python.migrate.FindImghdrModule
- Find deprecated
imghdrmodule usage - The
imghdrmodule was deprecated in Python 3.11 and removed in Python 3.13. Usefiletype,python-magic, orPillowinstead.
- Find deprecated
- org.openrewrite.python.migrate.FindMailcapModule
- Find deprecated
mailcapmodule usage - The
mailcapmodule was deprecated in Python 3.11 and removed in Python 3.13. Usemimetypesmodule for MIME type handling.
- Find deprecated
- org.openrewrite.python.migrate.FindMsilibModule
- Find deprecated
msilibmodule usage - The
msilibmodule was deprecated in Python 3.11 and removed in Python 3.13. Use platform-specific tools for MSI creation.
- Find deprecated
- org.openrewrite.python.migrate.FindNisModule
- Find deprecated
nismodule usage - The
nismodule was deprecated in Python 3.11 and removed in Python 3.13. There is no direct replacement.
- Find deprecated
- org.openrewrite.python.migrate.FindNntplibModule
- Find deprecated
nntplibmodule usage - The
nntplibmodule was deprecated in Python 3.11 and removed in Python 3.13. NNTP is largely obsolete; consider alternatives if needed.
- Find deprecated
- org.openrewrite.python.migrate.FindOssaudiodevModule
- Find deprecated
ossaudiodevmodule usage - The
ossaudiodevmodule was deprecated in Python 3.11 and removed in Python 3.13. There is no direct replacement.
- Find deprecated
- org.openrewrite.python.migrate.FindPipesModule
- Find deprecated
pipesmodule usage - The
pipesmodule was deprecated in Python 3.11 and removed in Python 3.13. Use subprocess with shlex.quote() for shell escaping.
- Find deprecated
- org.openrewrite.python.migrate.FindSndhdrModule
- Find deprecated
sndhdrmodule usage - The
sndhdrmodule was deprecated in Python 3.11 and removed in Python 3.13. Usefiletypeor audio libraries likepydubinstead.
- Find deprecated
- org.openrewrite.python.migrate.FindSpwdModule
- Find deprecated
spwdmodule usage - The
spwdmodule was deprecated in Python 3.11 and removed in Python 3.13. There is no direct replacement.
- Find deprecated
- org.openrewrite.python.migrate.FindSunauModule
- Find deprecated
sunaumodule usage - The
sunaumodule was deprecated in Python 3.11 and removed in Python 3.13. Usesoundfileorpydubinstead.
- Find deprecated
- org.openrewrite.python.migrate.FindTelnetlibModule
- Find deprecated
telnetlibmodule usage - The
telnetlibmodule was deprecated in Python 3.11 and removed in Python 3.13. Consider usingtelnetlib3from PyPI, direct socket usage, or SSH-based alternatives like paramiko.
- Find deprecated
- org.openrewrite.python.migrate.FindUuModule
- Find deprecated
uumodule usage - The
uumodule was deprecated in Python 3.11 and removed in Python 3.13. Usebase64module instead for encoding binary data.
- Find deprecated
- org.openrewrite.python.migrate.FindXdrlibModule
- Find deprecated
xdrlibmodule usage - The
xdrlibmodule was deprecated in Python 3.11 and removed in Python 3.13. Usestructmodule for binary packing/unpacking.
- Find deprecated
pep604
2 recipes
- org.openrewrite.python.migrate.ReplaceTypingOptionalWithUnion
- Replace
typing.Optional[X]withX | None - PEP 604 introduced the
|operator for union types in Python 3.10. ReplaceOptional[X]with the more conciseX | Nonesyntax.
- Replace
- org.openrewrite.python.migrate.ReplaceTypingUnionWithPipe
- Replace
typing.Union[X, Y]withX | Y - PEP 604 introduced the
|operator for union types in Python 3.10. ReplaceUnion[X, Y, ...]with the more conciseX | Y | ...syntax.
- Replace
performance
40 recipes
- OpenRewrite.Recipes.CodeQuality.Linq.FindOptimizeCountUsage
- Find Count() comparison that could be optimized
- Detect
Count(pred) == nandCount() > ncomparisons which could useWhere().Take(n+1).Count()orSkip(n).Any()for better performance.
- OpenRewrite.Recipes.CodeQuality.Performance.FindAsyncVoid
- Do not use async void
- Async void methods cannot be awaited and exceptions cannot be caught. Use
async Taskinstead, except for event handlers.
- OpenRewrite.Recipes.CodeQuality.Performance.FindAvoidClosureByUsingFactoryArg
- Find closure in GetOrAdd that could use factory argument
- Detect
ConcurrentDictionary.GetOrAddcalls with lambdas that capture variables. Use the overload with a factory argument parameter to avoid allocation.
- OpenRewrite.Recipes.CodeQuality.Performance.FindAvoidClosureInConcurrentDictionary
- Avoid closure when using ConcurrentDictionary
- ConcurrentDictionary methods like
GetOrAddmay evaluate the factory even when the key exists. Use the overload with a factory argument to avoid closure allocation.
- OpenRewrite.Recipes.CodeQuality.Performance.FindAvoidClosureInMethod
- Find closure in GetOrAdd/AddOrUpdate factory
- Detect closures in lambdas passed to
GetOrAddorAddOrUpdate. Use the factory overload that accepts a state argument to avoid allocations.
- OpenRewrite.Recipes.CodeQuality.Performance.FindBlockingCallsInAsync
- Find blocking calls in async methods
- Detect
.Wait(),.Result, and.GetAwaiter().GetResult()calls in async methods. Blocking calls in async methods can cause deadlocks.
- OpenRewrite.Recipes.CodeQuality.Performance.FindDoNotUseBlockingCall
- Do not use blocking calls on tasks
- Avoid
.Wait(),.Result, and.GetAwaiter().GetResult()on tasks. These can cause deadlocks. Useawaitinstead.
- OpenRewrite.Recipes.CodeQuality.Performance.FindDoNotUseToStringIfObject
- Do not use ToString on GetType result
- Using
.GetType().ToString()returns the full type name. Consider using.GetType().Nameor.GetType().FullNameinstead for clarity.
- OpenRewrite.Recipes.CodeQuality.Performance.FindEqualityComparerDefaultOfString
- Find EqualityComparer<string>.Default usage
- Detect
EqualityComparer<string>.Defaultwhich uses ordinal comparison. Consider using an explicitStringComparerinstead.
- OpenRewrite.Recipes.CodeQuality.Performance.FindGetTypeOnSystemType
- Find GetType() called on System.Type
- Detect
typeof(T).GetType()which returnsSystem.RuntimeTypeinstead of the expectedSystem.Type. Usetypeof(T)directly.
- OpenRewrite.Recipes.CodeQuality.Performance.FindImplicitCultureSensitiveMethods
- Find implicit culture-sensitive string methods
- Detect calls to
ToLower()andToUpper()without culture parameters. These methods use the current thread culture, which may cause unexpected behavior.
- OpenRewrite.Recipes.CodeQuality.Performance.FindImplicitCultureSensitiveToString
- Find implicit culture-sensitive ToString calls
- Detect
.ToString()calls without format arguments. On numeric and DateTime types, these use the current thread culture.
- OpenRewrite.Recipes.CodeQuality.Performance.FindLinqOnDirectMethods
- Find LINQ methods replaceable with direct methods
- Detect LINQ methods like
.Count()that could be replaced with direct collection properties. Direct access avoids enumeration overhead.
- OpenRewrite.Recipes.CodeQuality.Performance.FindMakeMethodStatic
- Find methods that could be static
- Detect private methods that don't appear to use instance members and could be marked
staticfor clarity and performance.
- OpenRewrite.Recipes.CodeQuality.Performance.FindMissingCancellationToken
- Find methods not forwarding CancellationToken
- Detect calls to async methods that may have CancellationToken overloads but are called without one. Uses name-based heuristics.
- OpenRewrite.Recipes.CodeQuality.Performance.FindMissingStructLayout
- Find structs without StructLayout attribute
- Detect struct declarations without
[StructLayout]attribute. Adding[StructLayout(LayoutKind.Auto)]allows the CLR to optimize field layout for better memory usage.
- OpenRewrite.Recipes.CodeQuality.Performance.FindMissingTimeoutForRegex
- Add timeout to Regex
- Regex without a timeout can be vulnerable to ReDoS attacks. Specify a
TimeSpantimeout or useRegexOptions.NonBacktracking.
- OpenRewrite.Recipes.CodeQuality.Performance.FindMissingWithCancellation
- Find missing WithCancellation on async enumerables
- Detect async enumerable iteration without
.WithCancellation(). Async enumerables should forward CancellationToken via WithCancellation.
- OpenRewrite.Recipes.CodeQuality.Performance.FindNaNComparison
- Do not use NaN in comparisons
- Comparing with
NaNusing==always returns false. Usedouble.IsNaN(x)instead.
- OpenRewrite.Recipes.CodeQuality.Performance.FindOptimizeEnumerableCountVsAny
- Find LINQ Count() on materialized collection
- Detect LINQ
Count()orAny()on types that have aCountorLengthproperty. Use the property directly for O(1) performance.
- OpenRewrite.Recipes.CodeQuality.Performance.FindOptimizeGuidCreation
- Find Guid.Parse with constant string
- Detect
Guid.Parse("...")with constant strings. Consider usingnew Guid("...")or a static readonly field for better performance.
- OpenRewrite.Recipes.CodeQuality.Performance.FindOptimizeStartsWith
- Use char overload for single-character string methods
- Convert string methods with single-character string literals to use char overloads for better performance.
- OpenRewrite.Recipes.CodeQuality.Performance.FindSequenceEqualForSpan
- Find Span<char> equality that should use SequenceEqual
- Detect
==and!=operators onSpan<char>orReadOnlySpan<char>which compare references. UseSequenceEqualfor content comparison.
- OpenRewrite.Recipes.CodeQuality.Performance.FindSimplifyStringCreate
- Find simplifiable string.Create calls
- Detect
string.Create(CultureInfo.InvariantCulture, ...)calls that could be simplified to string interpolation when all parameters are culture-invariant.
- OpenRewrite.Recipes.CodeQuality.Performance.FindStreamReadResultNotUsed
- Find unused Stream.Read return value
- Detect calls to
Stream.ReadorStream.ReadAsyncwhere the return value is discarded. The return value indicates how many bytes were actually read.
- OpenRewrite.Recipes.CodeQuality.Performance.FindStringCreateInsteadOfFormattable
- Find FormattableString that could use string.Create
- Detect
FormattableStringusage wherestring.Createwith anIFormatProvidercould be used for better performance.
- OpenRewrite.Recipes.CodeQuality.Performance.FindStringFormatShouldBeConstant
- String.Format format string should be constant
- The format string passed to
string.Formatshould be a compile-time constant to enable analysis and avoid runtime format errors.
- OpenRewrite.Recipes.CodeQuality.Performance.FindStringGetHashCode
- Find string.GetHashCode() without StringComparer
- Detect calls to
string.GetHashCode()without aStringComparer. The defaultGetHashCode()may produce different results across platforms.
- OpenRewrite.Recipes.CodeQuality.Performance.FindStructWithDefaultEqualsAsKey
- Find Dictionary/HashSet with struct key type
- Detect
DictionaryorHashSetusage with struct types as keys. Structs without overriddenEquals/GetHashCodeuse slow reflection-based comparison.
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseAttributeIsDefined
- Find GetCustomAttributes that could use Attribute.IsDefined
- Detect
GetCustomAttributes().Any()or similar patterns whereAttribute.IsDefinedwould be more efficient.
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseContainsKeyInsteadOfTryGetValue
- Use ContainsKey instead of TryGetValue with discard
- When only checking if a key exists, use
ContainsKeyinstead ofTryGetValuewith a discarded out parameter.
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseExplicitCaptureRegexOption
- Use RegexOptions.ExplicitCapture
- Use
RegexOptions.ExplicitCaptureto avoid capturing unnamed groups, which improves performance.
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseIndexerInsteadOfLinq
- Find LINQ methods replaceable with indexer
- Detect LINQ methods like
.First()and.Last()that could be replaced with direct indexer access for better performance.
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseRegexSourceGenerator
- Find Regex that could use source generator
- Detect
new Regex(...)calls that could benefit from the[GeneratedRegex]source generator attribute for better performance (.NET 7+).
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseTimeProviderOverload
- Find calls that could use TimeProvider
- Detect
DateTime.UtcNow,DateTimeOffset.UtcNow, andTask.Delaycalls that could use aTimeProviderparameter for better testability (.NET 8+).
- OpenRewrite.Recipes.CodeQuality.Performance.FindUseValuesContainsInsteadOfValues
- Find Values.Contains() instead of ContainsValue()
- Detect
.Values.Contains(value)on dictionaries. Use.ContainsValue(value)instead.
- OpenRewrite.Recipes.CodeQuality.Performance.OptimizeStringBuilderAppend
- Optimize StringBuilder.Append usage
- Optimize StringBuilder method calls: use char overloads for single-character strings, remove redundant ToString() calls, replace string.Format with AppendFormat, and split string concatenation into chained Append calls.
- OpenRewrite.Recipes.CodeQuality.Performance.PerformanceCodeQuality
- Performance code quality
- Performance optimization recipes for C# code.
- OpenRewrite.Recipes.CodeQuality.Performance.ReplaceEnumToStringWithNameof
- Replace Enum.ToString() with nameof
- Replace
MyEnum.Value.ToString()withnameof(MyEnum.Value). Thenameofoperator is evaluated at compile time, avoiding runtime reflection.
- OpenRewrite.Recipes.CodeQuality.Performance.UseContainsKey
- Use ContainsKey instead of Keys.Contains
- Replace
.Keys.Contains(key)with.ContainsKey(key)on dictionaries for O(1) performance.
permissions
1 recipe
- com.oracle.weblogic.rewrite.jakarta.JavaxPermissionsXmlToJakarta9PermissionsXml
- Migrate xmlns entries in
permissions.xmlfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
persistence
7 recipes
- com.oracle.weblogic.rewrite.UpgradeJPATo31HibernateTo66
- Upgrade Jakarta JPA to 3.1 and Hibernate 6.6
- This recipe upgrades Jakarta JPA to 3.1 and Hibernate to 6.6 (compatible with Jakarta EE 10).
- com.oracle.weblogic.rewrite.WebLogicPersistenceConfigurationXmlNamespace1412
- Migrate xmlns entries in
persistence-configuration.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic EJB 3.2 Persistence Configuration schema files to WebLogic 14.1.2
- Tags: persistence-configuration
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicPersistenceConfigurationXmlNamespace1511
- Migrate xmlns entries in
persistence-configuration.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inpersistence-configuration.xmlfiles to WebLogic 15.1.1 - Tags: persistence-configuration
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.hibernate.UpgradeHibernateTo66
- Upgrade Hibernate to 6.6
- This recipe upgrades Hibernate to version 6.6, which is compatible with Jakarta EE 10 and JPA 3.1. It also upgrades a few of the commonly used Hibernate add-ons.
- com.oracle.weblogic.rewrite.jakarta.UpdateJakartaPersistenceTo31
- Update Jakarta Persistence to 3.1
- Update Jakarta Persistence to 3.1.
- com.oracle.weblogic.rewrite.jakarta.UpdateJakartaPersistenceTo32
- Update Jakarta Persistence to 3.2
- Update Jakarta Persistence to 3.2.
- org.openrewrite.java.migrate.jakarta.JavaxOrmXmlToJakartaOrmXml
- Migrate xmlns entries in
orm.xmlfiles - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
petclinic
2 recipes
- com.oracle.weblogic.rewrite.examples.spring.MigratedPetClinicExtrasFor1511
- Add WebLogic 15.1.1 PetClinic extras
- Run migration extras for migrated Spring Framework PetClinic example run on WebLogic 15.1.1.
- com.oracle.weblogic.rewrite.examples.spring.SetupSpringFrameworkPetClinicFor1412
- Setup Spring Framework 5.3.x PetClinic for WebLogic 14.1.2
- Setup Spring Framework 5.3.x PetClinic for WebLogic 14.1.2.
plain text
1 recipe
- org.openrewrite.text.ChangeText
- Change text
- Completely replaces the contents of the text file with other text. Use together with a
FindSourceFilesprecondition to limit which files are changed.
platform
1 recipe
- org.openrewrite.python.migrate.ReplacePlatformPopen
- Replace
platform.popen()withsubprocess.check_output() platform.popen()was removed in Python 3.8. Usesubprocess.check_output(cmd, shell=True)instead. Note: this rewrites call sites but does not manage imports.
- Replace
plugin
1 recipe
- org.openrewrite.quarkus.spring.CustomizeQuarkusPluginGoals
- Customize Quarkus Maven Plugin Goals
- Allows customization of Quarkus Maven plugin goals. Adds or modifies the executions and goals for the quarkus-maven-plugin.
poi
3 recipes
- org.openrewrite.apache.poi.UpgradeApachePoi_3_17
- Migrates to Apache POI 3.17
- Migrates to the last Apache POI 3.x release. This recipe modifies build files and makes changes to deprecated/preferred APIs that have changed between versions.
- org.openrewrite.apache.poi.UpgradeApachePoi_4_1
- Migrates to Apache POI 4.1.2
- Migrates to the last Apache POI 4.x release. This recipe modifies build files and makes changes to deprecated/preferred APIs that have changed between versions.
- org.openrewrite.apache.poi.UpgradeApachePoi_5
- Migrates to Apache POI 5.x
- Migrates to the latest Apache POI 5.x release. This recipe modifies build files to account for artifact renames and upgrades dependency versions. It also chains the 4.1 recipe to handle all prior API migrations.
postgresql
7 recipes
- org.openrewrite.java.flyway.AddFlywayModulePostgreSQL
- Add missing Flyway module for PostgreSQL
- Database modules for Flyway 10 have been split out in to separate modules for maintainability. Add the
flyway-database-postgresqldependency if you are using PostgreSQL with Flyway 10, as detailed on https://github.com/flyway/flyway/issues/3780.
- org.openrewrite.sql.ConvertOracleDataTypesToPostgres
- Convert Oracle data types to PostgreSQL
- Replaces Oracle-specific data types with PostgreSQL equivalents.
- org.openrewrite.sql.ConvertOracleFunctionsToPostgres
- Convert Oracle functions to PostgreSQL
- Replaces Oracle-specific functions with PostgreSQL equivalents.
- org.openrewrite.sql.ConvertSqlServerDataTypesToPostgres
- Convert SQL Server data types to PostgreSQL
- Replaces SQL Server-specific data types with PostgreSQL equivalents.
- org.openrewrite.sql.ConvertSqlServerFunctionsToPostgres
- Convert SQL Server functions to PostgreSQL
- Replaces SQL Server-specific functions with PostgreSQL equivalents.
- org.openrewrite.sql.MigrateOracleToPostgres
- Migrate Oracle SQL to PostgreSQL
- Converts Oracle-specific SQL syntax and functions to PostgreSQL equivalents.
- org.openrewrite.sql.MigrateSqlServerToPostgres
- Migrate SQL Server to PostgreSQL
- Converts Microsoft SQL Server-specific SQL syntax and functions to PostgreSQL equivalents.
primefaces
4 recipes
- com.oracle.weblogic.rewrite.jakarta.UpgradeFacesOpenSourceLibraries2
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.
- com.oracle.weblogic.rewrite.jakarta.UpgradeFacesOpenSourceLibraries3
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.
- org.openrewrite.java.migrate.jakarta.UpgradeFaces3OpenSourceLibraries
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE9 versions.
- org.openrewrite.java.migrate.jakarta.UpgradeFaces4OpenSourceLibraries
- Upgrade Faces open source libraries
- Upgrade PrimeFaces, OmniFaces, and MyFaces libraries to Jakarta EE10 versions.
pubsub
2 recipes
- com.oracle.weblogic.rewrite.WebLogicPubSubXmlNamespace1412
- Migrate xmlns entries in
weblogic-pubsub.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic PubSub schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicPubSubXmlNamespace1511
- Migrate xmlns entries in
weblogic-pubsub.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-pubsub.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
pulsar
1 recipe
- io.moderne.java.spring.boot4.RemoveSpringPulsarReactive
- Remove Spring Pulsar Reactive support
- Spring Boot 4.0 removed support for Spring Pulsar Reactive as it is no longer maintained. This recipe removes the Spring Pulsar Reactive dependencies.
python
72 recipes
- org.openrewrite.python.migrate.FindAifcModule
- Find deprecated
aifcmodule usage - The
aifcmodule was deprecated in Python 3.11 and removed in Python 3.13. Use third-party audio libraries instead.
- Find deprecated
- org.openrewrite.python.migrate.FindAudioopModule
- Find deprecated
audioopmodule usage - The
audioopmodule was deprecated in Python 3.11 and removed in Python 3.13. Use pydub, numpy, or scipy for audio operations.
- Find deprecated
- org.openrewrite.python.migrate.FindCgiModule
- Find deprecated
cgimodule usage - The
cgimodule was deprecated in Python 3.11 and removed in Python 3.13. Useurllib.parsefor query string parsing,html.escape()for escaping, and web frameworks oremail.messagefor form handling.
- Find deprecated
- org.openrewrite.python.migrate.FindCgitbModule
- Find deprecated
cgitbmodule usage - The
cgitbmodule was deprecated in Python 3.11 and removed in Python 3.13. Use the standardloggingandtracebackmodules for error handling.
- Find deprecated
- org.openrewrite.python.migrate.FindChunkModule
- Find deprecated
chunkmodule usage - The
chunkmodule was deprecated in Python 3.11 and removed in Python 3.13. Implement IFF chunk reading manually or use specialized libraries.
- Find deprecated
- org.openrewrite.python.migrate.FindCryptModule
- Find deprecated
cryptmodule usage - The
cryptmodule was deprecated in Python 3.11 and removed in Python 3.13. Usebcrypt,argon2-cffi, orpasslibinstead.
- Find deprecated
- org.openrewrite.python.migrate.FindFunctoolsCmpToKey
- Find
functools.cmp_to_key()usage - Find usage of
functools.cmp_to_key()which is a Python 2 compatibility function. Consider using a key function directly.
- Find
- org.openrewrite.python.migrate.FindImghdrModule
- Find deprecated
imghdrmodule usage - The
imghdrmodule was deprecated in Python 3.11 and removed in Python 3.13. Usefiletype,python-magic, orPillowinstead.
- Find deprecated
- org.openrewrite.python.migrate.FindImpUsage
- Find deprecated imp module usage
- Find imports of the deprecated
impmodule which was removed in Python 3.12. Migrate toimportlib.
- org.openrewrite.python.migrate.FindLocaleGetdefaultlocale
- Find deprecated
locale.getdefaultlocale()usage locale.getdefaultlocale()was deprecated in Python 3.11. Uselocale.setlocale(),locale.getlocale(), orlocale.getpreferredencoding(False)instead.
- Find deprecated
- org.openrewrite.python.migrate.FindMacpathModule
- Find removed
macpathmodule usage - The
macpathmodule was removed in Python 3.8. Useos.pathinstead.
- Find removed
- org.openrewrite.python.migrate.FindMailcapModule
- Find deprecated
mailcapmodule usage - The
mailcapmodule was deprecated in Python 3.11 and removed in Python 3.13. Usemimetypesmodule for MIME type handling.
- Find deprecated
- org.openrewrite.python.migrate.FindMsilibModule
- Find deprecated
msilibmodule usage - The
msilibmodule was deprecated in Python 3.11 and removed in Python 3.13. Use platform-specific tools for MSI creation.
- Find deprecated
- org.openrewrite.python.migrate.FindNisModule
- Find deprecated
nismodule usage - The
nismodule was deprecated in Python 3.11 and removed in Python 3.13. There is no direct replacement.
- Find deprecated
- org.openrewrite.python.migrate.FindNntplibModule
- Find deprecated
nntplibmodule usage - The
nntplibmodule was deprecated in Python 3.11 and removed in Python 3.13. NNTP is largely obsolete; consider alternatives if needed.
- Find deprecated
- org.openrewrite.python.migrate.FindOsPopen
- Find deprecated
os.popen()usage os.popen()has been deprecated since Python 3.6. Usesubprocess.run()orsubprocess.Popen()instead for better control over process creation and output handling.
- Find deprecated
- org.openrewrite.python.migrate.FindOsSpawn
- Find deprecated
os.spawn*()usage - The
os.spawn*()family of functions are deprecated. Usesubprocess.run()orsubprocess.Popen()instead.
- Find deprecated
- org.openrewrite.python.migrate.FindOssaudiodevModule
- Find deprecated
ossaudiodevmodule usage - The
ossaudiodevmodule was deprecated in Python 3.11 and removed in Python 3.13. There is no direct replacement.
- Find deprecated
- org.openrewrite.python.migrate.FindPathlibLinkTo
- Find deprecated
Path.link_to()usage - Find usage of
Path.link_to()which was deprecated in Python 3.10 and removed in 3.12. Usehardlink_to()instead (note: argument order is reversed).
- Find deprecated
- org.openrewrite.python.migrate.FindPipesModule
- Find deprecated
pipesmodule usage - The
pipesmodule was deprecated in Python 3.11 and removed in Python 3.13. Use subprocess with shlex.quote() for shell escaping.
- Find deprecated
- org.openrewrite.python.migrate.FindShutilRmtreeOnerror
- Find deprecated
shutil.rmtree(onerror=...)parameter - The
onerrorparameter ofshutil.rmtree()was deprecated in Python 3.12 in favor ofonexc. Theonexccallback receives the exception object directly rather than an exc_info tuple.
- Find deprecated
- org.openrewrite.python.migrate.FindSndhdrModule
- Find deprecated
sndhdrmodule usage - The
sndhdrmodule was deprecated in Python 3.11 and removed in Python 3.13. Usefiletypeor audio libraries likepydubinstead.
- Find deprecated
- org.openrewrite.python.migrate.FindSocketGetFQDN
- Find
socket.getfqdn()usage - Find usage of
socket.getfqdn()which can be slow and unreliable. Consider usingsocket.gethostname()instead.
- Find
- org.openrewrite.python.migrate.FindSpwdModule
- Find deprecated
spwdmodule usage - The
spwdmodule was deprecated in Python 3.11 and removed in Python 3.13. There is no direct replacement.
- Find deprecated
- org.openrewrite.python.migrate.FindSunauModule
- Find deprecated
sunaumodule usage - The
sunaumodule was deprecated in Python 3.11 and removed in Python 3.13. Usesoundfileorpydubinstead.
- Find deprecated
- org.openrewrite.python.migrate.FindSysCoroutineWrapper
- Find removed
sys.set_coroutine_wrapper()/sys.get_coroutine_wrapper() sys.set_coroutine_wrapper()andsys.get_coroutine_wrapper()were deprecated in Python 3.7 and removed in Python 3.8.
- Find removed
- org.openrewrite.python.migrate.FindTelnetlibModule
- Find deprecated
telnetlibmodule usage - The
telnetlibmodule was deprecated in Python 3.11 and removed in Python 3.13. Consider usingtelnetlib3from PyPI, direct socket usage, or SSH-based alternatives like paramiko.
- Find deprecated
- org.openrewrite.python.migrate.FindTempfileMktemp
- Find deprecated
tempfile.mktemp()usage - Find usage of
tempfile.mktemp()which is deprecated due to security concerns (race condition). Usemkstemp()orNamedTemporaryFile()instead.
- Find deprecated
- org.openrewrite.python.migrate.FindUrllibParseSplitFunctions
- Find deprecated urllib.parse split functions
- Find usage of deprecated urllib.parse split functions (splithost, splitport, etc.) removed in Python 3.14. Use urlparse() instead.
- org.openrewrite.python.migrate.FindUrllibParseToBytes
- Find deprecated
urllib.parse.to_bytes()usage - Find usage of
urllib.parse.to_bytes()which was deprecated in Python 3.8 and removed in 3.14. Use str.encode() directly.
- Find deprecated
- org.openrewrite.python.migrate.FindUuModule
- Find deprecated
uumodule usage - The
uumodule was deprecated in Python 3.11 and removed in Python 3.13. Usebase64module instead for encoding binary data.
- Find deprecated
- org.openrewrite.python.migrate.FindXdrlibModule
- Find deprecated
xdrlibmodule usage - The
xdrlibmodule was deprecated in Python 3.11 and removed in Python 3.13. Usestructmodule for binary packing/unpacking.
- Find deprecated
- org.openrewrite.python.migrate.RemoveFutureImports
- Remove obsolete
__future__imports - Remove
from __future__ import ...statements for features that are enabled by default in Python 3.
- Remove obsolete
- org.openrewrite.python.migrate.ReplaceArrayFromstring
- Replace
array.fromstring()witharray.frombytes() - Replace
fromstring()withfrombytes()on array objects. The fromstring() method was deprecated in Python 3.2 and removed in 3.14.
- Replace
- org.openrewrite.python.migrate.ReplaceArrayTostring
- Replace
array.tostring()witharray.tobytes() - Replace
tostring()withtobytes()on array objects. The tostring() method was deprecated in Python 3.2 and removed in 3.14.
- Replace
- org.openrewrite.python.migrate.ReplaceCgiParseQs
- Replace
cgi.parse_qs()withurllib.parse.parse_qs() cgi.parse_qs()was removed in Python 3.8. Useurllib.parse.parse_qs()instead. Note: this rewrites call sites but does not manage imports. Use withChangeImportin a composite recipe to updatefromimports.
- Replace
- org.openrewrite.python.migrate.ReplaceCgiParseQsl
- Replace
cgi.parse_qsl()withurllib.parse.parse_qsl() cgi.parse_qsl()was removed in Python 3.8. Useurllib.parse.parse_qsl()instead. Note: this rewrites call sites but does not manage imports. Use withChangeImportin a composite recipe to updatefromimports.
- Replace
- org.openrewrite.python.migrate.ReplaceCollectionsAbcImports
- Replace
collectionsABC imports withcollections.abc - Migrate deprecated abstract base class imports from
collectionstocollections.abc. These imports were deprecated in Python 3.3 and removed in Python 3.10.
- Replace
- org.openrewrite.python.migrate.ReplaceConditionNotifyAll
- Replace
Condition.notifyAll()withCondition.notify_all() - Replace
notifyAll()method calls withnotify_all(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceElementGetchildren
- Replace
Element.getchildren()withlist(element) - Replace
getchildren()withlist(element)on XML Element objects. Deprecated in Python 3.9.
- Replace
- org.openrewrite.python.migrate.ReplaceElementGetiterator
- Replace
Element.getiterator()withElement.iter() - Replace
getiterator()withiter()on XML Element objects. The getiterator() method was deprecated in Python 3.9.
- Replace
- org.openrewrite.python.migrate.ReplaceEventIsSet
- Replace
Event.isSet()withEvent.is_set() - Replace
isSet()method calls withis_set(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceHtmlParserUnescape
- Replace
HTMLParser.unescape()withhtml.unescape() HTMLParser.unescape()was removed in Python 3.9. Usehtml.unescape()instead.
- Replace
- org.openrewrite.python.migrate.ReplacePercentFormatWithFString
- Replace
%formatting with f-string - Replace
"..." % (...)expressions with f-strings (Python 3.6+). Only converts%sand%rspecifiers where the format string is a literal and the conversion is safe.
- Replace
- org.openrewrite.python.migrate.ReplacePlatformPopen
- Replace
platform.popen()withsubprocess.check_output() platform.popen()was removed in Python 3.8. Usesubprocess.check_output(cmd, shell=True)instead. Note: this rewrites call sites but does not manage imports.
- Replace
- org.openrewrite.python.migrate.ReplaceReTemplate
- Replace
re.template()withre.compile()and flagre.TEMPLATE/re.T re.template()was deprecated in Python 3.11 and removed in 3.13. Calls are auto-replaced withre.compile().re.TEMPLATE/re.Tflags have no direct replacement and are flagged for manual review.
- Replace
- org.openrewrite.python.migrate.ReplaceStrFormatWithFString
- Replace
str.format()with f-string - Replace
"...".format(...)calls with f-strings (Python 3.6+). Only converts cases where the format string is a literal and the conversion is safe.
- Replace
- org.openrewrite.python.migrate.ReplaceSysLastExcInfo
- Replace
sys.last_valuewithsys.last_excand flagsys.last_type/sys.last_traceback sys.last_type,sys.last_value, andsys.last_tracebackwere deprecated in Python 3.12.sys.last_valueis auto-replaced withsys.last_exc;sys.last_typeandsys.last_tracebackare flagged for manual review.
- Replace
- org.openrewrite.python.migrate.ReplaceTarfileFilemode
- Replace
tarfile.filemodewithstat.filemode tarfile.filemodewas removed in Python 3.8. Usestat.filemode()instead.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadGetName
- Replace
Thread.getName()withThread.name - Replace
getName()method calls with thenameproperty. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadIsAlive
- Replace
Thread.isAlive()withThread.is_alive() - Replace
isAlive()method calls withis_alive(). Deprecated in Python 3.1 and removed in 3.9.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadIsDaemon
- Replace
Thread.isDaemon()withThread.daemon - Replace
isDaemon()method calls with thedaemonproperty. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadSetDaemon
- Replace
Thread.setDaemon()withThread.daemon = ... - Replace
setDaemon()method calls withdaemonproperty assignment. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadSetName
- Replace
Thread.setName()withThread.name = ... - Replace
setName()method calls withnameproperty assignment. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadingActiveCount
- Replace
threading.activeCount()withthreading.active_count() - Replace
threading.activeCount()withthreading.active_count(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadingCurrentThread
- Replace
threading.currentThread()withthreading.current_thread() - Replace
threading.currentThread()withthreading.current_thread(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceTypingOptionalWithUnion
- Replace
typing.Optional[X]withX | None - PEP 604 introduced the
|operator for union types in Python 3.10. ReplaceOptional[X]with the more conciseX | Nonesyntax.
- Replace
- org.openrewrite.python.migrate.ReplaceTypingUnionWithPipe
- Replace
typing.Union[X, Y]withX | Y - PEP 604 introduced the
|operator for union types in Python 3.10. ReplaceUnion[X, Y, ...]with the more conciseX | Y | ...syntax.
- Replace
- org.openrewrite.python.migrate.UpgradeToPython310
- Upgrade to Python 3.10
- Migrate deprecated APIs and adopt new syntax for Python 3.10 compatibility. This includes adopting PEP 604 union type syntax (
X | Y) and other modernizations between Python 3.9 and 3.10.
- org.openrewrite.python.migrate.UpgradeToPython311
- Upgrade to Python 3.11
- Migrate deprecated and removed APIs for Python 3.11 compatibility. This includes handling removed modules, deprecated functions, and API changes between Python 3.10 and 3.11.
- org.openrewrite.python.migrate.UpgradeToPython312
- Upgrade to Python 3.12
- Migrate deprecated and removed APIs for Python 3.12 compatibility. This includes detecting usage of the removed
impmodule and other legacy modules that were removed in Python 3.12.
- org.openrewrite.python.migrate.UpgradeToPython313
- Upgrade to Python 3.13
- Migrate deprecated and removed APIs for Python 3.13 compatibility. This includes detecting usage of modules removed in PEP 594 ('dead batteries') and other API changes between Python 3.12 and 3.13.
- org.openrewrite.python.migrate.UpgradeToPython314
- Upgrade to Python 3.14
- Migrate deprecated and removed APIs for Python 3.14 compatibility. This includes replacing deprecated AST node types with
ast.Constantand other API changes between Python 3.13 and 3.14.
- org.openrewrite.python.migrate.UpgradeToPython38
- Upgrade to Python 3.8
- Migrate deprecated APIs and detect legacy patterns for Python 3.8 compatibility.
- org.openrewrite.python.migrate.UpgradeToPython39
- Upgrade to Python 3.9
- Migrate deprecated APIs for Python 3.9 compatibility. This includes PEP 585 built-in generics, removed base64 functions, and deprecated XML Element methods.
- org.openrewrite.python.migrate.langchain.FindDeprecatedLangchainAgents
- Find deprecated LangChain agent patterns
- Find usage of deprecated LangChain agent patterns including
initialize_agent,AgentExecutor, andLLMChain. These were deprecated in LangChain v0.2 and removed in v1.0.
- org.openrewrite.python.migrate.langchain.FindLangchainCreateReactAgent
- Find
create_react_agentusage (replace withcreate_agent) - Find
from langgraph.prebuilt import create_react_agentwhich should be replaced withfrom langchain.agents import create_agentin LangChain v1.0.
- Find
- org.openrewrite.python.migrate.langchain.ReplaceLangchainClassicImports
- Replace
langchainlegacy imports withlangchain_classic - Migrate legacy chain, retriever, and indexing imports from
langchaintolangchain_classic. These were moved in LangChain v1.0.
- Replace
- org.openrewrite.python.migrate.langchain.ReplaceLangchainCommunityImports
- Replace
langchainimports withlangchain_community - Migrate third-party integration imports from
langchaintolangchain_community. These integrations were moved in LangChain v0.2.
- Replace
- org.openrewrite.python.migrate.langchain.ReplaceLangchainProviderImports
- Replace
langchain_communityimports with provider packages - Migrate provider-specific imports from
langchain_communityto dedicated provider packages likelangchain_openai,langchain_anthropic, etc.
- Replace
- org.openrewrite.python.migrate.langchain.UpgradeToLangChain02
- Upgrade to LangChain 0.2
- Migrate to LangChain 0.2 by updating imports from
langchaintolangchain_communityand provider-specific packages.
- org.openrewrite.python.migrate.langchain.UpgradeToLangChain1
- Upgrade to LangChain 1.0
- Migrate to LangChain 1.0 by applying all v0.2 migrations and then moving legacy functionality to
langchain_classic.
quarkus
53 recipes
- org.openrewrite.quarkus.spring.AddSpringCompatibilityExtensions
- Add Spring compatibility extensions for commonly used annotations
- Adds Quarkus Spring compatibility extensions when Spring annotations are detected in the codebase.
- org.openrewrite.quarkus.spring.ConfigureNativeBuild
- Configure Quarkus Native Build Support
- Adds configuration and dependencies required for Quarkus native image compilation with GraalVM. Includes native profile configuration and reflection hints where needed.
- org.openrewrite.quarkus.spring.CustomizeQuarkusPluginGoals
- Customize Quarkus Maven Plugin Goals
- Allows customization of Quarkus Maven plugin goals. Adds or modifies the executions and goals for the quarkus-maven-plugin.
- org.openrewrite.quarkus.spring.CustomizeQuarkusVersion
- Customize Quarkus BOM Version
- Allows customization of the Quarkus BOM version used in the migration. By default uses 3.x (latest 3.x version), but can be configured to use a specific version.
- org.openrewrite.quarkus.spring.DerbyDriverToQuarkus
- Replace Derby driver with Quarkus JDBC Derby
- Migrates
org.apache.derby:derbyorderbyclienttoio.quarkus:quarkus-jdbc-derby(excludes test scope).
- org.openrewrite.quarkus.spring.DerbyTestDriverToQuarkus
- Replace Derby test driver with Quarkus JDBC Derby (test scope)
- Migrates
org.apache.derby:derbywith test scope toio.quarkus:quarkus-jdbc-derbywith test scope.
- org.openrewrite.quarkus.spring.EnableAnnotationsToQuarkusDependencies
- Migrate
@EnableXyzannotations to Quarkus extensions - Removes Spring
@EnableXyzannotations and adds the corresponding Quarkus extensions as dependencies.
- Migrate
- org.openrewrite.quarkus.spring.H2DriverToQuarkus
- Replace H2 driver with Quarkus JDBC H2
- Migrates
com.h2database:h2toio.quarkus:quarkus-jdbc-h2(excludes test scope).
- org.openrewrite.quarkus.spring.H2TestDriverToQuarkus
- Replace H2 test driver with Quarkus JDBC H2 (test scope)
- Migrates
com.h2database:h2with test scope toio.quarkus:quarkus-jdbc-h2with test scope.
- org.openrewrite.quarkus.spring.MigrateBootStarters
- Replace Spring Boot starter dependencies with Quarkus equivalents
- Migrates Spring Boot starter dependencies to their Quarkus equivalents, removing version tags as Quarkus manages versions through its BOM.
- org.openrewrite.quarkus.spring.MigrateConfigurationProperties
- Migrate @ConfigurationProperties to Quarkus @ConfigMapping
- Migrates Spring Boot @ConfigurationProperties to Quarkus @ConfigMapping. This recipe converts configuration property classes to the native Quarkus pattern.
- org.openrewrite.quarkus.spring.MigrateDatabaseDrivers
- Migrate database drivers to Quarkus JDBC extensions
- Replaces Spring Boot database driver dependencies with their Quarkus JDBC extension equivalents.
- org.openrewrite.quarkus.spring.MigrateEntitiesToPanache
- Migrate JPA Entities to Panache Entities
- Converts standard JPA entities to Quarkus Panache entities using the Active Record pattern. Entities will extend PanacheEntity and gain built-in CRUD operations.
- org.openrewrite.quarkus.spring.MigrateMavenPlugin
- Add or replace Spring Boot build plugin with Quarkus build plugin
- Remove Spring Boot Maven plugin if present and add Quarkus Maven plugin using the same version as the quarkus-bom.
- org.openrewrite.quarkus.spring.MigrateRequestParameterEdgeCases
- Migrate Additional Spring Web Parameter Annotations
- Migrates additional Spring Web parameter annotations not covered by the main WebToJaxRs recipe. Includes @MatrixVariable, @CookieValue, and other edge cases.
- org.openrewrite.quarkus.spring.MigrateSpringActuator
- Migrate Spring Boot Actuator to Quarkus Health and Metrics
- Migrates Spring Boot Actuator to Quarkus SmallRye Health and Metrics extensions. Converts HealthIndicator implementations to Quarkus HealthCheck pattern.
- org.openrewrite.quarkus.spring.MigrateSpringBootDevTools
- Remove Spring Boot DevTools
- Removes Spring Boot DevTools dependency and configuration. Quarkus has built-in dev mode with hot reload that replaces DevTools functionality.
- org.openrewrite.quarkus.spring.MigrateSpringCloudConfig
- Migrate Spring Cloud Config Client to Quarkus Config
- Migrates Spring Cloud Config Client to Quarkus configuration sources. Converts bootstrap.yml/properties patterns to Quarkus config.
- org.openrewrite.quarkus.spring.MigrateSpringCloudServiceDiscovery
- Migrate Spring Cloud Service Discovery to Quarkus
- Migrates Spring Cloud Service Discovery annotations and configurations to Quarkus equivalents. Converts @EnableDiscoveryClient and related patterns to Quarkus Stork service discovery.
- org.openrewrite.quarkus.spring.MigrateSpringDataMongodb
- Migrate Spring Data MongoDB to Quarkus Panache MongoDB
- Migrates Spring Data MongoDB repositories to Quarkus MongoDB with Panache. Converts MongoRepository interfaces to PanacheMongoRepository pattern.
- org.openrewrite.quarkus.spring.MigrateSpringEvents
- Migrate Spring Events to CDI Events
- Migrates Spring's event mechanism to CDI events. Converts ApplicationEventPublisher to CDI Event and @EventListener to @Observes.
- org.openrewrite.quarkus.spring.MigrateSpringTesting
- Migrate Spring Boot Testing to Quarkus Testing
- Migrates Spring Boot test annotations and utilities to Quarkus test equivalents. Converts @SpringBootTest to @QuarkusTest, @MockBean to @InjectMock, etc.
- org.openrewrite.quarkus.spring.MigrateSpringTransactional
- Migrate Spring @Transactional to Jakarta @Transactional
- Migrates Spring's @Transactional annotation to Jakarta's @Transactional. Maps propagation attributes to TxType and removes Spring-specific attributes.
- org.openrewrite.quarkus.spring.MigrateSpringValidation
- Migrate Spring Validation to Quarkus
- Migrates Spring Boot validation to Quarkus Hibernate Validator. Adds the quarkus-hibernate-validator dependency and handles validation annotation imports.
- org.openrewrite.quarkus.spring.SpringBootActiveMQToQuarkus
- Replace Spring Boot ActiveMQ with Quarkus Artemis JMS
- Migrates
spring-boot-starter-activemqtoquarkus-artemis-jms.
- org.openrewrite.quarkus.spring.SpringBootActuatorToQuarkus
- Replace Spring Boot Actuator with Quarkus SmallRye Health
- Migrates
spring-boot-starter-actuatortoquarkus-smallrye-health.
- org.openrewrite.quarkus.spring.SpringBootAmqpToQuarkusClassic
- Replace Spring Boot AMQP with Quarkus Messaging RabbitMQ
- Migrates
spring-boot-starter-amqptoquarkus-messaging-rabbitmqwhen no reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringBootAmqpToQuarkusReactive
- Replace Spring Boot AMQP with Quarkus Messaging AMQP
- Migrates
spring-boot-starter-amqptoquarkus-messaging-amqpwhen reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringBootArtemisToQuarkus
- Replace Spring Boot Artemis with Quarkus Artemis JMS
- Migrates
spring-boot-starter-artemistoquarkus-artemis-jms.
- org.openrewrite.quarkus.spring.SpringBootBatchToQuarkus
- Replace Spring Boot Batch with Quarkus Scheduler
- Migrates
spring-boot-starter-batchtoquarkus-scheduler.
- org.openrewrite.quarkus.spring.SpringBootCacheToQuarkus
- Replace Spring Boot Cache with Quarkus Cache
- Migrates
spring-boot-starter-cachetoquarkus-cache.
- org.openrewrite.quarkus.spring.SpringBootDataJpaToQuarkus
- Replace Spring Boot Data JPA with Quarkus Hibernate ORM Panache
- Migrates
spring-boot-starter-data-jpatoquarkus-hibernate-orm-panache.
- org.openrewrite.quarkus.spring.SpringBootDataMongoToQuarkus
- Replace Spring Boot Data MongoDB with Quarkus MongoDB Panache
- Migrates
spring-boot-starter-data-mongodbtoquarkus-mongodb-panache.
- org.openrewrite.quarkus.spring.SpringBootDataRedisToQuarkus
- Replace Spring Boot Data Redis with Quarkus Redis Client
- Migrates
spring-boot-starter-data-redistoquarkus-redis-client.
- org.openrewrite.quarkus.spring.SpringBootDataRestToQuarkus
- Replace Spring Boot Data REST with Quarkus REST
- Migrates
spring-boot-starter-data-resttoquarkus-rest-jackson.
- org.openrewrite.quarkus.spring.SpringBootElasticsearchToQuarkus
- Replace Spring Boot Elasticsearch with Quarkus Elasticsearch REST Client
- Migrates
spring-boot-starter-data-elasticsearchtoquarkus-elasticsearch-rest-client.
- org.openrewrite.quarkus.spring.SpringBootIntegrationToQuarkus
- Replace Spring Boot Integration with Camel Quarkus
- Migrates
spring-boot-starter-integrationtocamel-quarkus-core.
- org.openrewrite.quarkus.spring.SpringBootJdbcToQuarkus
- Replace Spring Boot JDBC with Quarkus Agroal
- Migrates
spring-boot-starter-jdbctoquarkus-agroal.
- org.openrewrite.quarkus.spring.SpringBootMailToQuarkus
- Replace Spring Boot Mail with Quarkus Mailer
- Migrates
spring-boot-starter-mailtoquarkus-mailer.
- org.openrewrite.quarkus.spring.SpringBootOAuth2ClientToQuarkus
- Replace Spring Boot OAuth2 Client with Quarkus OIDC Client
- Migrates spring-boot-starter-oauth2-client
toquarkus-oidc-client`.
- org.openrewrite.quarkus.spring.SpringBootOAuth2ResourceServerToQuarkus
- Replace Spring Boot OAuth2 Resource Server with Quarkus OIDC
- Migrates
spring-boot-starter-oauth2-resource-servertoquarkus-oidc.
- org.openrewrite.quarkus.spring.SpringBootQuartzToQuarkus
- Replace Spring Boot Quartz with Quarkus Quartz
- Migrates
spring-boot-starter-quartztoquarkus-quartz.
- org.openrewrite.quarkus.spring.SpringBootSecurityToQuarkus
- Replace Spring Boot Security with Quarkus Security
- Migrates
spring-boot-starter-securitytoquarkus-security.
- org.openrewrite.quarkus.spring.SpringBootTestToQuarkus
- Replace Spring Boot Test with Quarkus JUnit 5
- Migrates
spring-boot-starter-testtoquarkus-junit5.
- org.openrewrite.quarkus.spring.SpringBootThymeleafToQuarkus
- Replace Spring Boot Thymeleaf with Quarkus Qute
- Migrates
spring-boot-starter-thymeleaftoquarkus-qute.
- org.openrewrite.quarkus.spring.SpringBootToQuarkus
- Migrate Spring Boot to Quarkus
- Replace Spring Boot with Quarkus.
- org.openrewrite.quarkus.spring.SpringBootValidationToQuarkus
- Replace Spring Boot Validation with Quarkus Hibernate Validator
- Migrates
spring-boot-starter-validationtoquarkus-hibernate-validator.
- org.openrewrite.quarkus.spring.SpringBootWebFluxToQuarkusReactive
- Replace Spring Boot WebFlux with Quarkus REST Client
- Migrates
spring-boot-starter-webfluxtoquarkus-rest-client-jacksonwhen reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringBootWebSocketToQuarkus
- Replace Spring Boot WebSocket with Quarkus WebSockets
- Migrates
spring-boot-starter-websockettoquarkus-websockets.
- org.openrewrite.quarkus.spring.SpringBootWebToQuarkusClassic
- Replace Spring Boot Web with Quarkus RESTEasy Classic
- Migrates
spring-boot-starter-webtoquarkus-resteasy-jacksonwhen no reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringBootWebToQuarkusReactive
- Replace Spring Boot Web with Quarkus REST
- Migrates
spring-boot-starter-webtoquarkus-rest-jacksonwhen reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringKafkaToQuarkusClassic
- Replace Spring Kafka with Quarkus Kafka Client
- Migrates
spring-kafkatoquarkus-kafka-clientwhen no reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringKafkaToQuarkusReactive
- Replace Spring Kafka with Quarkus Messaging Kafka
- Migrates
spring-kafkatoquarkus-messaging-kafkawhen reactor dependencies are present.
quartz
1 recipe
- org.openrewrite.quarkus.spring.SpringBootQuartzToQuarkus
- Replace Spring Boot Quartz with Quarkus Quartz
- Migrates
spring-boot-starter-quartztoquarkus-quartz.
ra
3 recipes
- com.oracle.weblogic.rewrite.WebLogicRaXmlNamespace1412
- Migrate xmlns entries in
weblogic-ra.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Resource Adapter schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicRaXmlNamespace1511
- Migrate xmlns entries in
weblogic-ra.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-ra.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxRaXmlToJakarta9RaXml
- Migrate xmlns entries in
ra.xmlfiles (Connectors). - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
rabbitmq
1 recipe
- org.openrewrite.quarkus.spring.SpringBootAmqpToQuarkusClassic
- Replace Spring Boot AMQP with Quarkus Messaging RabbitMQ
- Migrates
spring-boot-starter-amqptoquarkus-messaging-rabbitmqwhen no reactor dependencies are present.
rdbms
2 recipes
- com.oracle.weblogic.rewrite.WebLogicRdbmsJarXmlNamespace1412
- Migrate xmlns entries in
weblogic-rdbms-jar.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic EJB 3.2 RDBMS schema files to WebLogic 14.1.2
- Tags: rdbms-jar
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicRdbmsJarXmlNamespace1511
- Migrate xmlns entries in
weblogic-rdbms-jar.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-rdbms-jar.xmlfiles to WebLogic 15.1.1 - Tags: rdbms-jar
- Migrate xmlns entries in
RDS
4 recipes
- org.openrewrite.terraform.aws.UpgradeAwsAuroraMySqlToV3
- Upgrade AWS Aurora MySQL to version 3 (MySQL 8.0)
- Upgrade
engine_versionto Aurora MySQL version 3 (MySQL 8.0 compatible) onaws_rds_clusterresources and setallow_major_version_upgrade = trueto permit the major version change.
- org.openrewrite.terraform.aws.UpgradeAwsAuroraPostgresToV17
- Upgrade AWS Aurora PostgreSQL to 17
- Upgrade
engine_versionto Aurora PostgreSQL 17 onaws_rds_clusterresources and setallow_major_version_upgrade = trueto permit the major version change.
- org.openrewrite.terraform.aws.UpgradeAwsRdsMySqlToV8_4
- Upgrade AWS RDS MySQL to 8.4
- Upgrade
engine_versionto MySQL 8.4 onaws_db_instanceresources and setallow_major_version_upgrade = trueto permit the major version change.
- org.openrewrite.terraform.aws.UpgradeAwsRdsPostgresToV17
- Upgrade AWS RDS PostgreSQL to 17
- Upgrade
engine_versionto PostgreSQL 17 onaws_db_instanceresources and setallow_major_version_upgrade = trueto permit the major version change.
re
1 recipe
- org.openrewrite.python.migrate.ReplaceReTemplate
- Replace
re.template()withre.compile()and flagre.TEMPLATE/re.T re.template()was deprecated in Python 3.11 and removed in 3.13. Calls are auto-replaced withre.compile().re.TEMPLATE/re.Tflags have no direct replacement and are flagged for manual review.
- Replace
reactive
4 recipes
- org.openrewrite.quarkus.spring.SpringBootAmqpToQuarkusReactive
- Replace Spring Boot AMQP with Quarkus Messaging AMQP
- Migrates
spring-boot-starter-amqptoquarkus-messaging-amqpwhen reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringBootWebFluxToQuarkusReactive
- Replace Spring Boot WebFlux with Quarkus REST Client
- Migrates
spring-boot-starter-webfluxtoquarkus-rest-client-jacksonwhen reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringBootWebToQuarkusReactive
- Replace Spring Boot Web with Quarkus REST
- Migrates
spring-boot-starter-webtoquarkus-rest-jacksonwhen reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringKafkaToQuarkusReactive
- Replace Spring Kafka with Quarkus Messaging Kafka
- Migrates
spring-kafkatoquarkus-messaging-kafkawhen reactor dependencies are present.
reactor
2 recipes
- org.openrewrite.reactive.reactor.ReactorBestPractices
- Reactor Best Practices
- This recipe applies best practices for using Reactor.
- org.openrewrite.reactive.reactor.UpgradeReactor_3_5
- Migrate to Reactor 3.5
- Adopt to breaking changes in Reactor 3.5.
redis
1 recipe
- org.openrewrite.quarkus.spring.SpringBootDataRedisToQuarkus
- Replace Spring Boot Data Redis with Quarkus Redis Client
- Migrates
spring-boot-starter-data-redistoquarkus-redis-client.
redundancy
3 recipes
- OpenRewrite.Recipes.CodeQuality.Redundancy.FindUnusedInternalType
- Find internal types that may be unused
- Detect
internal(non-public) classes that may be unused. Review these types and remove them if they are no longer needed.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RedundancyCodeQuality
- Redundancy code quality
- Remove redundant code from C# sources.
- OpenRewrite.Recipes.CodeQuality.Redundancy.RemoveExplicitClassFromRecord
- Remove explicit 'class' from record
- Remove the redundant
classkeyword fromrecord classdeclarations. Records are reference types by default.
refactoring
1 recipe
- org.openrewrite.java.migrate.lang.UseVar
- Use local variable type inference
- Apply local variable type inference (
var) for primitives and objects. These recipes can cause unused imports, be advised to run `org.openrewrite.java.RemoveUnusedImports afterwards.
reflection
2 recipes
- OpenRewrite.Recipes.Net10.FindMakeGenericSignatureType
- Find
Type.MakeGenericSignatureTypevalidation change - Finds calls to
Type.MakeGenericSignatureType()which now validates that the first argument is a generic type definition in .NET 10.
- Find
- OpenRewrite.Recipes.Net6.FindAssemblyCodeBase
- Find
Assembly.CodeBase/EscapedCodeBaseusage (SYSLIB0012) - Finds usages of
Assembly.CodeBaseandAssembly.EscapedCodeBasewhich are obsolete (SYSLIB0012). UseAssembly.Locationinstead.
- Find
regex
1 recipe
- OpenRewrite.Recipes.Net8.FindRegexCompileToAssembly
- Find
Regex.CompileToAssemblyusage (SYSLIB0052) - Finds usage of
Regex.CompileToAssembly()andRegexCompilationInfo. These are obsolete in .NET 8 (SYSLIB0052). Use the Regex source generator instead.
- Find
resource
2 recipes
- com.oracle.weblogic.rewrite.WebLogicResourceDeploymentPlanXmlNamespace1412
- Migrate xmlns entries in
resource-deployment-plan.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Resource Deployment Plan schema files to WebLogic 14.1.2
- Tags: resource-deployment-plan
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicResourceDeploymentPlanXmlNamespace1511
- Migrate xmlns entries in
resource-deployment-plan.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inresource-deployment-plan.xmlfiles to WebLogic 15.1.1 - Tags: resource-deployment-plan
- Migrate xmlns entries in
rest
1 recipe
- org.openrewrite.quarkus.spring.SpringBootDataRestToQuarkus
- Replace Spring Boot Data REST with Quarkus REST
- Migrates
spring-boot-starter-data-resttoquarkus-rest-jackson.
richfaces
3 recipes
- io.moderne.java.jsf.MigrateToJsf_2_3
- Migrate to JSF 2.3
- Complete migration to JSF 2.3, including associated technologies like RichFaces. Updates dependencies, transforms XHTML views, and migrates Java APIs.
- io.moderne.java.jsf.richfaces.MigrateRichFaces_4_5
- Migrate RichFaces 3.x to 4.5
- Complete RichFaces 3.x to 4.5 migration including tag renames, attribute migrations, and Java API updates.
- io.moderne.java.jsf.richfaces.update45.UpdateXHTMLTags
- Migrate RichFaces tags in
xhtmlfiles - Migrate RichFaces tags in
xhtmlfiles to RichFaces 4.
- Migrate RichFaces tags in
routing
1 recipe
- OpenRewrite.Recipes.AspNetCore3.FindUseMvcOrUseSignalR
- Find UseMvc()/UseSignalR() calls
- Flags
UseMvc()andUseSignalR()calls that should be replaced with endpoint routing (UseRouting()+UseEndpoints()) in ASP.NET Core 3.0.
RSPEC
215 recipes
- org.openrewrite.cobol.cleanup.RemoveWithDebuggingMode
- Remove with debugging mode
- Remove debugging mode from SOURCE-COMPUTER paragraphs.
- Tags: RSPEC-4057
- org.openrewrite.java.RemoveUnusedImports
- Remove unused imports
- Remove imports for types that are not referenced. As a precaution against incorrect changes no imports will be removed from any source where unknown types are referenced.
- Tags: RSPEC-S1128
- org.openrewrite.java.format.EmptyNewlineAtEndOfFile
- End files with a single newline
- Some tools work better when files end with an empty line.
- Tags: RSPEC-S113
- org.openrewrite.java.format.WrappingAndBraces
- Wrapping and braces
- Format line wraps and braces in Java code.
- Tags: RSPEC-S121, RSPEC-S2681, RSPEC-S3972, RSPEC-S3973
- org.openrewrite.java.logging.ParameterizedLogging
- Parameterize logging statements
- Transform logging statements using concatenation for messages and variables into a parameterized format. For example,
logger.info("hi " + userName)becomeslogger.info("hi \{\}", userName). This can significantly boost performance for messages that otherwise would be assembled with String concatenation. Particularly impactful when the log level is not enabled, as no work is done to assemble the message. - Tags: RSPEC-S2629, RSPEC-S3457
- org.openrewrite.java.logging.slf4j.LoggersNamedForEnclosingClass
- Loggers should be named for their enclosing classes
- Ensure
LoggerFactory#getLogger(Class)is called with the enclosing class as argument. - Tags: RSPEC-S3416
- org.openrewrite.java.logging.slf4j.ParameterizedLogging
- Parameterize SLF4J's logging statements
- Use SLF4J's parameterized logging, which can significantly boost performance for messages that otherwise would be assembled with String concatenation. Particularly impactful when the log level is not enabled, as no work is done to assemble the message.
- Tags: RSPEC-S2629
- org.openrewrite.java.migrate.guava.NoGuavaCreateTempDir
- Prefer
Files#createTempDirectory() - Replaces Guava
Files#createTempDir()with JavaFiles#createTempDirectory(..). Transformations are limited to scopes throwing or catchingjava.io.IOException. - Tags: RSPEC-S4738
- Prefer
- org.openrewrite.java.migrate.guava.NoGuavaOptionalFromJavaUtil
- Replace
com.google.common.base.Optional#fromJavaUtil(java.util.Optional)with argument - Replaces
com.google.common.base.Optional#fromJavaUtil(java.util.Optional)with argument. - Tags: RSPEC-S4738
- Replace
- org.openrewrite.java.migrate.guava.NoGuavaOptionalToJavaUtil
- Remove
com.google.common.base.Optional#toJavaUtil() - Remove calls to
com.google.common.base.Optional#toJavaUtil(). - Tags: RSPEC-S4738
- Remove
- org.openrewrite.java.migrate.guava.PreferJavaUtilFunction
- Prefer
java.util.function.Function - Prefer
java.util.function.Functioninstead of usingcom.google.common.base.Function. - Tags: RSPEC-S4738
- Prefer
- org.openrewrite.java.migrate.guava.PreferJavaUtilOptional
- Prefer
java.util.Optional - Prefer
java.util.Optionalinstead of usingcom.google.common.base.Optional. - Tags: RSPEC-S4738
- Prefer
- org.openrewrite.java.migrate.guava.PreferJavaUtilOptionalOrElseNull
- Prefer
java.util.Optional#orElse(null)overcom.google.common.base.Optional#orNull() - Replaces
com.google.common.base.Optional#orNull()withjava.util.Optional#orElse(null). - Tags: RSPEC-S4738
- Prefer
- org.openrewrite.java.migrate.guava.PreferJavaUtilOptionalOrSupplier
- Prefer
java.util.Optional#or(Supplier<T extends java.util.Optional<T>>) - Prefer
java.util.Optional#or(Supplier<T extends java.util.Optional<T>>)over `com.google.common.base.Optional#or(com.google.common.base.Optional). - Tags: RSPEC-S4738
- Prefer
- org.openrewrite.java.migrate.guava.PreferJavaUtilPredicate
- Prefer
java.util.function.Predicate - Prefer
java.util.function.Predicateinstead of usingcom.google.common.base.Predicate. - Tags: RSPEC-S4738
- Prefer
- org.openrewrite.java.migrate.guava.PreferJavaUtilSupplier
- Prefer
java.util.function.Supplier - Prefer
java.util.function.Supplierinstead of usingcom.google.common.base.Supplier. - Tags: RSPEC-S4738
- Prefer
- org.openrewrite.java.migrate.util.ReplaceStreamCollectWithToList
- Replace
Stream.collect(Collectors.toUnmodifiableList())withStream.toList() - Replace
Stream.collect(Collectors.toUnmodifiableList())with Java 16+Stream.toList(). Also replacesStream.collect(Collectors.toList())ifconvertToListis set totrue. - Tags: RSPEC-S6204
- Replace
- org.openrewrite.java.search.FindEmptyClasses
- Find empty classes
- Find empty classes without annotations that do not implement an interface or extend a class.
- Tags: RSPEC-S2094
- org.openrewrite.java.search.FindEmptyMethods
- Find methods with empty bodies
- Find methods with empty bodies and single public no arg constructors.
- Tags: RSPEC-S1186
- org.openrewrite.java.search.ResultOfMethodCallIgnored
- Result of method call ignored
- Find locations where the result of the method call is being ignored.
- Tags: RSPEC-S6809
- org.openrewrite.java.security.SecureRandom
- Secure random
- Use cryptographically secure Pseudo Random Number Generation in the "main" source set. Replaces instantiation of
java.util.Randomwithjava.security.SecureRandom. - Tags: RSPEC-S2245
- org.openrewrite.java.security.SecureRandomPrefersDefaultSeed
- SecureRandom seeds are not constant or predictable
- Remove
SecureRandom#setSeed(*)method invocations having constant or predictable arguments. - Tags: RSPEC-S4347
- org.openrewrite.java.security.UseFilesCreateTempDirectory
- Use
Files#createTempDirectory - Use
Files#createTempDirectorywhen the sequenceFile#createTempFile(..)->File#delete()->File#mkdir()is used for creating a temp directory. - Tags: RSPEC-S5445
- Use
- org.openrewrite.java.security.XmlParserXXEVulnerability
- XML parser XXE vulnerability
- Avoid exposing dangerous features of the XML parser by updating certain factory settings.
- Tags: RSPEC-S2755
- org.openrewrite.java.security.secrets.FindSecrets
- Find secrets
- Locates secrets stored in plain text in code.
- Tags: RSPEC-S6437
- org.openrewrite.java.spring.NoRequestMappingAnnotation
- Remove
@RequestMappingannotations - Replace method declaration
@RequestMappingannotations with@GetMapping,@PostMapping, etc. when possible. - Tags: RSPEC-S4488
- Remove
- org.openrewrite.java.testing.assertj.SimplifyChainedAssertJAssertion
- Simplify AssertJ chained assertions
- Many AssertJ chained assertions have dedicated assertions that function the same. It is best to use the dedicated assertions.
- Tags: RSPEC-S5838
- org.openrewrite.java.testing.cleanup.AssertionsArgumentOrder
- Assertion arguments should be passed in the correct order
- Assertions such as
org.junit.Assert.assertEqualsexpect the first argument to be the expected value and the second argument to be the actual value; fororg.testng.Assert, it’s the other way around. This recipe detectsJ.Literal,J.NewArray, andjava.util.Iterablearguments swapping them if necessary so that the error messages won't be confusing. - Tags: RSPEC-S3415
- org.openrewrite.java.testing.cleanup.RemoveEmptyTests
- Remove empty tests without comments
- Removes empty methods with a
@Testannotation if the body does not have comments. - Tags: RSPEC-S1186
- org.openrewrite.java.testing.cleanup.TestsShouldIncludeAssertions
- Include an assertion in tests
- For tests not having any assertions, wrap the statements with JUnit Jupiter's
Assertions#assertDoesNotThrow(..). - Tags: RSPEC-S2699
- org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic
- Remove
publicvisibility of JUnit 5 tests - Remove
publicand optionallyprotectedmodifiers from methods with@Test,@ParameterizedTest,@RepeatedTest,@TestFactory,@BeforeEach,@AfterEach,@BeforeAll, or@AfterAll. They no longer have to be public visibility to be usable by JUnit 5. - Tags: RSPEC-S5786
- Remove
- org.openrewrite.java.testing.junit5.AddMissingNested
- JUnit 5 inner test classes should be annotated with
@Nested - Adds
@Nestedto inner classes that contain JUnit 5 tests. - Tags: RSPEC-S5790
- JUnit 5 inner test classes should be annotated with
- org.openrewrite.java.testing.junit5.RemoveTryCatchFailBlocks
- Replace
fail()intry-catchblocks withAssertions.assertDoesNotThrow(() -> \{ ... \}) - Replace
try-catchblocks wherecatchmerely contains afail()forfail(String)statement withAssertions.assertDoesNotThrow(() -> \{ ... \}). - Tags: RSPEC-S3658
- Replace
- org.openrewrite.java.testing.mockito.SimplifyMockitoVerifyWhenGiven
- Call to Mockito method "verify", "when" or "given" should be simplified
- Fixes Sonar issue
java:S6068: Call to Mockito method "verify", "when" or "given" should be simplified. - Tags: RSPEC-6068
- org.openrewrite.kotlin.cleanup.EqualsMethodUsage
- Structural equality tests should use
==or!= - In Kotlin,
==means structural equality and!=structural inequality and both map to the left-side term’sequals()function. It is, therefore, redundant to callequals()as a function. Also,==and!=are more general thanequals()and!equals()because it allows either of both operands to benull. Developers usingequals()instead of==or!=is often the result of adapting styles from other languages like Java, where==means reference equality and!=means reference inequality. The==and!=operators are a more concise and elegant way to test structural equality than calling a function. - Tags: RSPEC-S6519
- Structural equality tests should use
- org.openrewrite.kotlin.cleanup.ImplicitParameterInLambda
itshouldn't be used as a lambda parameter nameitis a special identifier that allows you to refer to the current parameter being passed to a lambda expression without explicitly naming the parameter. Lambda expressions are a concise way of writing anonymous functions. Many lambda expressions have only one parameter, when this is true the compiler can determine the parameter type by context. Thus when using it with single parameter lambda expressions, you do not need to declare the type.- Tags: RSPEC-S6558
- org.openrewrite.maven.OrderPomElements
- Order POM elements
- Order POM elements according to the recommended order.
- Tags: RSPEC-S3423
- org.openrewrite.staticanalysis.AbstractClassPublicConstructor
- Constructors of an
abstractclass should not be declaredpublic - Constructors of
abstractclasses can only be called in constructors of their subclasses. Therefore the visibility ofpublicconstructors are reduced toprotected. - Tags: RSPEC-S5993
- Constructors of an
- org.openrewrite.staticanalysis.AddSerialVersionUidToSerializable
- Add
serialVersionUIDto aSerializableclass when missing - A
serialVersionUIDfield is strongly recommended in allSerializableclasses. If this is not defined on aSerializableclass, the compiler will generate this value. If a change is later made to the class, the generated value will change and attempts to deserialize the class will fail. - Tags: RSPEC-S2057
- Add
- org.openrewrite.staticanalysis.AtomicPrimitiveEqualsUsesGet
- Atomic Boolean, Integer, and Long equality checks compare their values
AtomicBoolean#equals(Object),AtomicInteger#equals(Object)andAtomicLong#equals(Object)are only equal to their instance. This recipe convertsa.equals(b)toa.get() == b.get().- Tags: RSPEC-S2204
- org.openrewrite.staticanalysis.AvoidBoxedBooleanExpressions
- Avoid boxed boolean expressions
- Under certain conditions the
java.lang.Booleantype is used as an expression, and it may throw aNullPointerExceptionif the value is null. - Tags: RSPEC-S5411
- org.openrewrite.staticanalysis.BigDecimalDoubleConstructorRecipe
new BigDecimal(double)should not be used- Use of
new BigDecimal(double)constructor can lead to loss of precision. UseBigDecimal.valueOf(double)instead. For example writingnew BigDecimal(0.1)does not create aBigDecimalwhich is exactly equal to0.1, but it is equal to0.1000000000000000055511151231257827021181583404541015625. This is because0.1cannot be represented exactly as a double (or, for that matter, as a binary fraction of any finite length). - Tags: RSPEC-S2111
- org.openrewrite.staticanalysis.BigDecimalRoundingConstantsToEnums
BigDecimalrounding constants toRoundingModeenums- Convert
BigDecimalrounding constants to the equivalentRoundingModeenum. - Tags: RSPEC-S2111
- org.openrewrite.staticanalysis.BooleanChecksNotInverted
- Boolean checks should not be inverted
- Ensures that boolean checks are not unnecessarily inverted. Also fixes double negative boolean expressions.
- Tags: RSPEC-S1940
- org.openrewrite.staticanalysis.CaseInsensitiveComparisonsDoNotChangeCase
- CaseInsensitive comparisons do not alter case
- Remove
String#toLowerCase()orString#toUpperCase()fromString#equalsIgnoreCase(..)comparisons. - Tags: RSPEC-S1157
- org.openrewrite.staticanalysis.CatchClauseOnlyRethrows
- Catch clause should do more than just rethrow
- A
catchclause that only rethrows the caught exception is unnecessary. Letting the exception bubble up as normal achieves the same result with less code. - Tags: RSPEC-S2737
- org.openrewrite.staticanalysis.ChainStringBuilderAppendCalls
- Chain
StringBuilder.append()calls - String concatenation within calls to
StringBuilder.append()causes unnecessary memory allocation. Except for concatenations of String literals, which are joined together at compile time. Replaces inefficient concatenations with chained calls toStringBuilder.append(). - Tags: RSPEC-S3024
- Chain
- org.openrewrite.staticanalysis.CollectionToArrayShouldHaveProperType
- 'Collection.toArray()' should be passed an array of the proper type
- Using
Collection.toArray()without parameters returns anObject[], which requires casting. It is more efficient and clearer to useCollection.toArray(new T[0])instead. - Tags: RSPEC-S3020
- org.openrewrite.staticanalysis.CombineSemanticallyEqualCatchBlocks
- Combine semantically equal catch blocks
- Combine catches in a try that contain semantically equivalent blocks. No change will be made when a caught exception exists if combining catches may change application behavior or type attribution is missing.
- Tags: RSPEC-S2147
- org.openrewrite.staticanalysis.CommonDeclarationSiteTypeVariances
- Properly use declaration-site type variance for well-known types
- When using a method parameter like
Function<IN, OUT>, it should rather beFunction<? super IN, ? extends OUT>. This recipe checks for method parameters of well-known types. - Tags: RSPEC-S1217
- org.openrewrite.staticanalysis.CompareEnumsWithEqualityOperator
- Enum values should be compared with "=="
- Replaces
Enum equals(java.lang.Object)withEnum == java.lang.Object. An!Enum equals(java.lang.Object)will change to!=. - Tags: RSPEC-S4551
- org.openrewrite.staticanalysis.ControlFlowIndentation
- Control flow statement indentation
- Program flow control statements like
if,while, andforcan 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. - Tags: RSPEC-S2681
- org.openrewrite.staticanalysis.CovariantEquals
- Covariant equals
- Checks that classes and records which define a covariant
equals()method also override methodequals(Object). Covariantequals()means a method that is similar toequals(Object), but with a covariant parameter type (any subtype ofObject). - Tags: RSPEC-S2162
- org.openrewrite.staticanalysis.DefaultComesLast
- Default comes last
- Ensure the
defaultcase comes last after all the cases in a switch statement. - Tags: RSPEC-S4524
- org.openrewrite.staticanalysis.EmptyBlock
- Remove empty blocks
- Remove empty blocks that effectively do nothing.
- Tags: RSPEC-S108
- org.openrewrite.staticanalysis.EqualsAvoidsNull
- Equals avoids null
- Checks that any combination of String literals is on the left side of an
equals()comparison. Also checks for String literals assigned to some field (such assomeString.equals(anotherString = "text")). And removes redundant null checks in conjunction with equals comparisons. - Tags: RSPEC-S1132
- org.openrewrite.staticanalysis.ExplicitCharsetOnStringGetBytes
- Set charset encoding explicitly when calling
String#getBytes - This makes the behavior of the code platform neutral. It will not override any existing explicit encodings, even if they don't match the default encoding option.
- Tags: RSPEC-S4719
- Set charset encoding explicitly when calling
- org.openrewrite.staticanalysis.ExplicitInitialization
- Explicit initialization
- Checks if any class or object member is explicitly initialized to default for its type value: -
nullfor object references - zero for numeric types andchar- andfalseforbooleanRemoves explicit initializations where they aren't necessary. - Tags: RSPEC-S3052
- org.openrewrite.staticanalysis.ExplicitLambdaArgumentTypes
- Use explicit types on lambda arguments
- Adds explicit types on lambda arguments, which are otherwise optional. This can make the code clearer and easier to read. This does not add explicit types on arguments when the lambda has one or two parameters and does not have a block body, as things are considered more readable in those cases. For example,
stream.map((a, b) -> a.length);will not have explicit types added. - Tags: RSPEC-S2211
- org.openrewrite.staticanalysis.ExternalizableHasNoArgsConstructor
Externalizableclasses have no-arguments constructorExternalizableclasses handle both serialization and deserialization and must have a no-args constructor for the deserialization process.- Tags: RSPEC-S2060
- org.openrewrite.staticanalysis.FallThrough
- Fall through
- Checks for fall-through in switch statements, adding
breakstatements in locations where a case contains Java code but does not have abreak,return,throw, orcontinuestatement. - Tags: RSPEC-S128
- org.openrewrite.staticanalysis.FinalClass
- Finalize classes with private constructors
- Adds the
finalmodifier to classes that expose no public or package-private constructors. - Tags: RSPEC-S2974
- org.openrewrite.staticanalysis.FixStringFormatExpressions
- Fix
String#formatandString#formattedexpressions - Fix
String#formatandString#formattedexpressions by replacing\nnewline characters with%nand removing any unused arguments. Note this recipe is scoped to only transform format expressions which do not specify the argument index. - Tags: RSPEC-S3457
- Fix
- org.openrewrite.staticanalysis.ForLoopIncrementInUpdate
forloop counters incremented in update- The increment should be moved to the loop's increment clause if possible.
- Tags: RSPEC-S1994
- org.openrewrite.staticanalysis.HiddenField
- Hidden field
- Refactor local variables or parameters which shadow a field defined in the same class.
- Tags: RSPEC-S1117, RSPEC-S2387
- org.openrewrite.staticanalysis.HideUtilityClassConstructor
- Hide utility class constructor
- Ensures utility classes (classes containing only static methods or fields in their API) do not have a public constructor.
- Tags: RSPEC-S1118
- org.openrewrite.staticanalysis.IndexOfChecksShouldUseAStartPosition
- Use
indexOf(String, int) - Replaces
indexOf(String)in binary operations if the compared value is an int and not less than 1. - Tags: RSPEC-S2912
- Use
- org.openrewrite.staticanalysis.IndexOfReplaceableByContains
indexOf()replaceable bycontains()- Checking if a value is included in a
StringorListusingindexOf(value)>-1orindexOf(value)>=0can be replaced withcontains(value). - Tags: RSPEC-S2692
- org.openrewrite.staticanalysis.IndexOfShouldNotCompareGreaterThanZero
indexOfshould not compare greater than zero- Replaces
String#indexOf(String) > 0andList#indexOf(Object) > 0with>=1. CheckingindexOfagainst>0ignores the first element, whereas>-1is inclusive of the first element. For clarity,>=1is used, because>0and>=1are semantically equal. Using>0may appear to be a mistake with the intent of including all elements. If the intent is to check whether a value in included in aStringorList, theString#contains(String)orList#contains(Object)methods may be better options altogether. - Tags: RSPEC-S2692
- org.openrewrite.staticanalysis.InlineVariable
- Inline variable
- Inline variables when they are immediately used to return or throw. Supports both variable declarations and assignments to local variables.
- Tags: RSPEC-S1488
- org.openrewrite.staticanalysis.InstanceOfPatternMatch
- Changes code to use Java 17's
instanceofpattern matching - Adds pattern variables to
instanceofexpressions wherever the same (side effect free) expression is referenced in a corresponding type cast expression within the flow scope of theinstanceof. Currently, this recipe supportsifstatements and ternary operator expressions. - Tags: RSPEC-S6201
- Changes code to use Java 17's
- org.openrewrite.staticanalysis.InterruptedExceptionHandling
- Restore interrupted state in catch blocks
- When
InterruptedExceptionis caught,Thread.currentThread().interrupt()should be called to restore the thread's interrupted state. Failing to do so can suppress the interruption signal and prevent proper thread cancellation. - Tags: RSPEC-S2142
- org.openrewrite.staticanalysis.IsEmptyCallOnCollections
- Use
Collection#isEmpty()instead of comparingsize() - Also check for not
isEmpty()when testing for not equal to zero size. - Tags: RSPEC-S1155, RSPEC-S3981
- Use
- org.openrewrite.staticanalysis.LambdaBlockToExpression
- Simplify lambda blocks to expressions
- Single-line statement lambdas returning a value can be replaced with expression lambdas.
- Tags: RSPEC-S1602
- org.openrewrite.staticanalysis.LowercasePackage
- Rename packages to lowercase
- By convention all Java package names should contain only lowercase letters, numbers, and dashes. This recipe converts any uppercase letters in package names to be lowercase.
- Tags: RSPEC-S120
- org.openrewrite.staticanalysis.MemberNameCaseInsensitiveDuplicates
- Members should not have names differing only by capitalization
- Looking at the set of methods and fields in a class and all of its parents, no two members should have names that differ only in capitalization. This rule will not report if a method overrides a parent method.
- Tags: RSPEC-S1845
- org.openrewrite.staticanalysis.MethodNameCasing
- Standardize method name casing
- Fixes method names that do not follow standard naming conventions. For example,
String getFoo_bar()would be adjusted toString getFooBar()andint DoSomething()would be adjusted toint doSomething(). - Tags: RSPEC-S100
- org.openrewrite.staticanalysis.MinimumSwitchCases
switchstatements should have at least 3caseclausesswitchstatements are useful when many code paths branch depending on the value of a single expression. For just one or two code paths, the code will be more readable withifstatements.- Tags: RSPEC-S1301
- org.openrewrite.staticanalysis.MissingOverrideAnnotation
- Add missing
@Overrideto overriding and implementing methods - Adds
@Overrideto methods overriding superclass methods or implementing interface methods. Annotating methods improves readability by showing the author's intent to override. Additionally, when annotated, the compiler will emit an error when a signature of the overridden method does not match the superclass method. - Tags: RSPEC-S1161
- Add missing
- org.openrewrite.staticanalysis.ModifierOrder
- Modifier order
- Modifiers should be declared in the correct order as recommended by the JLS.
- Tags: RSPEC-S1124
- org.openrewrite.staticanalysis.MultipleVariableDeclarations
- No multiple variable declarations
- Places each variable declaration in its own statement and on its own line. Using one variable declaration per line encourages commenting and can increase readability.
- Tags: RSPEC-S1659
- org.openrewrite.staticanalysis.NeedBraces
- Fix missing braces
- Adds missing braces around code such as single-line
if,for,while, anddo-whileblock bodies. - Tags: RSPEC-S121
- org.openrewrite.staticanalysis.NestedEnumsAreNotStatic
- Nested enums are not static
- Remove static modifier from nested enum types since they are implicitly static.
- Tags: RSPEC-S2786
- org.openrewrite.staticanalysis.NewStringBuilderBufferWithCharArgument
- Change
StringBuilderandStringBuffercharacter constructor argument toString - Instantiating a
StringBuilderor aStringBufferwith aCharacterresults in theintrepresentation of the character being used for the initial size. - Tags: RSPEC-S1317
- Change
- org.openrewrite.staticanalysis.NoDoubleBraceInitialization
- No double brace initialization
- Replace
List,Map, andSetdouble brace initialization with an initialization block. - Tags: RSPEC-S1171, RSPEC-S3599
- org.openrewrite.staticanalysis.NoEmptyCollectionWithRawType
- Use
Collections#emptyList(),emptyMap(), andemptySet() - Replaces
Collections#EMPTY_...with methods that return generic types. - Tags: RSPEC-S1596
- Use
- org.openrewrite.staticanalysis.NoEqualityInForCondition
- Use comparison rather than equality checks in for conditions
- Testing for loop termination using an equality operator (
==and!=) is dangerous, because it could set up an infinite loop. Using a relational operator instead makes it harder to accidentally write an infinite loop. - Tags: RSPEC-S888
- org.openrewrite.staticanalysis.NoFinalizer
- Remove
finalize()method - Finalizers are deprecated. Use of
finalize()can lead to performance issues, deadlocks, hangs, and other undesirable behavior. - Tags: RSPEC-S1113
- Remove
- org.openrewrite.staticanalysis.NoPrimitiveWrappersForToStringOrCompareTo
- No primitive wrappers for #toString() or #compareTo(..)
- Primitive wrappers should not be instantiated only for
#toString()or#compareTo(..)invocations. - Tags: RSPEC-S1158
- org.openrewrite.staticanalysis.NoRedundantJumpStatements
- Jump statements should not be redundant
- Jump statements such as return and continue let you change the default flow of program execution, but jump statements that direct the control flow to the original direction are just a waste of keystrokes.
- Tags: RSPEC-S3626
- org.openrewrite.staticanalysis.NoToStringOnStringType
- Unnecessary
String#toString - Remove unnecessary
String#toStringinvocations on objects which are already a string. - Tags: RSPEC-S1858
- Unnecessary
- org.openrewrite.staticanalysis.NoValueOfOnStringType
- Unnecessary
String#valueOf(..) - Replace unnecessary
String#valueOf(..)method invocations with the argument directly. This occurs when the argument toString#valueOf(arg)is a string literal, such asString.valueOf("example"). Or, when theString#valueOf(..)invocation is used in a concatenation, such as"example" + String.valueOf("example"). - Tags: RSPEC-S1153
- Unnecessary
- org.openrewrite.staticanalysis.ObjectFinalizeCallsSuper
finalize()calls super- Overrides of
Object#finalize()should call super. - Tags: RSPEC-S1114
- org.openrewrite.staticanalysis.OnlyCatchDeclaredExceptions
- Replace
catch(Exception)with specific declared exceptions thrown in the try block - Replaces
catch(Exception e)blocks with a multi-catch block (catch (SpecificException1 | SpecificException2 e)) containing only the exceptions declared thrown by method or constructor invocations within thetryblock that are not already caught by more specificcatchclauses. - Tags: RSPEC-S2221
- Replace
- org.openrewrite.staticanalysis.PrimitiveWrapperClassConstructorToValueOf
- Use primitive wrapper
valueOfmethod - The constructor of all primitive types has been deprecated in favor of using the static factory method
valueOfavailable for each of the primitive type wrappers. - Tags: RSPEC-S2129
- Use primitive wrapper
- org.openrewrite.staticanalysis.ReferentialEqualityToObjectEquals
- Replace referential equality operators with Object equals method invocations when the operands both override
Object.equals(Object obj) - Using
==or!=compares object references, not the equality of two objects. This modifies code where both sides of a binary operation (==or!=) overrideObject.equals(Object obj)except when the comparison is within an overriddenObject.equals(Object obj)method declaration itself. The resulting transformation must be carefully reviewed since any modifications change the program's semantics. - Tags: RSPEC-S1698
- Replace referential equality operators with Object equals method invocations when the operands both override
- org.openrewrite.staticanalysis.RemoveCallsToObjectFinalize
- Remove
Object.finalize()invocations - Remove calls to
Object.finalize(). This method is called during garbage collection and calling it manually is misleading. - Tags: RSPEC-S1111
- Remove
- org.openrewrite.staticanalysis.RemoveCallsToSystemGc
- Remove garbage collection invocations
- Removes calls to
System.gc()andRuntime.gc(). When to invoke garbage collection is best left to the JVM. - Tags: RSPEC-S1215
- org.openrewrite.staticanalysis.RemoveExtraSemicolons
- Remove extra semicolons
- Removes not needed semicolons. Semicolons are considered not needed: * Optional semicolons at the end of try-with-resources, * after the last enum value if no field or method is defined, * no statement between two semicolon.
- Tags: RSPEC-S1116, RSPEC-S2959
- org.openrewrite.staticanalysis.RemoveHashCodeCallsFromArrayInstances
hashCode()should not be called on array instances- Replace
hashCode()calls on arrays withArrays.hashCode()because the results fromhashCode()are not helpful. - Tags: RSPEC-S2116
- org.openrewrite.staticanalysis.RemoveRedundantNullCheckBeforeInstanceof
- Remove redundant null checks before instanceof
- Removes redundant null checks before instanceof operations since instanceof returns false for null.
- Tags: RSPEC-S1697
- org.openrewrite.staticanalysis.RemoveRedundantTypeCast
- Remove redundant casts
- Removes unnecessary type casts. Does not currently check casts in lambdas and class constructors.
- Tags: RSPEC-S1905
- org.openrewrite.staticanalysis.RemoveSystemOutPrintln
- Remove
System.out#printlnstatements - Print statements are often left accidentally after debugging an issue. This recipe removes all
System.out#printlnandSystem.err#printlnstatements from the code. - Tags: RSPEC-S106
- Remove
- org.openrewrite.staticanalysis.RemoveToStringCallsFromArrayInstances
- Remove
toString()calls on arrays - The result from
toString()calls on arrays is largely useless. The output does not actually reflect the contents of the array.Arrays.toString(array)should be used instead as it gives the contents of the array. - Tags: RSPEC-S2116
- Remove
- org.openrewrite.staticanalysis.RemoveUnneededBlock
- Remove unneeded block
- Flatten blocks into inline statements when possible.
- Tags: RSPEC-S1199
- org.openrewrite.staticanalysis.RemoveUnusedLocalVariables
- Remove unused local variables
- If a local variable is declared but not used, it is dead code and should be removed.
- Tags: RSPEC-S1481
- org.openrewrite.staticanalysis.RemoveUnusedPrivateFields
- Remove unused private fields
- If a private field is declared but not used in the program, it can be considered dead code and should therefore be removed.
- Tags: RSPEC-S1068
- org.openrewrite.staticanalysis.RemoveUnusedPrivateMethods
- Remove unused private methods
privatemethods that are never executed are dead code and should be removed.- Tags: RSPEC-S1144
- org.openrewrite.staticanalysis.RenameLocalVariablesToCamelCase
- Reformat local variable names to camelCase
- Reformat local variable and method parameter names to camelCase to comply with Java naming convention. The recipe will not rename variables declared in for loop controls or catches with a single character. The first character is set to lower case and existing capital letters are preserved. Special characters that are allowed in java field names
$and_are removed (unless the name starts with one). If a special character is removed the next valid alphanumeric will be capitalized. Currently, does not support renaming members of classes. The recipe will not rename a variable if the result already exists in the class, conflicts with a java reserved keyword, or the result is blank. - Tags: RSPEC-S117
- org.openrewrite.staticanalysis.RenameMethodsNamedHashcodeEqualOrToString
- Rename methods named
hashcode,equal, ortostring - Methods should not be named
hashcode,equal, ortostring. Any of these are confusing as they appear to be intended as overridden methods from theObjectbase class, despite being case-insensitive. - Tags: RSPEC-S1221
- Rename methods named
- org.openrewrite.staticanalysis.RenamePrivateFieldsToCamelCase
- Reformat private field names to camelCase
- Reformat private field names to camelCase to comply with Java naming convention. The recipe will not rename fields with default, protected or public access modifiers. The recipe will not rename private constants. The first character is set to lower case and existing capital letters are preserved. Special characters that are allowed in java field names
$and_are removed. If a special character is removed the next valid alphanumeric will be capitalized. The recipe will not rename a field if the result already exists in the class, conflicts with a java reserved keyword, or the result is blank. - Tags: RSPEC-S116, RSPEC-S3008
- org.openrewrite.staticanalysis.ReplaceClassIsInstanceWithInstanceof
- Replace
A.class.isInstance(a)witha instanceof A - There should be no
A.class.isInstance(a), it should be replaced bya instanceof A. - Tags: RSPEC-S6202
- Replace
- org.openrewrite.staticanalysis.ReplaceDuplicateStringLiterals
- Replace duplicate
Stringliterals - Replaces
Stringliterals with a length of 5 or greater repeated a minimum of 3 times. QualifiedStringliterals include final Strings, method invocations, and new class invocations. Adds a newprivate static final Stringor uses an existing equivalent class field. A new variable name will be generated based on the literal value if an existing field does not exist. The generated name will append a numeric value to the variable name if a name already exists in the compilation unit. - Tags: RSPEC-S1192, RSPEC-S1889
- Replace duplicate
- org.openrewrite.staticanalysis.ReplaceLambdaWithMethodReference
- Use method references in lambda
- Replaces the single statement lambdas
o -> o instanceOf X,o -> (A) o,o -> System.out.println(o),o -> o != null,o -> o == nullwith the equivalent method reference. - Tags: RSPEC-S1612
- org.openrewrite.staticanalysis.ReplaceStackWithDeque
- Replace
java.util.Stackwithjava.util.Deque - From the Javadoc of
Stack: > A more complete and consistent set of LIFO stack operations is provided by the Deque interface and its implementations, which should be used in preference to this class. - Tags: RSPEC-S1149
- Replace
- org.openrewrite.staticanalysis.ReplaceStringConcatenationWithStringValueOf
- Replace String concatenation with
String.valueOf() - Replace inefficient string concatenation patterns like
"" + ...withString.valueOf(...). This improves code readability and may have minor performance benefits. - Tags: RSPEC-S1153
- Replace String concatenation with
- org.openrewrite.staticanalysis.ReplaceTextBlockWithString
- Replace text block with regular string
- Replace text block with a regular multi-line string.
- Tags: RSPEC-S5663
- org.openrewrite.staticanalysis.ReplaceThreadRunWithThreadStart
- Replace calls to
Thread.run()withThread.start() Thread.run()should not be called directly.- Tags: RSPEC-S1217
- Replace calls to
- org.openrewrite.staticanalysis.ReplaceWeekYearWithYear
- Week Year (YYYY) should not be used for date formatting
- For most dates Week Year (YYYY) and Year (yyyy) yield the same results. However, on the last week of December and the first week of January, Week Year could produce unexpected results.
- Tags: RSPEC-S3986
- org.openrewrite.staticanalysis.SimplifyArraysAsList
- Simplify
Arrays.asList(..)with varargs - Simplifies
Arrays.asList()method calls that use explicit array creation to use varargs instead. For example,Arrays.asList(new String[]\{"a", "b", "c"\})becomesArrays.asList("a", "b", "c"). - Tags: RSPEC-S3878
- Simplify
- org.openrewrite.staticanalysis.SimplifyBooleanExpression
- Simplify boolean expression
- Checks for overly complicated boolean expressions, such as
if (b == true),b || true,!false, etc. - Tags: RSPEC-S1125
- org.openrewrite.staticanalysis.SimplifyBooleanExpressionWithDeMorgan
- Simplify boolean expressions using De Morgan's laws
- Applies De Morgan's laws to simplify boolean expressions with negation. Transforms
!(a && b)to!a || !band!(a || b)to!a && !b. - Tags: RSPEC-S1125
- org.openrewrite.staticanalysis.SimplifyBooleanReturn
- Simplify boolean return
- Simplifies Boolean expressions by removing redundancies. For example,
a && truesimplifies toa. - Tags: RSPEC-S1126
- org.openrewrite.staticanalysis.SimplifyConstantIfBranchExecution
- Simplify constant if branch execution
- Checks for if expressions that are always
trueorfalseand simplifies them. - Tags: RSPEC-S6646
- org.openrewrite.staticanalysis.SimplifyTernaryRecipes
- Simplify ternary expressions
- Simplifies various types of ternary expressions to improve code readability.
- Tags: RSPEC-S1125
- org.openrewrite.staticanalysis.StaticMethodNotFinal
- Static methods need not be final
- Static methods do not need to be declared final because they cannot be overridden.
- Tags: RSPEC-S2333
- org.openrewrite.staticanalysis.StringLiteralEquality
- Use
String.equals()onStringliterals String.equals()should be used when checking value equality on String literals. Using==or!=compares object references, not the actual value of the Strings. This only modifies code where at least one side of the binary operation (==or!=) is a String literal, such as"someString" == someVariable;. This is to prevent inadvertently changing code where referential equality is the user's intent.- Tags: RSPEC-S4973
- Use
- org.openrewrite.staticanalysis.TernaryOperatorsShouldNotBeNested
- Ternary operators should not be nested
- Nested ternary operators can be hard to read quickly. Prefer simpler constructs for improved readability. If supported, this recipe will try to replace nested ternaries with switch expressions.
- Tags: RSPEC-S3358
- org.openrewrite.staticanalysis.URLEqualsHashCodeRecipes
- URL Equals and Hash Code
- Uses of
equals()andhashCode()causejava.net.URLto make blocking internet connections. Instead, usejava.net.URI. - Tags: RSPEC-2112
- org.openrewrite.staticanalysis.URLEqualsHashCodeRecipes$URLEqualsRecipe
- URL Equals
- Uses of
equals()causejava.net.URLto make blocking internet connections. Instead, usejava.net.URI. - Tags: RSPEC-2112
- org.openrewrite.staticanalysis.URLEqualsHashCodeRecipes$URLHashCodeRecipe
- URL Hash Code
- Uses of
hashCode()causejava.net.URLto make blocking internet connections. Instead, usejava.net.URI. - Tags: RSPEC-2112
- org.openrewrite.staticanalysis.UnnecessaryCloseInTryWithResources
- Unnecessary close in try-with-resources
- Remove unnecessary
AutoCloseable#close()statements in try-with-resources. - Tags: RSPEC-S4087
- org.openrewrite.staticanalysis.UnnecessaryParentheses
- Remove unnecessary parentheses
- Removes unnecessary parentheses from code where extra parentheses pairs are redundant.
- Tags: RSPEC-S1110, RSPEC-S1611
- org.openrewrite.staticanalysis.UnnecessaryPrimitiveAnnotations
- Remove
@Nullableand@CheckForNullannotations from primitives - Primitives can't be null anyway, so these annotations are not useful in this context.
- Tags: RSPEC-S4682
- Remove
- org.openrewrite.staticanalysis.UnnecessaryReturnAsLastStatement
- Unnecessary
returnas last statement in void method - Removes
returnfrom avoidmethod if it's the last statement. - Tags: RSPEC-S3626
- Unnecessary
- org.openrewrite.staticanalysis.UnnecessaryThrows
- Unnecessary throws
- Remove unnecessary
throwsdeclarations. This recipe will only remove unused, checked exceptions if: - The declaring class or the method declaration isfinal. - The method declaration isstaticorprivate. - The method overrides a method declaration in a super class and the super class does not throw the exception. - The method ispublicorprotectedand the exception is not documented via a JavaDoc as a@throwstag. - Tags: RSPEC-S1130
- org.openrewrite.staticanalysis.UnwrapRepeatableAnnotations
- Unwrap
@Repeatableannotations - Java 8 introduced the concept of
@Repeatableannotations, making the wrapper annotation unnecessary. - Tags: RSPEC-S1710
- Unwrap
- org.openrewrite.staticanalysis.UpperCaseLiteralSuffixes
- Upper case literal suffixes
- Using upper case literal suffixes for declaring literals is less ambiguous, e.g.,
1lversus1L. - Tags: RSPEC-S818
- org.openrewrite.staticanalysis.UseCollectionInterfaces
- Use
Collectioninterfaces - Use
Deque,List,Map,ConcurrentMap,Queue, andSetinstead of implemented collections. Replaces the return type of public method declarations and the variable type public variable declarations. - Tags: RSPEC-S1319
- Use
- org.openrewrite.staticanalysis.UseDiamondOperator
- Use the diamond operator
- The diamond operator (
<>) should be used. Java 7 introduced the diamond operator to reduce the verbosity of generics code. For instance, instead of having to declare aList's type in both its declaration and its constructor, you can now simplify the constructor declaration with<>, and the compiler will infer the type. - Tags: RSPEC-S2293
- org.openrewrite.staticanalysis.UseJavaStyleArrayDeclarations
- No C-style array declarations
- Change C-Style array declarations
int i[];toint[] i;. - Tags: RSPEC-S1197
- org.openrewrite.staticanalysis.UseLambdaForFunctionalInterface
- Use lambda expressions instead of anonymous classes
- Instead of anonymous class declarations, use a lambda where possible. Using lambdas to replace anonymous classes can lead to more expressive and maintainable code, improve code readability, reduce code duplication, and achieve better performance in some cases.
- Tags: RSPEC-S1604
- org.openrewrite.staticanalysis.UseObjectNotifyAll
- Replaces
Object.notify()withObject.notifyAll() Object.notifyAll()andObject.notify()both wake up sleeping threads, butObject.notify()only rouses one whileObject.notifyAll()rouses all of them. SinceObject.notify()might not wake up the right thread,Object.notifyAll()should be used instead. See this for more information.- Tags: RSPEC-S2446
- Replaces
- org.openrewrite.staticanalysis.UsePortableNewlines
- Use %n instead of \n in format strings
- Format strings should use %n rather than \n to produce platform-specific line separators.
- Tags: RSPEC-S3457
- org.openrewrite.staticanalysis.UseStandardCharset
- Use
StandardCharsetconstants - Replaces
Charset.forName(java.lang.String)with the equivalentStandardCharsetconstant. - Tags: RSPEC-S4719
- Use
- org.openrewrite.staticanalysis.UseStringReplace
- Use
String::replace()when first parameter is not a real regular expression - When
String::replaceAllis used, the first argument should be a real regular expression. If it’s not the case,String::replacedoes exactly the same thing asString::replaceAllwithout the performance drawback of the regex. - Tags: RSPEC-S5361
- Use
- org.openrewrite.staticanalysis.UseTryWithResources
- Use try-with-resources
- Refactor try/finally blocks to use try-with-resources when the finally block only closes an
AutoCloseableresource. - Tags: RSPEC-S2093
- org.openrewrite.staticanalysis.WhileInsteadOfFor
- Prefer
whileoverforloops - When only the condition expression is defined in a for loop, and the initialization and increment expressions are missing, a while loop should be used instead to increase readability.
- Tags: RSPEC-S1264
- Prefer
- org.openrewrite.staticanalysis.WriteOctalValuesAsDecimal
- Write octal values as decimal
- Developers may not recognize octal values as such, mistaking them instead for decimal values.
- Tags: RSPEC-S1314
- tech.picnic.errorprone.refasterrules.AssortedRulesRecipes$LogicalImplicationRecipe
- Refaster template
AssortedRules.LogicalImplication - Don't unnecessarily repeat boolean expressions.
- Tags: RSPEC-S2589
- Refaster template
- tech.picnic.errorprone.refasterrules.BigDecimalRulesRecipes$BigDecimalValueOfRecipe
- Refaster template
BigDecimalRules.BigDecimalValueOf - Prefer
BigDecimal#valueOf(double)over the associated constructor. - Tags: RSPEC-S2111
- Refaster template
- tech.picnic.errorprone.refasterrules.CharSequenceRulesRecipes$CharSequenceIsEmptyRecipe
- Refaster template
CharSequenceRules.CharSequenceIsEmpty - Prefer
CharSequence#isEmpty()over alternatives that consult the char sequence's length. - Tags: RSPEC-S7158
- Refaster template
- tech.picnic.errorprone.refasterrules.CollectionRulesRecipes$CollectionIsEmptyRecipe
- Refaster template
CollectionRules.CollectionIsEmpty - Prefer
Collection#isEmpty()over alternatives that consult the collection's size or are otherwise more contrived. - Tags: RSPEC-S1155
- Refaster template
- tech.picnic.errorprone.refasterrules.DoubleStreamRulesRecipes$DoubleStreamAnyMatchRecipe
- Refaster template
DoubleStreamRules.DoubleStreamAnyMatch - Prefer
DoubleStream#anyMatch(DoublePredicate)over more contrived alternatives. - Tags: RSPEC-S4034
- Refaster template
- tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$DoubleNegationRecipe
- Refaster template
EqualityRules.DoubleNegation - Avoid double negations; this is not Javascript.
- Tags: RSPEC-S2761
- Refaster template
- tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$IndirectDoubleNegationRecipe
- Refaster template
EqualityRules.IndirectDoubleNegation - Don't negate an inequality test or use the ternary operator to compare two booleans; directly test for equality instead.
- Tags: RSPEC-S1244, RSPEC-S1940
- Refaster template
- tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$NegationRecipe
- Refaster template
EqualityRules.Negation - Don't negate an equality test or use the ternary operator to compare two booleans; directly test for inequality instead.
- Tags: RSPEC-S1244, RSPEC-S1940
- Refaster template
- tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesCreateTempFileToFileRecipe
- Prefer
Files#createTempFile(String, String, FileAttribute[])over alternatives that create files with more liberal permissions - Note that
File#createTempFiletreats the given prefix as a path, and ignores all but its file name. That is, the actual prefix used is derived from all characters following the final file separator (if any). This is not the case withFiles#createTempFile, which will instead throw anIllegalArgumentExceptionif the prefix contains any file separators. - Tags: RSPEC-S5443
- Prefer
- tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesNewBufferedReaderPathOfRecipe
- Refaster template
FileRules.FilesNewBufferedReaderPathOf - Prefer
Files#newBufferedReader(Path)over more verbose or contrived alternatives. - Tags: RSPEC-S1943, RSPEC-S2095
- Refaster template
- tech.picnic.errorprone.refasterrules.FileRulesRecipes$FilesNewBufferedReaderToPathRecipe
- Refaster template
FileRules.FilesNewBufferedReaderToPath - Prefer
Files#newBufferedReader(Path)over more verbose or contrived alternatives. - Tags: RSPEC-S1943, RSPEC-S2095
- Refaster template
- tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapOf4Recipe
- Refaster template
ImmutableMapRules.ImmutableMapOf4 - Prefer
ImmutableMap#of(Object, Object, Object, Object, Object, Object, Object, Object)over alternatives that don't communicate the immutability of the resulting map at the type level. - Tags: RSPEC-S107
- Refaster template
- tech.picnic.errorprone.refasterrules.ImmutableMapRulesRecipes$ImmutableMapOf5Recipe
- Refaster template
ImmutableMapRules.ImmutableMapOf5 - Prefer
ImmutableMap#of(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)over alternatives that don't communicate the immutability of the resulting map at the type level. - Tags: RSPEC-S107
- Refaster template
- tech.picnic.errorprone.refasterrules.IntStreamRulesRecipes$IntStreamAnyMatchRecipe
- Refaster template
IntStreamRules.IntStreamAnyMatch - Prefer
IntStream#anyMatch(IntPredicate)over more contrived alternatives. - Tags: RSPEC-S4034
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatBooleanArrayWithFailMessageSupplierContainsExactlyRecipe
- Refaster template
JUnitToAssertJRules.AssertThatBooleanArrayWithFailMessageSupplierContainsExactly - Recipe created for the following Refaster template:
java static final class AssertThatBooleanArrayWithFailMessageSupplierContainsExactly \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(boolean[] actual, Supplier<@Nullable String> message, boolean[] expected) \{ assertArrayEquals(expected, actual, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(boolean[] actual, Supplier<@Nullable String> message, boolean[] expected) \{ assertThat(actual).withFailMessage(message).containsExactly(expected); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatByteArrayWithFailMessageSupplierContainsExactlyRecipe
- Refaster template
JUnitToAssertJRules.AssertThatByteArrayWithFailMessageSupplierContainsExactly - Recipe created for the following Refaster template:
java static final class AssertThatByteArrayWithFailMessageSupplierContainsExactly \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(byte[] actual, Supplier<@Nullable String> message, byte[] expected) \{ assertArrayEquals(expected, actual, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(byte[] actual, Supplier<@Nullable String> message, byte[] expected) \{ assertThat(actual).withFailMessage(message).containsExactly(expected); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatCharArrayWithFailMessageSupplierContainsExactlyRecipe
- Refaster template
JUnitToAssertJRules.AssertThatCharArrayWithFailMessageSupplierContainsExactly - Recipe created for the following Refaster template:
java static final class AssertThatCharArrayWithFailMessageSupplierContainsExactly \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(char[] actual, Supplier<@Nullable String> message, char[] expected) \{ assertArrayEquals(expected, actual, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(char[] actual, Supplier<@Nullable String> message, char[] expected) \{ assertThat(actual).withFailMessage(message).containsExactly(expected); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatCodeWithFailMessageSupplierDoesNotThrowAnyExceptionRecipe
- Refaster template
JUnitToAssertJRules.AssertThatCodeWithFailMessageSupplierDoesNotThrowAnyException - Recipe created for the following Refaster template:
java static final class AssertThatCodeWithFailMessageSupplierDoesNotThrowAnyException \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(Executable throwingCallable, Supplier<@Nullable String> supplier) \{ assertDoesNotThrow(throwingCallable, supplier); \} @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(ThrowingSupplier<?> throwingCallable, Supplier<@Nullable String> supplier) \{ assertDoesNotThrow(throwingCallable, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(ThrowingCallable throwingCallable, Supplier<@Nullable String> supplier) \{ assertThatCode(throwingCallable).withFailMessage(supplier).doesNotThrowAnyException(); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatDoubleArrayWithFailMessageSupplierContainsExactlyRecipe
- Refaster template
JUnitToAssertJRules.AssertThatDoubleArrayWithFailMessageSupplierContainsExactly - Recipe created for the following Refaster template:
java static final class AssertThatDoubleArrayWithFailMessageSupplierContainsExactly \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(double[] actual, Supplier<@Nullable String> message, double[] expected) \{ assertArrayEquals(expected, actual, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(double[] actual, Supplier<@Nullable String> message, double[] expected) \{ assertThat(actual).withFailMessage(message).containsExactly(expected); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatDoubleArrayWithFailMessageSupplierContainsExactlyWithOffsetRecipe
- Refaster template
JUnitToAssertJRules.AssertThatDoubleArrayWithFailMessageSupplierContainsExactlyWithOffset - Recipe created for the following Refaster template:
java static final class AssertThatDoubleArrayWithFailMessageSupplierContainsExactlyWithOffset \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(double[] actual, Supplier<@Nullable String> messageSupplier, double[] expected, double delta) \{ assertArrayEquals(expected, actual, delta, messageSupplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(double[] actual, Supplier<@Nullable String> messageSupplier, double[] expected, double delta) \{ assertThat(actual).withFailMessage(messageSupplier).containsExactly(expected, offset(delta)); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatFloatArrayWithFailMessageSupplierContainsExactlyRecipe
- Refaster template
JUnitToAssertJRules.AssertThatFloatArrayWithFailMessageSupplierContainsExactly - Recipe created for the following Refaster template:
java static final class AssertThatFloatArrayWithFailMessageSupplierContainsExactly \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(float[] actual, Supplier<@Nullable String> message, float[] expected) \{ assertArrayEquals(expected, actual, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(float[] actual, Supplier<@Nullable String> message, float[] expected) \{ assertThat(actual).withFailMessage(message).containsExactly(expected); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatFloatArrayWithFailMessageSupplierContainsExactlyWithOffsetRecipe
- Refaster template
JUnitToAssertJRules.AssertThatFloatArrayWithFailMessageSupplierContainsExactlyWithOffset - Recipe created for the following Refaster template:
java static final class AssertThatFloatArrayWithFailMessageSupplierContainsExactlyWithOffset \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(float[] actual, Supplier<@Nullable String> message, float[] expected, float delta) \{ assertArrayEquals(expected, actual, delta, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(float[] actual, Supplier<@Nullable String> message, float[] expected, float delta) \{ assertThat(actual).withFailMessage(message).containsExactly(expected, offset(delta)); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatIntArrayWithFailMessageSupplierContainsExactlyRecipe
- Refaster template
JUnitToAssertJRules.AssertThatIntArrayWithFailMessageSupplierContainsExactly - Recipe created for the following Refaster template:
java static final class AssertThatIntArrayWithFailMessageSupplierContainsExactly \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(int[] actual, Supplier<@Nullable String> message, int[] expected) \{ assertArrayEquals(expected, actual, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(int[] actual, Supplier<@Nullable String> message, int[] expected) \{ assertThat(actual).withFailMessage(message).containsExactly(expected); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatLongArrayWithFailMessageSupplierContainsExactlyRecipe
- Refaster template
JUnitToAssertJRules.AssertThatLongArrayWithFailMessageSupplierContainsExactly - Recipe created for the following Refaster template:
java static final class AssertThatLongArrayWithFailMessageSupplierContainsExactly \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(long[] actual, Supplier<@Nullable String> message, long[] expected) \{ assertArrayEquals(expected, actual, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(long[] actual, Supplier<@Nullable String> message, long[] expected) \{ assertThat(actual).withFailMessage(message).containsExactly(expected); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatObjectArrayWithFailMessageSupplierContainsExactlyRecipe
- Refaster template
JUnitToAssertJRules.AssertThatObjectArrayWithFailMessageSupplierContainsExactly - Recipe created for the following Refaster template:
java static final class AssertThatObjectArrayWithFailMessageSupplierContainsExactly \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(Object[] actual, Supplier<@Nullable String> message, Object[] expected) \{ assertArrayEquals(expected, actual, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object[] actual, Supplier<@Nullable String> message, Object[] expected) \{ assertThat(actual).withFailMessage(message).containsExactly(expected); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatShortArrayWithFailMessageSupplierContainsExactlyRecipe
- Refaster template
JUnitToAssertJRules.AssertThatShortArrayWithFailMessageSupplierContainsExactly - Recipe created for the following Refaster template:
java static final class AssertThatShortArrayWithFailMessageSupplierContainsExactly \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(short[] actual, Supplier<@Nullable String> message, short[] expected) \{ assertArrayEquals(expected, actual, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(short[] actual, Supplier<@Nullable String> message, short[] expected) \{ assertThat(actual).withFailMessage(message).containsExactly(expected); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatThrownByWithFailMessageSupplierIsExactlyInstanceOfRecipe
- Refaster template
JUnitToAssertJRules.AssertThatThrownByWithFailMessageSupplierIsExactlyInstanceOf - Recipe created for the following Refaster template:
java static final class AssertThatThrownByWithFailMessageSupplierIsExactlyInstanceOf<T extends Throwable> \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(Executable throwingCallable, Supplier<@Nullable String> supplier, Class<T> clazz) \{ assertThrowsExactly(clazz, throwingCallable, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(ThrowingCallable throwingCallable, Supplier<@Nullable String> supplier, Class<T> clazz) \{ assertThatThrownBy(throwingCallable).withFailMessage(supplier).isExactlyInstanceOf(clazz); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatThrownByWithFailMessageSupplierIsInstanceOfRecipe
- Refaster template
JUnitToAssertJRules.AssertThatThrownByWithFailMessageSupplierIsInstanceOf - Recipe created for the following Refaster template:
java static final class AssertThatThrownByWithFailMessageSupplierIsInstanceOf<T extends Throwable> \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(Executable throwingCallable, Supplier<@Nullable String> supplier, Class<T> clazz) \{ assertThrows(clazz, throwingCallable, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(ThrowingCallable throwingCallable, Supplier<@Nullable String> supplier, Class<T> clazz) \{ assertThatThrownBy(throwingCallable).withFailMessage(supplier).isInstanceOf(clazz); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsFalseRecipe
- Refaster template
JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsFalse - Recipe created for the following Refaster template:
java static final class AssertThatWithFailMessageSupplierIsFalse \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(boolean actual, Supplier<@Nullable String> supplier) \{ assertFalse(actual, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(boolean actual, Supplier<@Nullable String> supplier) \{ assertThat(actual).withFailMessage(supplier).isFalse(); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsInstanceOfRecipe
- Refaster template
JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsInstanceOf - Recipe created for the following Refaster template:
java static final class AssertThatWithFailMessageSupplierIsInstanceOf<T> \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(Object actual, Supplier<@Nullable String> supplier, Class<T> clazz) \{ assertInstanceOf(clazz, actual, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Supplier<@Nullable String> supplier, Class<T> clazz) \{ assertThat(actual).withFailMessage(supplier).isInstanceOf(clazz); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsNotNullRecipe
- Refaster template
JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsNotNull - Recipe created for the following Refaster template:
java static final class AssertThatWithFailMessageSupplierIsNotNull \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(Object actual, Supplier<@Nullable String> supplier) \{ assertNotNull(actual, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Supplier<@Nullable String> supplier) \{ assertThat(actual).withFailMessage(supplier).isNotNull(); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsNotSameAsRecipe
- Refaster template
JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsNotSameAs - Recipe created for the following Refaster template:
java static final class AssertThatWithFailMessageSupplierIsNotSameAs \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(Object actual, Supplier<@Nullable String> supplier, Object expected) \{ assertNotSame(expected, actual, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Supplier<@Nullable String> supplier, Object expected) \{ assertThat(actual).withFailMessage(supplier).isNotSameAs(expected); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsNullRecipe
- Refaster template
JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsNull - Recipe created for the following Refaster template:
java static final class AssertThatWithFailMessageSupplierIsNull \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(Object actual, Supplier<@Nullable String> supplier) \{ assertNull(actual, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Supplier<@Nullable String> supplier) \{ assertThat(actual).withFailMessage(supplier).isNull(); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsSameAsRecipe
- Refaster template
JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsSameAs - Recipe created for the following Refaster template:
java static final class AssertThatWithFailMessageSupplierIsSameAs \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(Object actual, Supplier<@Nullable String> supplier, Object expected) \{ assertSame(expected, actual, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Supplier<@Nullable String> supplier, Object expected) \{ assertThat(actual).withFailMessage(supplier).isSameAs(expected); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.JUnitToAssertJRulesRecipes$AssertThatWithFailMessageSupplierIsTrueRecipe
- Refaster template
JUnitToAssertJRules.AssertThatWithFailMessageSupplierIsTrue - Recipe created for the following Refaster template:
java static final class AssertThatWithFailMessageSupplierIsTrue \{ @BeforeTemplate @SuppressWarnings(value = "java:S4449") void before(boolean actual, Supplier<@Nullable String> supplier) \{ assertTrue(actual, supplier); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(boolean actual, Supplier<@Nullable String> supplier) \{ assertThat(actual).withFailMessage(supplier).isTrue(); \} \}. - Tags: RSPEC-S4449
- Refaster template
- tech.picnic.errorprone.refasterrules.LongStreamRulesRecipes$LongStreamAnyMatchRecipe
- Refaster template
LongStreamRules.LongStreamAnyMatch - Prefer
LongStream#anyMatch(LongPredicate)over more contrived alternatives. - Tags: RSPEC-S4034
- Refaster template
- tech.picnic.errorprone.refasterrules.OptionalRulesRecipes$OptionalOrElseThrowRecipe
- Refaster template
OptionalRules.OptionalOrElseThrow - Prefer
Optional#orElseThrow()over the less explicitOptional#get(). - Tags: RSPEC-S3655
- Refaster template
- tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$GreaterThanOrEqualToRecipe
- Refaster template
PrimitiveRules.GreaterThanOrEqualTo - Avoid contrived ways of expressing the "greater than or equal to" relationship.
- Tags: RSPEC-S1940
- Refaster template
- tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$GreaterThanRecipe
- Refaster template
PrimitiveRules.GreaterThan - Avoid contrived ways of expressing the "greater than" relationship.
- Tags: RSPEC-S1940
- Refaster template
- tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LessThanOrEqualToRecipe
- Refaster template
PrimitiveRules.LessThanOrEqualTo - Avoid contrived ways of expressing the "less than or equal to" relationship.
- Tags: RSPEC-S1940
- Refaster template
- tech.picnic.errorprone.refasterrules.PrimitiveRulesRecipes$LessThanRecipe
- Refaster template
PrimitiveRules.LessThan - Avoid contrived ways of expressing the "less than" relationship.
- Tags: RSPEC-S1940
- Refaster template
- tech.picnic.errorprone.refasterrules.RandomGeneratorRulesRecipes$RandomGeneratorNextLongRecipe
- Prefer
RandomGenerator#nextLong(long)over more contrived alternatives - Additionally, for large bounds, the unnecessary floating point arithmetic prevents some
longvalues from being generated. - Tags: RSPEC-S1905
- Prefer
- tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxThenEmptyRecipe
- Refaster template
ReactorRules.FluxThenEmpty - Avoid vacuous invocations of
Flux#ignoreElements(). - Tags: RSPEC-S4968
- Refaster template
- tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxThenMonoRecipe
- Refaster template
ReactorRules.FluxThenMono - Avoid vacuous invocations of
Flux#ignoreElements(). - Tags: RSPEC-S4968
- Refaster template
- tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$FluxThenRecipe
- Refaster template
ReactorRules.FluxThen - Avoid vacuous invocations of
Flux#ignoreElements(). - Tags: RSPEC-S2637, RSPEC-S4968
- Refaster template
- tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoIdentityRecipe
- Refaster template
ReactorRules.MonoIdentity - Don't unnecessarily transform a
Monoto an equivalent instance. - Tags: RSPEC-S2637, RSPEC-S4968
- Refaster template
- tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoThenEmptyRecipe
- Refaster template
ReactorRules.MonoThenEmpty - Avoid vacuous invocations of
Mono#ignoreElement(). - Tags: RSPEC-S4968
- Refaster template
- tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoThenMonoRecipe
- Refaster template
ReactorRules.MonoThenMono - Avoid vacuous operations prior to invocation of
Mono#then(Mono). - Tags: RSPEC-S4968
- Refaster template
- tech.picnic.errorprone.refasterrules.ReactorRulesRecipes$MonoThenRecipe
- Refaster template
ReactorRules.MonoThen - Prefer direct invocation of
Mono#then()} over more contrived alternatives. - Tags: RSPEC-S4968
- Refaster template
- tech.picnic.errorprone.refasterrules.RxJava2AdapterRulesRecipes$CompletableToMonoRecipe
- Refaster template
RxJava2AdapterRules.CompletableToMono - Use the fluent API style when using
RxJava2Adapter#completableToMono. - Tags: RSPEC-S4968
- Refaster template
- tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamCountRecipe
- Refaster template
StreamRules.StreamCount - Recipe created for the following Refaster template:
java static final class StreamCount<T> \{ @BeforeTemplate @SuppressWarnings(value = "java:S4266") long before(Stream<T> stream) \{ return stream.collect(counting()); \} @AfterTemplate long after(Stream<T> stream) \{ return stream.count(); \} \}. - Tags: RSPEC-S4266
- Refaster template
- tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMapCollectRecipe
- Refaster template
StreamRules.StreamMapCollect - Recipe created for the following Refaster template:
java static final class StreamMapCollect<T, U, R> \{ @BeforeTemplate @SuppressWarnings(value = "java:S4266") R before(Stream<T> stream, Function<? super T, ? extends U> mapper, Collector<? super U, ?, R> collector) \{ return stream.collect(mapping(mapper, collector)); \} @AfterTemplate R after(Stream<T> stream, Function<? super T, ? extends U> mapper, Collector<? super U, ?, R> collector) \{ return stream.map(mapper).collect(collector); \} \}. - Tags: RSPEC-S4266
- Refaster template
- tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMaxRecipe
- Refaster template
StreamRules.StreamMax - Recipe created for the following Refaster template:
java static final class StreamMax<T> \{ @BeforeTemplate @SuppressWarnings(value = "java:S4266") Optional<T> before(Stream<T> stream, Comparator<? super T> comparator) \{ return Refaster.anyOf(stream.min(comparator.reversed()), Streams.findLast(stream.sorted(comparator)), stream.collect(maxBy(comparator))); \} @AfterTemplate Optional<T> after(Stream<T> stream, Comparator<? super T> comparator) \{ return stream.max(comparator); \} \}. - Tags: RSPEC-S4266
- Refaster template
- tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamMinRecipe
- Refaster template
StreamRules.StreamMin - Recipe created for the following Refaster template:
java static final class StreamMin<T> \{ @BeforeTemplate @SuppressWarnings(value = "java:S4266") Optional<T> before(Stream<T> stream, Comparator<? super T> comparator) \{ return Refaster.anyOf(stream.max(comparator.reversed()), stream.sorted(comparator).findFirst(), stream.collect(minBy(comparator))); \} @AfterTemplate Optional<T> after(Stream<T> stream, Comparator<? super T> comparator) \{ return stream.min(comparator); \} \}. - Tags: RSPEC-S4266
- Refaster template
- tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamReduceRecipe
- Refaster template
StreamRules.StreamReduce - Recipe created for the following Refaster template:
java static final class StreamReduce<T> \{ @BeforeTemplate @SuppressWarnings(value = "java:S4266") Optional<T> before(Stream<T> stream, BinaryOperator<T> accumulator) \{ return stream.collect(reducing(accumulator)); \} @AfterTemplate Optional<T> after(Stream<T> stream, BinaryOperator<T> accumulator) \{ return stream.reduce(accumulator); \} \}. - Tags: RSPEC-S4266
- Refaster template
- tech.picnic.errorprone.refasterrules.StreamRulesRecipes$StreamReduceWithIdentityRecipe
- Refaster template
StreamRules.StreamReduceWithIdentity - Recipe created for the following Refaster template:
java static final class StreamReduceWithIdentity<T> \{ @BeforeTemplate @SuppressWarnings(value = "java:S4266") T before(Stream<T> stream, T identity, BinaryOperator<T> accumulator) \{ return stream.collect(reducing(identity, accumulator)); \} @AfterTemplate T after(Stream<T> stream, T identity, BinaryOperator<T> accumulator) \{ return stream.reduce(identity, accumulator); \} \}. - Tags: RSPEC-S4266
- Refaster template
- tech.picnic.errorprone.refasterrules.StringRulesRecipes$EmptyStringRecipe
- Refaster template
StringRules.EmptyString - Avoid unnecessary creation of new empty
Stringobjects; use the empty string literal instead. - Tags: RSPEC-S2129
- Refaster template
- tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIdentityRecipe
- Refaster template
StringRules.StringIdentity - Avoid unnecessary creation of new
Stringobjects. - Tags: RSPEC-S2129
- Refaster template
- tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIndexOfCharFromIndexRecipe
- Refaster template
StringRules.StringIndexOfCharFromIndex - Prefer
String#indexOf(int, int)over less efficient alternatives. - Tags: RSPEC-S4635
- Refaster template
- tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIndexOfStringFromIndexRecipe
- Refaster template
StringRules.StringIndexOfStringFromIndex - Prefer
String#indexOf(String, int)over less efficient alternatives. - Tags: RSPEC-S4635
- Refaster template
- tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringIsEmptyRecipe
- Refaster template
StringRules.StringIsEmpty - Prefer
String#isEmpty()over alternatives that consult the string's length. - Tags: RSPEC-S7158
- Refaster template
- tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringLastIndexOfCharRecipe
- Refaster template
StringRules.StringLastIndexOfChar - Prefer
String#lastIndexOf(int, int)over less efficient alternatives. - Tags: RSPEC-S4635
- Refaster template
- tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringLastIndexOfStringRecipe
- Refaster template
StringRules.StringLastIndexOfString - Prefer
String#lastIndexOf(String, int)over less efficient alternatives. - Tags: RSPEC-S4635
- Refaster template
- tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringStartsWithRecipe
- Refaster template
StringRules.StringStartsWith - Prefer
String#startsWith(String, int)over less efficient alternatives. - Tags: RSPEC-S4635
- Refaster template
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualRecipe
- Refaster template
TestNGToAssertJRules.AssertEqual - Recipe created for the following Refaster template:
java @SuppressWarnings(value = "java:S1448") static final class AssertEqual \{ @BeforeTemplate void before(boolean actual, boolean expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(boolean actual, Boolean expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Boolean actual, boolean expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Boolean actual, Boolean expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(byte actual, byte expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(byte actual, Byte expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Byte actual, byte expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Byte actual, Byte expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(char actual, char expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(char actual, Character expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Character actual, char expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Character actual, Character expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(short actual, short expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(short actual, Short expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Short actual, short expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Short actual, Short expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(int actual, int expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(int actual, Integer expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Integer actual, int expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Integer actual, Integer expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(long actual, long expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(long actual, Long expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Long actual, long expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Long actual, Long expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(float actual, float expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(float actual, Float expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Float actual, float expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Float actual, Float expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(double actual, double expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(double actual, Double expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Double actual, double expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Double actual, Double expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Object actual, Object expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(String actual, String expected) \{ assertEquals(actual, expected); \} @BeforeTemplate void before(Map<?, ?> actual, Map<?, ?> expected) \{ assertEquals(actual, expected); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, Object expected) \{ assertThat(actual).isEqualTo(expected); \} \}. - Tags: RSPEC-S1448
- Refaster template
- tech.picnic.errorprone.refasterrules.TestNGToAssertJRulesRecipes$AssertEqualWithMessageRecipe
- Refaster template
TestNGToAssertJRules.AssertEqualWithMessage - Recipe created for the following Refaster template:
java @SuppressWarnings(value = "java:S1448") static final class AssertEqualWithMessage \{ @BeforeTemplate void before(boolean actual, String message, boolean expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(boolean actual, String message, Boolean expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Boolean actual, String message, boolean expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Boolean actual, String message, Boolean expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(byte actual, String message, byte expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(byte actual, String message, Byte expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Byte actual, String message, byte expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Byte actual, String message, Byte expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(char actual, String message, char expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(char actual, String message, Character expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Character actual, String message, char expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Character actual, String message, Character expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(short actual, String message, short expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(short actual, String message, Short expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Short actual, String message, short expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Short actual, String message, Short expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(int actual, String message, int expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(int actual, String message, Integer expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Integer actual, String message, int expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Integer actual, String message, Integer expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(long actual, String message, long expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(long actual, String message, Long expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Long actual, String message, long expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Long actual, String message, Long expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(float actual, String message, float expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(float actual, String message, Float expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Float actual, String message, float expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Float actual, String message, Float expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(double actual, String message, double expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(double actual, String message, Double expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Double actual, String message, double expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Double actual, String message, Double expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Object actual, String message, Object expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(String actual, String message, String expected) \{ assertEquals(actual, expected, message); \} @BeforeTemplate void before(Map<?, ?> actual, String message, Map<?, ?> expected) \{ assertEquals(actual, expected, message); \} @AfterTemplate @UseImportPolicy(value = STATIC_IMPORT_ALWAYS) void after(Object actual, String message, Object expected) \{ assertThat(actual).withFailMessage(message).isEqualTo(expected); \} \}. - Tags: RSPEC-S1448
- Refaster template
sap
1 recipe
- org.openrewrite.java.spring.boot3.MigrateSapCfJavaLoggingSupport
- Migrate SAP cloud foundry logging support to Spring Boot 3.x
- Migrate SAP cloud foundry logging support from
cf-java-logging-support-servlettocf-java-logging-support-servlet-jakarta, to use Jakarta with Spring Boot 3.
scala
1 recipe
- org.openrewrite.scala.migrate.UpgradeScala_2_12
- Migrate to Scala 2.12.+
- Upgrade the Scala version for compatibility with newer Java versions.
scheduler
2 recipes
- org.openrewrite.quarkus.spring.SpringBootBatchToQuarkus
- Replace Spring Boot Batch with Quarkus Scheduler
- Migrates
spring-boot-starter-batchtoquarkus-scheduler.
- org.openrewrite.quarkus.spring.SpringBootQuartzToQuarkus
- Replace Spring Boot Quartz with Quarkus Quartz
- Migrates
spring-boot-starter-quartztoquarkus-quartz.
schemas
37 recipes
- com.oracle.weblogic.rewrite.MigrateWebLogicSchemasTo1412
- Migrate WebLogic Schemas to 14.1.2
- This recipe will migrate WebLogic schemas to 14.1.2
- com.oracle.weblogic.rewrite.MigrateWebLogicSchemasTo1511
- Migrate WebLogic Schemas to 15.1.1
- This recipe will migrate WebLogic schemas to 15.1.1
- com.oracle.weblogic.rewrite.WebLogicApplicationClientXmlNamespace1412
- Migrate xmlns entries in
application-client.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Application Client schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicApplicationClientXmlNamespace1511
- Migrate xmlns entries in
application-client.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inapplication-client.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicApplicationXmlNamespace1412
- Migrate xmlns entries in
weblogic-application.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Application schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicApplicationXmlNamespace1511
- Migrate xmlns entries in
weblogic-application.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-application.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicEjbJar32XmlNamespace1412
- Migrate xmlns entries in
weblogic-ejb-jar.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic EJB 3.2 schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicEjbJar32XmlNamespace1511
- Migrate xmlns entries in
weblogic-ejb-jar.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-ejb-jar.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicJdbcXmlNamespace1412
- Migrate xmlns entries in
*-jdbc.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic JDBC schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicJdbcXmlNamespace1511
- Migrate xmlns entries in
*-jdbc.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries in*-jdbc.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicJmsXmlNamespace1412
- Migrate xmlns entries in
*-jms.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic JMS schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicJmsXmlNamespace1511
- Migrate xmlns entries in
*-jms.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries in*-jms.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicPersistenceConfigurationXmlNamespace1412
- Migrate xmlns entries in
persistence-configuration.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic EJB 3.2 Persistence Configuration schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicPersistenceConfigurationXmlNamespace1511
- Migrate xmlns entries in
persistence-configuration.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inpersistence-configuration.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicPlanXmlNamespace1412
- Migrate xmlns entries in
plan.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Plan schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicPlanXmlNamespace1511
- Migrate xmlns entries in
plan.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inplan.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicPubSubXmlNamespace1412
- Migrate xmlns entries in
weblogic-pubsub.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic PubSub schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicPubSubXmlNamespace1511
- Migrate xmlns entries in
weblogic-pubsub.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-pubsub.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicRaXmlNamespace1412
- Migrate xmlns entries in
weblogic-ra.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Resource Adapter schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicRaXmlNamespace1511
- Migrate xmlns entries in
weblogic-ra.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-ra.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicRdbmsJarXmlNamespace1412
- Migrate xmlns entries in
weblogic-rdbms-jar.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic EJB 3.2 RDBMS schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicRdbmsJarXmlNamespace1511
- Migrate xmlns entries in
weblogic-rdbms-jar.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-rdbms-jar.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicResourceDeploymentPlanXmlNamespace1412
- Migrate xmlns entries in
resource-deployment-plan.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Resource Deployment Plan schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicResourceDeploymentPlanXmlNamespace1511
- Migrate xmlns entries in
resource-deployment-plan.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inresource-deployment-plan.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWebServicesXmlNamespace1412
- Migrate xmlns entries in
weblogic-webservices.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Web Services schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWebServicesXmlNamespace1511
- Migrate xmlns entries in
weblogic-webservices.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-webservices.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWebservicesPolicyRefXmlNamespace1412
- Migrate xmlns entries in
weblogic-webservices-policy.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Web Service Policy Reference schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWebservicesPolicyRefXmlNamespace1511
- Migrate xmlns entries in
weblogic-webservices-policy.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-webservices-policy.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWseeClientHandlerChainXmlNamespace1412
- Migrate xmlns entries in
weblogic-wsee-clientHandlerChain.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic WSEE Client Handler Chains schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWseeClientHandlerChainXmlNamespace1511
- Migrate xmlns entries in
weblogic-wsee-clientHandlerChain.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-wsee-clientHandlerChain.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWseeStandaloneClientXmlNamespace1412
- Migrate xmlns entries in
weblogic-wsee-standaloneclient.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic WSEE Standalone Client schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWseeStandaloneClientXmlNamespace1511
- Migrate xmlns entries in
weblogic-wsee-standaloneclient.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-wsee-standaloneclient.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicXmlCreateIfNotExists1511
- Create
weblogic.xmlif it does not exist - This recipe will create a
weblogic.xmlfile with the WebLogic 15.1.1 namespace if it does not already exist.
- Create
- com.oracle.weblogic.rewrite.WebLogicXmlPreferApplicationPackagesJPA
- Add
prefer-application-packagesfor JPA inweblogic.xml - This recipe will add a
prefer-application-packagesentry for Jakarta Persistence inweblogic.xmlif it does not already exist.
- Add
- com.oracle.weblogic.rewrite.WebLogicXmlPreferApplicationPackagesSlf4j
- Add
prefer-application-packagesfor SLF4J inweblogic.xml - This recipe will add a
prefer-application-packagesentry for SLF4J inweblogic.xmlif it does not already exist.
- Add
- com.oracle.weblogic.rewrite.WebLogicXmlWebAppNamespace1412
- Migrate xmlns entries in
weblogic.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicXmlWebAppNamespace1511
- Migrate xmlns entries in
weblogic.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
sdk
3 recipes
- software.amazon.awssdk.v2migration.AddS3EventNotificationDependency
- Add AWS SDK for Java v2 S3 Event Notification dependency if needed
- This recipe will add the Java v2 S3 Event Notification dependency if v1 S3EventNotification is used
- software.amazon.awssdk.v2migration.AddTransferManagerDependency
- Add AWS SDK for Java v2 S3 Transfer Manager dependency if needed
- This recipe will add the Java v2 S3 Transfer Manager dependency if v1 Transfer Manager is used
- software.amazon.awssdk.v2migration.AwsSdkJavaV1ToV2
- Migrate from the AWS SDK for Java v1 to the AWS SDK for Java v2
- This recipe will apply changes required for migrating from the AWS SDK for Java v1 to the AWS SDK for Java v2.
search
91 recipes
- OpenRewrite.Recipes.AspNetCore2.FindBuildWebHost
- Find BuildWebHost method
- Flags
BuildWebHostmethod declarations that should be renamed toCreateWebHostBuilderand refactored for ASP.NET Core 2.1.
- OpenRewrite.Recipes.AspNetCore2.FindIAuthenticationManager
- Find IAuthenticationManager usage
- Flags references to
IAuthenticationManagerwhich was removed in ASP.NET Core 2.0. UseHttpContextextension methods fromMicrosoft.AspNetCore.Authenticationinstead.
- OpenRewrite.Recipes.AspNetCore2.FindLoggerFactoryAddProvider
- Find ILoggerFactory.Add() calls*
- Flags
ILoggerFactory.AddConsole(),AddDebug(), and similar extension methods. In ASP.NET Core 2.2+, logging should be configured viaConfigureLoggingin the host builder.
- OpenRewrite.Recipes.AspNetCore2.FindSetCompatibilityVersion
- Find SetCompatibilityVersion() calls
- Flags
SetCompatibilityVersioncalls. This method is a no-op in ASP.NET Core 3.0+ and should be removed during migration.
- OpenRewrite.Recipes.AspNetCore2.FindUseKestrelWithConfig
- Find UseKestrel() with configuration
- Flags
UseKestrelcalls with configuration lambdas that should be replaced withConfigureKestrelto avoid conflicts with the IIS in-process hosting model.
- OpenRewrite.Recipes.AspNetCore3.FindAddMvc
- Find AddMvc() calls
- Flags
AddMvc()calls that should be replaced with more specific service registrations (AddControllers,AddControllersWithViews, orAddRazorPages) in ASP.NET Core 3.0.
- OpenRewrite.Recipes.AspNetCore3.FindIApplicationLifetime
- Find IApplicationLifetime usage
- Flags usages of
IApplicationLifetimewhich should be replaced withIHostApplicationLifetimein ASP.NET Core 3.0.
- OpenRewrite.Recipes.AspNetCore3.FindIHostingEnvironment
- Find IHostingEnvironment usage
- Flags usages of
IHostingEnvironmentwhich should be replaced withIWebHostEnvironmentin ASP.NET Core 3.0.
- OpenRewrite.Recipes.AspNetCore3.FindNewLoggerFactory
- Find new LoggerFactory() calls
- Flags
new LoggerFactory()calls that should be replaced withLoggerFactory.Create(builder => ...)in .NET Core 3.0+.
- OpenRewrite.Recipes.AspNetCore3.FindNewtonsoftJsonUsage
- Find Newtonsoft.Json usage in ASP.NET Core
- Flags
JsonConvertand otherNewtonsoft.Jsonusage. ASP.NET Core 3.0 usesSystem.Text.Jsonby default.
- OpenRewrite.Recipes.AspNetCore3.FindUseMvcOrUseSignalR
- Find UseMvc()/UseSignalR() calls
- Flags
UseMvc()andUseSignalR()calls that should be replaced with endpoint routing (UseRouting()+UseEndpoints()) in ASP.NET Core 3.0.
- OpenRewrite.Recipes.AspNetCore3.FindWebHostBuilder
- Find WebHostBuilder usage
- Flags
WebHostBuilderandWebHost.CreateDefaultBuilderusage that should migrate to the Generic Host pattern in ASP.NET Core 3.0+.
- OpenRewrite.Recipes.Net10.FindActionContextAccessorObsolete
- Find obsolete
IActionContextAccessor/ActionContextAccessor(ASPDEPR006) - Finds usages of
IActionContextAccessorandActionContextAccessorwhich are obsolete in .NET 10. UseIHttpContextAccessorandHttpContext.GetEndpoint()instead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindActivitySampling
- Find
ActivitySamplingResult.PropagationDatabehavior change - Finds usages of
ActivitySamplingResult.PropagationDatawhich has changed behavior in .NET 10. Activities with a recorded parent and PropagationData sampling no longer setActivity.Recorded = true.
- Find
- OpenRewrite.Recipes.Net10.FindBackgroundServiceExecuteAsync
- Find
BackgroundService.ExecuteAsyncbehavior change - Finds methods that override
ExecuteAsyncfromBackgroundService. In .NET 10, the entire method runs on a background thread; synchronous code before the firstawaitno longer blocks host startup.
- Find
- OpenRewrite.Recipes.Net10.FindBufferedStreamWriteByte
- Find
BufferedStream.WriteByteimplicit flush behavior change - Finds calls to
BufferedStream.WriteByte()which no longer performs an implicit flush when the internal buffer is full in .NET 10. CallFlush()explicitly if needed.
- Find
- OpenRewrite.Recipes.Net10.FindClipboardGetData
- Find obsolete
Clipboard.GetDatacalls (WFDEV005) - Finds calls to
Clipboard.GetData(string). In .NET 10, this method is obsolete (WFDEV005). UseClipboard.TryGetDatamethods instead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindDistributedContextPropagator
- Find
DistributedContextPropagatordefault propagator change - Finds usages of
DistributedContextPropagator.CurrentandDistributedContextPropagator.CreateDefaultPropagator()which now default to W3C format in .NET 10. The 'baggage' header is used instead of 'Correlation-Context'.
- Find
- OpenRewrite.Recipes.Net10.FindDllImportSearchPath
- Find
DllImportSearchPath.AssemblyDirectorybehavior change - Finds usages of
DllImportSearchPath.AssemblyDirectorywhich has changed behavior in .NET 10. Specifying onlyAssemblyDirectoryno longer falls back to OS default search paths.
- Find
- OpenRewrite.Recipes.Net10.FindDriveInfoDriveFormat
- Find
DriveInfo.DriveFormatbehavior change - Finds usages of
DriveInfo.DriveFormatwhich returns Linux kernel filesystem type strings instead of mapped names in .NET 10. Verify that comparisons match the new format.
- Find
- OpenRewrite.Recipes.Net10.FindFormOnClosingObsolete
- Find obsolete
Form.OnClosing/OnClosedusage (WFDEV004) - Finds usage of
Form.OnClosing,Form.OnClosed, and theClosing/Closedevents. In .NET 10, these are obsolete (WFDEV004). UseOnFormClosing/OnFormClosedandFormClosing/FormClosedinstead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindGnuTarPaxTarEntry
- Find
GnuTarEntry/PaxTarEntrydefault timestamp change - Finds
new GnuTarEntry(...)andnew PaxTarEntry(...)constructor calls. In .NET 10, these no longer set atime and ctime by default. SetAccessTime/ChangeTimeexplicitly if needed.
- Find
- OpenRewrite.Recipes.Net10.FindIpNetworkObsolete
- Find obsolete
IPNetwork/KnownNetworks(ASPDEPR005) - Finds usages of
Microsoft.AspNetCore.HttpOverrides.IPNetworkandForwardedHeadersOptions.KnownNetworkswhich are obsolete in .NET 10. UseSystem.Net.IPNetworkandKnownIPNetworksinstead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindKeyedServiceAnyKey
- Find
KeyedService.AnyKeybehavior change - Finds usages of
KeyedService.AnyKeywhich has changed behavior in .NET 10.GetKeyedService(AnyKey)now throwsInvalidOperationExceptionandGetKeyedServices(AnyKey)no longer returns AnyKey registrations.
- Find
- OpenRewrite.Recipes.Net10.FindMakeGenericSignatureType
- Find
Type.MakeGenericSignatureTypevalidation change - Finds calls to
Type.MakeGenericSignatureType()which now validates that the first argument is a generic type definition in .NET 10.
- Find
- OpenRewrite.Recipes.Net10.FindQueryableMaxByMinByObsolete
- Find obsolete
Queryable.MaxBy/MinBywithIComparer<TSource>(SYSLIB0061) - Finds
Queryable.MaxByandQueryable.MinByoverloads takingIComparer<TSource>which are obsolete in .NET 10. Use the overloads takingIComparer<TKey>instead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindRazorRuntimeCompilationObsolete
- Find obsolete
AddRazorRuntimeCompilationcalls (ASPDEPR003) - Finds calls to
AddRazorRuntimeCompilationwhich is obsolete in .NET 10. Use Hot Reload instead for development scenarios.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindRfc2898DeriveBytesObsolete
- Find obsolete
Rfc2898DeriveBytesconstructors (SYSLIB0060) - Finds
new Rfc2898DeriveBytes(...)constructor calls which are obsolete in .NET 10. Use the staticRfc2898DeriveBytes.Pbkdf2()method instead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindSslAuthEnumTypes
- Find obsolete SSL authentication enum types
- Finds usage of
ExchangeAlgorithmType,CipherAlgorithmType, andHashAlgorithmTypefromSystem.Security.Authentication. These enum types are obsolete in .NET 10 (SYSLIB0058). UseSslStream.NegotiatedCipherSuiteinstead.
- OpenRewrite.Recipes.Net10.FindSslStreamObsoleteProperties
- Find obsolete
SslStreamcipher properties (SYSLIB0058) - Finds usages of
SslStream.KeyExchangeAlgorithm,KeyExchangeStrength,CipherAlgorithm,CipherStrength,HashAlgorithm, andHashStrengthwhich are obsolete in .NET 10. UseSslStream.NegotiatedCipherSuiteinstead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindSystemDrawingExceptionChange
- Find
catch (OutOfMemoryException)that may needExternalException - In .NET 10, System.Drawing GDI+ errors now throw
ExternalExceptioninstead ofOutOfMemoryException. This recipe finds catch blocks that catchOutOfMemoryExceptionwhich may need to also catchExternalException.
- Find
- OpenRewrite.Recipes.Net10.FindSystemEventsThreadShutdownObsolete
- Find obsolete
SystemEvents.EventsThreadShutdown(SYSLIB0059) - Finds usages of
SystemEvents.EventsThreadShutdownwhich is obsolete in .NET 10. UseAppDomain.ProcessExitinstead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindWebHostBuilderObsolete
- Find obsolete
WebHostBuilder/IWebHost/WebHostusage (ASPDEPR004/ASPDEPR008) - Finds usages of
WebHostBuilder,IWebHost, andWebHostwhich are obsolete in .NET 10. Migrate toHostBuilderorWebApplicationBuilderinstead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindWinFormsObsoleteApis
- Find obsolete Windows Forms APIs (WFDEV004/005/006)
- Finds usages of Windows Forms APIs that are obsolete in .NET 10, including
Form.OnClosing/OnClosed(WFDEV004),Clipboard.GetData(WFDEV005), and legacy controls likeContextMenu,DataGrid,MainMenu(WFDEV006).
- OpenRewrite.Recipes.Net10.FindWithOpenApiDeprecated
- Find deprecated
WithOpenApicalls (ASPDEPR002) - Finds calls to
.WithOpenApi()which is deprecated in .NET 10. Remove the call or useAddOpenApiOperationTransformerinstead.
- Find deprecated
- OpenRewrite.Recipes.Net10.FindX500DistinguishedNameValidation
- Find
X500DistinguishedNamestring constructor stricter validation - Finds
new X500DistinguishedName(string, ...)constructor calls which have stricter validation in .NET 10. Non-Windows environments may reject previously accepted values.
- Find
- OpenRewrite.Recipes.Net10.FindXsltSettingsEnableScriptObsolete
- Find obsolete
XsltSettings.EnableScript(SYSLIB0062) - Finds usages of
XsltSettings.EnableScriptwhich is obsolete in .NET 10.
- Find obsolete
- OpenRewrite.Recipes.Net3_0.FindCompactOnMemoryPressure
- Find
CompactOnMemoryPressureusage (removed in ASP.NET Core 3.0) - Finds usages of
CompactOnMemoryPressurewhich was removed fromMemoryCacheOptionsin ASP.NET Core 3.0.
- Find
- OpenRewrite.Recipes.Net3_0.FindConnectionAdapter
- Find
IConnectionAdapterusage (removed in ASP.NET Core 3.0) - Finds usages of
IConnectionAdapterwhich was removed from Kestrel in ASP.NET Core 3.0. Use Connection Middleware instead.
- Find
- OpenRewrite.Recipes.Net3_0.FindHttpContextAuthentication
- Find
HttpContext.Authenticationusage (removed in ASP.NET Core 3.0) - Finds usages of
HttpContext.Authenticationwhich was removed in ASP.NET Core 3.0. Use dependency injection to getIAuthenticationServiceinstead.
- Find
- OpenRewrite.Recipes.Net3_0.FindNewtonsoftJson
- Find Newtonsoft.Json usage
- Finds usages of Newtonsoft.Json types (
JObject,JArray,JToken,JsonConvert) that should be migrated toSystem.Text.Jsonor explicitly preserved viaMicrosoft.AspNetCore.Mvc.NewtonsoftJsonin ASP.NET Core 3.0+.
- OpenRewrite.Recipes.Net3_0.FindObsoleteLocalizationApis
- Find obsolete localization APIs (ASP.NET Core 3.0)
- Finds usages of
ResourceManagerWithCultureStringLocalizerandWithCulture()which are obsolete in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_0.FindSpaServices
- Find SpaServices/NodeServices usage (obsolete in ASP.NET Core 3.0)
- Finds usages of
SpaServicesandNodeServiceswhich are obsolete in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_0.FindSynchronousIO
- Find synchronous IO usage (disabled in ASP.NET Core 3.0)
- Finds references to
AllowSynchronousIOwhich indicates synchronous IO usage that is disabled by default in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_0.FindUseMvc
- Find
UseMvc/AddMvcusage (replaced in ASP.NET Core 3.0) - Finds usages of
app.UseMvc(),app.UseMvcWithDefaultRoute(), andservices.AddMvc()which should be migrated to endpoint routing and more specific service registration in ASP.NET Core 3.0.
- Find
- OpenRewrite.Recipes.Net3_0.FindWebApiCompatShim
- Find Web API compatibility shim usage (removed in ASP.NET Core 3.0)
- Finds usages of
ApiController,HttpResponseMessage, and other types fromMicrosoft.AspNetCore.Mvc.WebApiCompatShimwhich was removed in ASP.NET Core 3.0.
- OpenRewrite.Recipes.Net3_0.FindWebHostBuilder
- Find
WebHostBuilder/WebHost.CreateDefaultBuilderusage (replaced in ASP.NET Core 3.0) - Finds usages of
WebHost.CreateDefaultBuilder()andnew WebHostBuilder()which should be migrated toHost.CreateDefaultBuilder()withConfigureWebHostDefaults()in ASP.NET Core 3.0.
- Find
- OpenRewrite.Recipes.Net3_1.FindSameSiteNone
- Find
SameSiteMode.Noneusage (behavior changed in .NET Core 3.1) - Finds usages of
SameSiteMode.Nonewhich changed behavior in .NET Core 3.1 due to Chrome 80 SameSite cookie changes. Apps using remote authentication may need browser sniffing.
- Find
- OpenRewrite.Recipes.Net5.FindCodeAccessSecurity
- Find Code Access Security usage (obsolete in .NET 5)
- Finds usages of Code Access Security types (
SecurityPermission,PermissionSet, etc.) which are obsolete in .NET 5+.
- OpenRewrite.Recipes.Net5.FindPrincipalPermissionAttribute
- Find
PrincipalPermissionAttributeusage (SYSLIB0003) - Finds usages of
PrincipalPermissionAttributewhich is obsolete in .NET 5+ (SYSLIB0003) and throwsNotSupportedExceptionat runtime.
- Find
- OpenRewrite.Recipes.Net5.FindUtf7Encoding
- Find
Encoding.UTF7usage (SYSLIB0001) - Finds usages of
Encoding.UTF7andUTF7Encodingwhich are obsolete in .NET 5+ (SYSLIB0001). UTF-7 is insecure.
- Find
- OpenRewrite.Recipes.Net5.FindWinHttpHandler
- Find
WinHttpHandlerusage (removed in .NET 5) - Finds usages of
WinHttpHandlerwhich was removed from the .NET 5 runtime. Install theSystem.Net.Http.WinHttpHandlerNuGet package explicitly.
- Find
- OpenRewrite.Recipes.Net5.FindWinRTInterop
- Find WinRT interop usage (removed in .NET 5)
- Finds usages of WinRT interop types (
WindowsRuntimeType,WindowsRuntimeMarshal, etc.) which were removed in .NET 5.
- OpenRewrite.Recipes.Net6.FindAssemblyCodeBase
- Find
Assembly.CodeBase/EscapedCodeBaseusage (SYSLIB0012) - Finds usages of
Assembly.CodeBaseandAssembly.EscapedCodeBasewhich are obsolete (SYSLIB0012). UseAssembly.Locationinstead.
- Find
- OpenRewrite.Recipes.Net6.FindIgnoreNullValues
- Find
JsonSerializerOptions.IgnoreNullValuesusage (SYSLIB0020) - Finds usages of
JsonSerializerOptions.IgnoreNullValueswhich is obsolete in .NET 6 (SYSLIB0020). UseDefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNullinstead.
- Find
- OpenRewrite.Recipes.Net6.FindThreadAbort
- Find
Thread.Abortusage (SYSLIB0006) - Finds calls to
Thread.Abort()which throwsPlatformNotSupportedExceptionin .NET 6+ (SYSLIB0006). UseCancellationTokenfor cooperative cancellation instead.
- Find
- OpenRewrite.Recipes.Net6.FindWebRequest
- Find
WebRequest/HttpWebRequest/WebClientusage (SYSLIB0014) - Finds usages of
WebRequest,HttpWebRequest, andWebClientwhich are obsolete in .NET 6 (SYSLIB0014). UseHttpClientinstead.
- Find
- OpenRewrite.Recipes.Net6.FindX509PrivateKey
- Find
X509Certificate2.PrivateKeyusage (SYSLIB0028) - Finds usages of
X509Certificate2.PrivateKeywhich is obsolete (SYSLIB0028). UseGetRSAPrivateKey(),GetECDsaPrivateKey(), or the appropriate algorithm-specific method instead.
- Find
- OpenRewrite.Recipes.Net7.FindObsoleteSslProtocols
- Find obsolete
SslProtocols.Tls/Tls11usage (SYSLIB0039) - Finds usages of
SslProtocols.TlsandSslProtocols.Tls11which are obsolete in .NET 7 (SYSLIB0039). UseSslProtocols.Tls12,SslProtocols.Tls13, orSslProtocols.Noneinstead.
- Find obsolete
- OpenRewrite.Recipes.Net7.FindRfc2898InsecureCtors
- Find insecure
Rfc2898DeriveBytesconstructors (SYSLIB0041) - Finds
Rfc2898DeriveBytesconstructor calls that use default SHA1 or low iteration counts, which are obsolete in .NET 7 (SYSLIB0041). SpecifyHashAlgorithmNameand at least 600,000 iterations.
- Find insecure
- OpenRewrite.Recipes.Net8.FindAddContext
- Find
JsonSerializerOptions.AddContextusage (SYSLIB0049) - Finds calls to
JsonSerializerOptions.AddContext<T>()which is obsolete in .NET 8 (SYSLIB0049). UseTypeInfoResolverChainorTypeInfoResolverinstead.
- Find
- OpenRewrite.Recipes.Net8.FindAesGcmOldConstructor
- Find
AesGcmconstructor without tag size (SYSLIB0053) - Finds
new AesGcm(key)constructor calls without an explicit tag size parameter. In .NET 8, the single-argument constructor is obsolete (SYSLIB0053). Usenew AesGcm(key, tagSizeInBytes)instead.
- Find
- OpenRewrite.Recipes.Net8.FindFormatterBasedSerialization
- Find formatter-based serialization types (SYSLIB0050/0051)
- Finds usage of formatter-based serialization types (
FormatterConverter,IFormatter,ObjectIDGenerator,ObjectManager,SurrogateSelector,SerializationInfo,StreamingContext). These are obsolete in .NET 8 (SYSLIB0050/0051).
- OpenRewrite.Recipes.Net8.FindFrozenCollection
- Find ToImmutable() that could use Frozen collections*
- Finds usages of
ToImmutableDictionary()andToImmutableHashSet(). In .NET 8+,ToFrozenDictionary()andToFrozenSet()provide better read performance.
- OpenRewrite.Recipes.Net8.FindRegexCompileToAssembly
- Find
Regex.CompileToAssemblyusage (SYSLIB0052) - Finds usage of
Regex.CompileToAssembly()andRegexCompilationInfo. These are obsolete in .NET 8 (SYSLIB0052). Use the Regex source generator instead.
- Find
- OpenRewrite.Recipes.Net8.FindSerializationConstructors
- Find legacy serialization constructors (SYSLIB0051)
- Finds legacy serialization constructors
.ctor(SerializationInfo, StreamingContext)which are obsolete in .NET 8 (SYSLIB0051). TheISerializablepattern is no longer recommended.
- OpenRewrite.Recipes.Net8.FindTimeAbstraction
- Find DateTime.Now/UtcNow usage (TimeProvider in .NET 8)
- Finds usages of
DateTime.Now,DateTime.UtcNow,DateTimeOffset.Now, andDateTimeOffset.UtcNow. In .NET 8+,TimeProvideris the recommended abstraction for time.
- OpenRewrite.Recipes.Net9.FindAuthenticationManager
- Find
AuthenticationManagerusage (SYSLIB0009) - Finds usages of
AuthenticationManagerwhich is not supported in .NET 9 (SYSLIB0009). Methods will no-op or throwPlatformNotSupportedException.
- Find
- OpenRewrite.Recipes.Net9.FindBinaryFormatter
- Find
BinaryFormatterusage (removed in .NET 9) - Finds usages of
BinaryFormatterwhich always throwsNotSupportedExceptionin .NET 9. Migrate to a different serializer such asSystem.Text.Json,XmlSerializer, orDataContractSerializer.
- Find
- OpenRewrite.Recipes.Net9.FindBinaryReaderReadString
- Find
BinaryReader.ReadStringbehavior change - Finds calls to
BinaryReader.ReadString()which now returns the Unicode replacement character (\uFFFD) for malformed UTF-8 byte sequences in .NET 9, instead of the previous behavior. Verify your code handles the replacement character correctly.
- Find
- OpenRewrite.Recipes.Net9.FindDistributedCache
- Find IDistributedCache usage (HybridCache in .NET 9)
- Finds usages of
IDistributedCache. In .NET 9,HybridCacheis the recommended replacement with L1/L2 caching, stampede protection, and tag-based invalidation.
- OpenRewrite.Recipes.Net9.FindEnumConverter
- Find
EnumConverterconstructor validation change - Finds
new EnumConverter()constructor calls. In .NET 9,EnumConvertervalidates that the registered type is actually an enum and throwsArgumentExceptionif not.
- Find
- OpenRewrite.Recipes.Net9.FindExecuteUpdateSync
- Find synchronous ExecuteUpdate/ExecuteDelete (EF Core 9)
- Finds usages of synchronous
ExecuteUpdate()andExecuteDelete()which were removed in EF Core 9. UseExecuteUpdateAsync/ExecuteDeleteAsyncinstead.
- OpenRewrite.Recipes.Net9.FindHttpClientHandlerCast
- Find
HttpClientHandlerusage (HttpClientFactory default change) - Finds usages of
HttpClientHandlerwhich may break whenHttpClientFactoryswitches its default handler toSocketsHttpHandlerin .NET 9.
- Find
- OpenRewrite.Recipes.Net9.FindHttpListenerRequestUserAgent
- Find
HttpListenerRequest.UserAgentnullable change - Finds accesses to
HttpListenerRequest.UserAgentwhich changed fromstringtostring?in .NET 9. Code that assumesUserAgentis non-null may throwNullReferenceException.
- Find
- OpenRewrite.Recipes.Net9.FindImplicitAuthenticationDefault
- Find implicit authentication default scheme (ASP.NET Core 9)
- Finds calls to
AddAuthentication()with no arguments. In .NET 9, a single registered authentication scheme is no longer automatically used as the default.
- OpenRewrite.Recipes.Net9.FindInMemoryDirectoryInfo
- Find
InMemoryDirectoryInforootDir prepend change - Finds
new InMemoryDirectoryInfo()constructor calls. In .NET 9,rootDiris prepended to file paths that don't start with therootDir, which may change file matching behavior.
- Find
- OpenRewrite.Recipes.Net9.FindIncrementingPollingCounter
- Find
IncrementingPollingCounterasync callback change - Finds
new IncrementingPollingCounter()constructor calls. In .NET 9, the initial callback invocation is asynchronous instead of synchronous, which may change timing behavior.
- Find
- OpenRewrite.Recipes.Net9.FindJsonDocumentNullable
- Find
JsonSerializer.DeserializenullableJsonDocumentchange - Finds
JsonSerializer.Deserialize()calls. In .NET 9, nullableJsonDocumentproperties now deserialize to aJsonDocumentwithRootElement.ValueKind == JsonValueKind.Nullinstead of beingnull.
- Find
- OpenRewrite.Recipes.Net9.FindJsonStringEnumConverter
- Find non-generic JsonStringEnumConverter
- Finds usages of the non-generic
JsonStringEnumConverter. In .NET 9, the genericJsonStringEnumConverter<TEnum>is preferred for AOT compatibility.
- OpenRewrite.Recipes.Net9.FindRuntimeHelpersGetSubArray
- Find
RuntimeHelpers.GetSubArrayreturn type change - Finds calls to
RuntimeHelpers.GetSubArray()which may return a different array type in .NET 9. Code that depends on the runtime type of the returned array may break.
- Find
- OpenRewrite.Recipes.Net9.FindSafeEvpPKeyHandleDuplicate
- Find
SafeEvpPKeyHandle.DuplicateHandleup-ref change - Finds calls to
SafeEvpPKeyHandle.DuplicateHandle(). In .NET 9, this method now increments the reference count instead of creating a deep copy, which may affect handle lifetime.
- Find
- OpenRewrite.Recipes.Net9.FindServicePointManager
- Find
ServicePointManagerusage (SYSLIB0014) - Finds usages of
ServicePointManagerwhich is fully obsolete in .NET 9 (SYSLIB0014). Settings onServicePointManagerdon't affectSslStreamorHttpClient.
- Find
- OpenRewrite.Recipes.Net9.FindSwashbuckle
- Find Swashbuckle usage (ASP.NET Core 9 built-in OpenAPI)
- Finds usages of Swashbuckle APIs (
AddSwaggerGen,UseSwagger,UseSwaggerUI). .NET 9 includes built-in OpenAPI support. Consider migrating toAddOpenApi()/MapOpenApi().
- OpenRewrite.Recipes.Net9.FindX509CertificateConstructors
- Find obsolete
X509Certificate2/X509Certificateconstructors (SYSLIB0057) - Finds usages of
X509Certificate2andX509Certificateconstructors that accept binary content or file paths, which are obsolete in .NET 9 (SYSLIB0057). UseX509CertificateLoadermethods instead.
- Find obsolete
- OpenRewrite.Recipes.Net9.FindZipArchiveCompressionLevel
- Find
ZipArchive.CreateEntrywithCompressionLevel(bit flag change) - Finds
ZipArchive.CreateEntry()andZipFileExtensions.CreateEntryFromFile()calls with aCompressionLevelparameter. In .NET 9, theCompressionLevelvalue now sets general-purpose bit flags in the ZIP central directory header, which may affect interoperability.
- Find
- OpenRewrite.Recipes.Net9.FindZipArchiveEntryEncoding
- Find
ZipArchiveEntryname/comment UTF-8 encoding change - Finds access to
ZipArchiveEntry.Name,FullName, orCommentproperties. In .NET 9, these now respect the UTF-8 flag in ZIP entries, which may change decoded values.
- Find
- io.moderne.java.spring.framework.FindDeprecatedPathMatcherUsage
- Find deprecated
PathMatcherusage - In Spring Framework 7.0,
PathMatcherandAntPathMatcherare deprecated in favor ofPathPatternParser. This recipe finds usages of the deprecatedAntPathMatcherclass that may require manual migration toPathPatternParser.
- Find deprecated
- io.moderne.java.spring.framework7.FindRemovedAPIs
- Find removed APIs in Spring Framework 7.0
- Finds usages of APIs that were removed in Spring Framework 7.0 and require manual intervention. This includes Theme support, OkHttp3 integration, and servlet view document/feed classes which have no direct automated replacement.
- org.openrewrite.gitlab.search.FindDeprecatedSyntax
- Find deprecated GitLab CI syntax
- Find usages of deprecated
onlyandexceptkeywords in.gitlab-ci.yml. These keywords are deprecated in favor ofrules.
- org.openrewrite.java.spring.security5.search.FindEncryptorsQueryableTextUses
- Finds uses of
Encryptors.queryableText() Encryptors.queryableText()is insecure and is removed in Spring Security 6.
- Finds uses of
secrets
1 recipe
- org.openrewrite.github.ReplaceOssrhSecretsWithSonatype
- Replace OSSRH secrets with Sonatype secrets
- Replace deprecated OSSRH_S01 secrets with new Sonatype secrets in GitHub Actions workflows. This is an example use of the
ReplaceSecretsandReplaceSecretKeysrecipes combined used to update the Maven publishing secrets in OpenRewrite's GitHub organization.
security
74 recipes
- OpenRewrite.Recipes.Net5.FindCodeAccessSecurity
- Find Code Access Security usage (obsolete in .NET 5)
- Finds usages of Code Access Security types (
SecurityPermission,PermissionSet, etc.) which are obsolete in .NET 5+.
- OpenRewrite.Recipes.Net5.FindPrincipalPermissionAttribute
- Find
PrincipalPermissionAttributeusage (SYSLIB0003) - Finds usages of
PrincipalPermissionAttributewhich is obsolete in .NET 5+ (SYSLIB0003) and throwsNotSupportedExceptionat runtime.
- Find
- OpenRewrite.Recipes.Net5.FindUtf7Encoding
- Find
Encoding.UTF7usage (SYSLIB0001) - Finds usages of
Encoding.UTF7andUTF7Encodingwhich are obsolete in .NET 5+ (SYSLIB0001). UTF-7 is insecure.
- Find
- io.moderne.java.spring.security.MigrateAcegiToSpringSecurity_5_0
- Migrate from Acegi Security 1.0.x to Spring Security 5.0
- Migrates Acegi Security 1.0.x directly to Spring Security 5.0. This recipe handles dependency changes, type renames, XML configuration updates, web.xml filter migration, and adds TODO comments for password encoders that require manual migration.
- io.moderne.java.spring.security6.UpgradeSpringSecurity_6_5
- Migrate to Spring Security 6.5 (Moderne Edition)
- Migrate applications to the latest Spring Security 6.5 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- io.moderne.java.spring.security7.MigrateOAuth2AccessTokenResponseClient
- Migrate
OAuth2AccessTokenResponseClientfromRestOperationstoRestClientbased implementations - A new set of
OAuth2AccessTokenResponseClientimplementations were introduced based onRestClient. This recipe replaces theRestOperations-based implementations which have been deprecated. TheRestClientimplementations are drop-in replacements for the deprecated implementations.
- Migrate
- io.moderne.java.spring.security7.ModularizeSpringSecurity7
- Spring Security 7 modularization
- Spring Security Core was modularized in version 7, deprecated classes that are still a crucial part of some applications are moved to
spring-security-access.
- io.quarkus.updates.core.quarkus30.JavaxAuthenticationMigrationToJakartaAuthentication
- Migrate deprecated
javax.security.auth.messagepackages tojakarta.security.auth.message - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- io.quarkus.updates.core.quarkus30.JavaxAuthorizationMigrationToJakartaAuthorization
- Migrate deprecated
javax.security.jaccpackages tojakarta.security.jacc - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.apache.commons.io.RelocateApacheCommonsIo
- Relocate
org.apache.commons:commons-iotocommons-io:commons-io - The deployment of
org.apache.commons:commons-iowas a publishing mistake around 2012 which was corrected by changing the deployment GAV to be located undercommons-io:commons-io.
- Relocate
- org.openrewrite.docker.DockerSecurityBestPractices
- Apply Docker security best practices
- Apply security-focused Docker best practices to Dockerfiles. This includes running as a non-root user (CIS 4.1) and using COPY instead of ADD where appropriate (CIS 4.9).
- org.openrewrite.github.AddDependabotCooldown
- Add cooldown periods to Dependabot configuration
- Adds a
cooldownsection to each update configuration in Dependabot files. Supportsdefault-days,semver-major-days,semver-minor-days,semver-patch-days,include, andexcludeoptions. This implements a security best practice where dependencies are not immediately adopted upon release, allowing time for security vendors to identify potential supply chain compromises. Cooldown applies only to version updates, not security updates. Read more about dependency cooldowns. The available configuration options for dependabot are listed on GitHub.
- org.openrewrite.github.SetupJavaAdoptOpenJDKToTemurin
- Use
actions/setup-javatemurindistribution - Adopt OpenJDK got moved to Eclipse Temurin and won't be updated anymore. It is highly recommended to migrate workflows from adopt to temurin to keep receiving software and security updates. See more details in the Good-bye AdoptOpenJDK post.
- Use
- org.openrewrite.github.SetupJavaAdoptOpenj9ToSemeru
- Use
actions/setup-javaIBMsemerudistribution - Adopt OpenJDK got moved to Eclipse Temurin and won't be updated anymore. It is highly recommended to migrate workflows from adopt-openj9 to IBM semeru to keep receiving software and security updates. See more details in the Good-bye AdoptOpenJDK post.
- Use
- org.openrewrite.github.security.GitHubActionsSecurity
- GitHub Actions security insights
- Finds potential security issues in GitHub Actions workflows, based on Zizmor security analysis rules.
- org.openrewrite.gradle.RemoveRedundantSecurityResolutionRules
- Remove redundant security resolution rules
- Remove
resolutionStrategy.eachDependencyrules that pin dependencies to versions that are already being managed by a platform/BOM to equal or newer versions. Only removes rules that have a security advisory identifier (CVE or GHSA) in thebecauseclause, unless a custom pattern is specified.
- org.openrewrite.gradle.security.UseHttpsForRepositories
- Use HTTPS for repositories
- Use HTTPS for repository URLs.
- org.openrewrite.java.logging.log4j.UpgradeLog4J2DependencyVersion
- Upgrade Log4j 2.x dependency version
- Upgrades the Log4j 2.x dependencies to the latest 2.x version. Mitigates the Log4Shell and other Log4j2-related vulnerabilities.
- org.openrewrite.java.migrate.AccessController
- Remove Security AccessController
- The Security Manager API is unsupported in Java 24. This recipe will remove the usage of
java.security.AccessController.
- org.openrewrite.java.migrate.RemoveSecurityManager
- Remove Security SecurityManager
- The Security Manager API is unsupported in Java 24. This recipe will remove the usage of
java.security.SecurityManager.
- org.openrewrite.java.migrate.RemoveSecurityPolicy
- Remove Security Policy
- The Security Manager API is unsupported in Java 24. This recipe will remove the use of
java.security.Policy.
- org.openrewrite.java.migrate.SystemGetSecurityManagerToNull
- Replace
System.getSecurityManager()withnull - The Security Manager API is unsupported in Java 24. This recipe will replace
System.getSecurityManager()withnullto make its behavior more obvious and try to simplify execution paths afterwards.
- Replace
- org.openrewrite.java.migrate.jakarta.JavaxAuthenticationMigrationToJakartaAuthentication
- Migrate deprecated
javax.security.auth.messagepackages tojakarta.security.auth.message - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxAuthorizationMigrationToJakartaAuthorization
- Migrate deprecated
javax.security.jaccpackages tojakarta.security.jacc - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.search.FindSecrets
- Find plain text secrets
- Find secrets stored in plain text in code.
- org.openrewrite.java.security.JavaSecurityBestPractices
- Java security best practices
- Applies security best practices to Java code.
- org.openrewrite.java.security.Owasp2025A03
- Remediate OWASP A03:2025 Software supply chain failures
- OWASP A03:2025 describes failures related to the software supply chain, including vulnerable and outdated components. Expanded from A06:2021 Vulnerable and Outdated Components.
- org.openrewrite.java.security.Owasp2025A04
- Remediate OWASP A04:2025 Cryptographic failures
- OWASP A04:2025 describes failures related to cryptography (or lack thereof), which often lead to exposure of sensitive data. Previously A02:2021.
- org.openrewrite.java.security.secrets.FindArtifactorySecrets
- Find Artifactory secrets
- Locates Artifactory secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindAwsSecrets
- Find AWS secrets
- Locates AWS secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindAzureSecrets
- Find Azure secrets
- Locates Azure secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindDiscordSecrets
- Find Discord secrets
- Locates Discord secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindFacebookSecrets
- Find Facebook secrets
- Locates Facebook secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindGenericSecrets
- Find generic secrets
- Locates generic secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindGitHubSecrets
- Find GitHub secrets
- Locates GitHub secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindGoogleSecrets
- Find Google secrets
- Locates Google secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindHerokuSecrets
- Find Heroku secrets
- Locates Heroku secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindMailChimpSecrets
- Find MailChimp secrets
- Locates MailChimp secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindMailgunSecrets
- Find Mailgun secrets
- Locates Mailgun secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindNpmSecrets
- Find NPM secrets
- Locates NPM secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindPasswordInUrlSecrets
- Find passwords used in URLs
- Locates URLs that contain passwords in plain text.
- org.openrewrite.java.security.secrets.FindPayPalSecrets
- Find PayPal secrets
- Locates PayPal secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindPgpSecrets
- Find PGP secrets
- Locates PGP secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindPicaticSecrets
- Find Picatic secrets
- Locates Picatic secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindRsaSecrets
- Find RSA private keys
- Locates RSA private keys stored in plain text in code.
- org.openrewrite.java.security.secrets.FindSecrets
- Find secrets
- Locates secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindSendGridSecrets
- Find SendGrid secrets
- Locates SendGrid secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindSquareSecrets
- Find Square secrets
- Locates Square secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindSshSecrets
- Find SSH secrets
- Locates SSH secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindStripeSecrets
- Find Stripe secrets
- Locates Stripe secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindTelegramSecrets
- Find Telegram secrets
- Locates Telegram secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindTwilioSecrets
- Find Twilio secrets
- Locates Twilio secrets stored in plain text in code.
- org.openrewrite.java.security.secrets.FindTwitterSecrets
- Find Twitter secrets
- Locates Twitter secrets stored in plain text in code.
- org.openrewrite.java.security.spring.RemoveEnableWebSecurityDebug
- Remove debug mode from Spring Security
- Removes the debug attribute from @EnableWebSecurity annotations to prevent sensitive security information from being logged in production.
- org.openrewrite.java.spring.security.SpringSecurityBestPractices
- Spring security best practices
- Applies security best practices to Spring applications, including TLS for database and message broker connections.
- org.openrewrite.java.spring.security5.RenameNimbusdsJsonObjectPackageName
- Rename the package name from
com.nimbusds.jose.shaded.jsontonet.minidev.json - Rename the package name from
com.nimbusds.jose.shaded.jsontonet.minidev.json.
- Rename the package name from
- org.openrewrite.java.spring.security5.ReplaceGlobalMethodSecurityWithMethodSecurityXml
- Replace global method security with method security
@EnableGlobalMethodSecurityand<global-method-security>are deprecated in favor of@EnableMethodSecurityand<method-security>, respectively. The new annotation and XML element activate Spring’s pre-post annotations by default and use AuthorizationManager internally.
- org.openrewrite.java.spring.security5.UpgradeSpringSecurity_5_7
- Migrate to Spring Security 5.7
- Migrate applications to the latest Spring Security 5.7 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.java.spring.security5.UpgradeSpringSecurity_5_8
- Migrate to Spring Security 5.8
- Migrate applications to the latest Spring Security 5.8 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.java.spring.security5.search.FindEncryptorsQueryableTextUses
- Finds uses of
Encryptors.queryableText() Encryptors.queryableText()is insecure and is removed in Spring Security 6.
- Finds uses of
- org.openrewrite.java.spring.security6.RemoveUseAuthorizationManager
- Remove unnecessary
use-authorization-managerfor message security in Spring security 6 - In Spring Security 6,
<websocket-message-broker>defaultsuse-authorization-managertotrue. So, theuse-authorization-managerattribute for message security is no longer needed and can be removed.
- Remove unnecessary
- org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_0
- Migrate to Spring Security 6.0
- Migrate applications to the latest Spring Security 6.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_1
- Migrate to Spring Security 6.1
- Migrate applications to the latest Spring Security 6.1 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_2
- Migrate to Spring Security 6.2
- Migrate applications to the latest Spring Security 6.2 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_3
- Migrate to Spring Security 6.3
- Migrate applications to the latest Spring Security 6.3 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_4
- Migrate to Spring Security 6.4
- Migrate applications to the latest Spring Security 6.4 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_5
- Migrate to Spring Security 6.5 (Community Edition)
- Migrate applications to the latest Spring Security 6.5 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.java.spring.security7.SecurityConfigurerRemoveThrowsException
- Remove throws exception in
SecurityConfigurermethodsinitandconfigure - Remove throws exception in
SecurityConfigurermethodsinitandconfigure.
- Remove throws exception in
- org.openrewrite.java.spring.security7.UpgradeSpringSecurity_7_0
- Migrate to Spring Security 7.0
- Migrate applications to the latest Spring Security 7.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.maven.security.UseHttpsForRepositories
- Use HTTPS for repositories
- Use HTTPS for repository URLs.
- org.openrewrite.python.migrate.FindTempfileMktemp
- Find deprecated
tempfile.mktemp()usage - Find usage of
tempfile.mktemp()which is deprecated due to security concerns (race condition). Usemkstemp()orNamedTemporaryFile()instead.
- Find deprecated
- org.openrewrite.quarkus.spring.SpringBootOAuth2ClientToQuarkus
- Replace Spring Boot OAuth2 Client with Quarkus OIDC Client
- Migrates spring-boot-starter-oauth2-client
toquarkus-oidc-client`.
- org.openrewrite.quarkus.spring.SpringBootOAuth2ResourceServerToQuarkus
- Replace Spring Boot OAuth2 Resource Server with Quarkus OIDC
- Migrates
spring-boot-starter-oauth2-resource-servertoquarkus-oidc.
- org.openrewrite.quarkus.spring.SpringBootSecurityToQuarkus
- Replace Spring Boot Security with Quarkus Security
- Migrates
spring-boot-starter-securitytoquarkus-security.
serialization
8 recipes
- OpenRewrite.Recipes.Net3_0.FindNewtonsoftJson
- Find Newtonsoft.Json usage
- Finds usages of Newtonsoft.Json types (
JObject,JArray,JToken,JsonConvert) that should be migrated toSystem.Text.Jsonor explicitly preserved viaMicrosoft.AspNetCore.Mvc.NewtonsoftJsonin ASP.NET Core 3.0+.
- OpenRewrite.Recipes.Net6.FindIgnoreNullValues
- Find
JsonSerializerOptions.IgnoreNullValuesusage (SYSLIB0020) - Finds usages of
JsonSerializerOptions.IgnoreNullValueswhich is obsolete in .NET 6 (SYSLIB0020). UseDefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNullinstead.
- Find
- OpenRewrite.Recipes.Net8.FindAddContext
- Find
JsonSerializerOptions.AddContextusage (SYSLIB0049) - Finds calls to
JsonSerializerOptions.AddContext<T>()which is obsolete in .NET 8 (SYSLIB0049). UseTypeInfoResolverChainorTypeInfoResolverinstead.
- Find
- OpenRewrite.Recipes.Net8.FindFormatterBasedSerialization
- Find formatter-based serialization types (SYSLIB0050/0051)
- Finds usage of formatter-based serialization types (
FormatterConverter,IFormatter,ObjectIDGenerator,ObjectManager,SurrogateSelector,SerializationInfo,StreamingContext). These are obsolete in .NET 8 (SYSLIB0050/0051).
- OpenRewrite.Recipes.Net8.FindSerializationConstructors
- Find legacy serialization constructors (SYSLIB0051)
- Finds legacy serialization constructors
.ctor(SerializationInfo, StreamingContext)which are obsolete in .NET 8 (SYSLIB0051). TheISerializablepattern is no longer recommended.
- OpenRewrite.Recipes.Net9.FindBinaryFormatter
- Find
BinaryFormatterusage (removed in .NET 9) - Finds usages of
BinaryFormatterwhich always throwsNotSupportedExceptionin .NET 9. Migrate to a different serializer such asSystem.Text.Json,XmlSerializer, orDataContractSerializer.
- Find
- OpenRewrite.Recipes.Net9.FindJsonDocumentNullable
- Find
JsonSerializer.DeserializenullableJsonDocumentchange - Finds
JsonSerializer.Deserialize()calls. In .NET 9, nullableJsonDocumentproperties now deserialize to aJsonDocumentwithRootElement.ValueKind == JsonValueKind.Nullinstead of beingnull.
- Find
- OpenRewrite.Recipes.Net9.FindJsonStringEnumConverter
- Find non-generic JsonStringEnumConverter
- Finds usages of the non-generic
JsonStringEnumConverter. In .NET 9, the genericJsonStringEnumConverter<TEnum>is preferred for AOT compatibility.
service
1 recipe
- org.openrewrite.quarkus.spring.MigrateSpringCloudServiceDiscovery
- Migrate Spring Cloud Service Discovery to Quarkus
- Migrates Spring Cloud Service Discovery annotations and configurations to Quarkus equivalents. Converts @EnableDiscoveryClient and related patterns to Quarkus Stork service discovery.
- Tags: service-discovery
servlet
1 recipe
- com.oracle.weblogic.rewrite.jakarta.AddJakartaEE9ServletDependencyIfUsingServletContext
- Add Jakarta EE 9 Servlet Dependency
- Add Jakarta EE 9 Servlet Dependency if using jakarta.servlet.ServletContext
session
1 recipe
- io.moderne.java.spring.boot4.MigrateHazelcastSpringSession
- Migrate Spring Session Hazelcast to Hazelcast Spring Session
- Spring Boot 4.0 removed direct support for Spring Session Hazelcast. The Hazelcast team now maintains their own Spring Session integration. This recipe changes the dependency from
org.springframework.session:spring-session-hazelcasttocom.hazelcast.spring:hazelcast-spring-sessionand updates the package fromorg.springframework.session.hazelcasttocom.hazelcast.spring.session.
shutil
1 recipe
- org.openrewrite.python.migrate.FindShutilRmtreeOnerror
- Find deprecated
shutil.rmtree(onerror=...)parameter - The
onerrorparameter ofshutil.rmtree()was deprecated in Python 3.12 in favor ofonexc. Theonexccallback receives the exception object directly rather than an exc_info tuple.
- Find deprecated
simplification
1 recipe
- OpenRewrite.Recipes.CodeQuality.Simplification.SimplificationCodeQuality
- Simplification code quality
- Simplify expressions and patterns in C# code.
sleuth
2 recipes
- org.openrewrite.java.spring.cloud2022.MigrateCloudSleuthToMicrometerTracing
- Migrate Spring Cloud Sleuth 3.1 to Micrometer Tracing 1.0
- Spring Cloud Sleuth has been discontinued and only compatible with Spring Boot 2.x.
- org.openrewrite.java.spring.opentelemetry.MigrateSleuthToOpenTelemetry
- Migrate from Spring Cloud Sleuth to OpenTelemetry
- Migrate from Spring Cloud Sleuth to OpenTelemetry. Spring Cloud Sleuth has been deprecated and is replaced by Micrometer Tracing with OpenTelemetry as a backend. This recipe removes Sleuth dependencies and adds OpenTelemetry instrumentation.
slf4j
15 recipes
- org.openrewrite.java.logging.log4j.Slf4jToLog4j
- Migrate SLF4J to Log4j 2.x API
- Transforms code written using SLF4J to use Log4j 2.x API.
- org.openrewrite.java.logging.slf4j.CommonsLogging1ToSlf4j1
- Migrate Apache Commons Logging 1.x to SLF4J 1.x
- Transforms usages of Apache Commons Logging 1.x to leveraging SLF4J 1.x directly.
- org.openrewrite.java.logging.slf4j.CompleteExceptionLogging
- Enhances logging of exceptions by including the full stack trace in addition to the exception message
- It is a common mistake to call
Exception.getMessage()when passing an exception into a log method. Not all exception types have useful messages, and even if the message is useful this omits the stack trace. Including a complete stack trace of the error along with the exception message in the log allows developers to better understand the context of the exception and identify the source of the error more quickly and accurately. If the method invocation includes any call toException.getMessage()orException.getLocalizedMessage()and not an exception is already passed as the last parameter to the log method, then we will append the exception as the last parameter in the log method.
- org.openrewrite.java.logging.slf4j.JBossLoggingToSlf4j
- Migrate JBoss Logging to SLF4J
- Migrates usage of the JBoss Logging facade to using SLF4J.
- org.openrewrite.java.logging.slf4j.JulToSlf4j
- Migrate JUL to SLF4J
- Migrates usage of Java Util Logging (JUL) to using SLF4J directly.
- org.openrewrite.java.logging.slf4j.Log4j1ToSlf4j1
- Migrate Log4j 1.x to SLF4J 1.x
- Transforms usages of Log4j 1.x to leveraging SLF4J 1.x directly. Note, this currently does not modify
log4j.propertiesfiles.
- org.openrewrite.java.logging.slf4j.Log4j2ToSlf4j1
- Migrate Log4j 2.x to SLF4J 1.x
- Transforms usages of Log4j 2.x to leveraging SLF4J 1.x directly. Note, this currently does not modify
log4j.propertiesfiles.
- org.openrewrite.java.logging.slf4j.Log4jToSlf4j
- Migrate Log4j to SLF4J
- Migrates usage of Apache Log4j to using SLF4J directly. Use of the traditional Log4j to SLF4J bridge can result in loss of performance, as the Log4j messages must be formatted before they can be passed to SLF4J. Note, this currently does not modify
log4j.propertiesfiles.
- org.openrewrite.java.logging.slf4j.LoggersNamedForEnclosingClass
- Loggers should be named for their enclosing classes
- Ensure
LoggerFactory#getLogger(Class)is called with the enclosing class as argument.
- org.openrewrite.java.logging.slf4j.MessageFormatToParameterizedLogging
MessageFormat.format()in logging statements should use SLF4J parameterized logging- Replace
MessageFormat.format()calls in SLF4J logging statements with parameterized placeholders for improved performance.
- org.openrewrite.java.logging.slf4j.ParameterizedLogging
- Parameterize SLF4J's logging statements
- Use SLF4J's parameterized logging, which can significantly boost performance for messages that otherwise would be assembled with String concatenation. Particularly impactful when the log level is not enabled, as no work is done to assemble the message.
- org.openrewrite.java.logging.slf4j.RemoveUnnecessaryLogLevelGuards
- Remove unnecessary log level guards
- Remove
ifstatement guards around SLF4J logging calls when parameterized logging makes them unnecessary.
- org.openrewrite.java.logging.slf4j.Slf4jBestPractices
- SLF4J best practices
- Applies best practices to logging with SLF4J.
- org.openrewrite.java.logging.slf4j.Slf4jLogShouldBeConstant
- SLF4J logging statements should begin with constants
- Logging statements shouldn't begin with
String#format, calls totoString(), etc.
- org.openrewrite.java.logging.slf4j.StringFormatToParameterizedLogging
String.format()in logging statements should use SLF4J parameterized logging- Replace
String.format()calls in SLF4J logging statements with parameterized placeholders for improved performance.
socket
1 recipe
- org.openrewrite.python.migrate.FindSocketGetFQDN
- Find
socket.getfqdn()usage - Find usage of
socket.getfqdn()which can be slow and unreliable. Consider usingsocket.gethostname()instead.
- Find
spring
200 recipes
- io.moderne.java.spring.boot.ReplaceSpringFrameworkDepsWithBootStarters
- Replace Spring Framework dependencies with Spring Boot starters
- Replace common Spring Framework dependencies with their Spring Boot starter equivalents. This recipe handles the direct dependency replacement; any remaining Spring Framework dependencies that become transitively available through starters are cleaned up separately by RemoveRedundantDependencies.
- io.moderne.java.spring.boot.SpringToSpringBoot
- Migrate Spring Framework to Spring Boot
- Migrate non Spring Boot applications to the latest compatible Spring Boot release. This recipe will modify an application's build files introducing Maven dependency management for Spring Boot, or adding the Gradle Spring Boot build plugin.
- io.moderne.java.spring.boot2.UpgradeSpringBoot_2_0
- Migrate to Spring Boot 2.0 (Moderne Edition)
- Migrate applications to the latest Spring Boot 2.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.0.
- io.moderne.java.spring.boot3.CommentDeprecations
- Comment deprecated methods in Spring 3.4
- Spring Boot 3.4 deprecates methods that are not commonly used or need manual interaction.
- io.moderne.java.spring.boot3.ReplaceTaskExecutorNameByApplicationTaskExecutorName
- Use bean name
applicationTaskExecutorinstead oftaskExecutor - Spring Boot 3.5 removed the bean name
taskExecutor. Where this bean name is used, the recipe replaces the bean name toapplicationTaskExecutor. This also includes instances where the developer provided their own bean namedtaskExecutor. This also includes scenarios where JSR-250's@Resourceannotation is used.
- Use bean name
- io.moderne.java.spring.boot3.ResolveDeprecationsSpringBoot_3_3
- Resolve Deprecations in Spring Boot 3.3
- Migrates Deprecations in the Spring Boot 3.3 Release. Contains the removal of
DefaultJmsListenerContainerFactoryConfigurer.setObservationRegistryand adds new parameter ofWebEndpointDiscovererconstructor.
- io.moderne.java.spring.boot3.SpringBoot34Deprecations
- Migrate Spring Boot 3.4 deprecated classes and methods
- Migrate deprecated classes and methods that have been marked for removal in Spring Boot 4.0. This includes constructor changes for
EntityManagerFactoryBuilder,HikariCheckpointRestoreLifecycle, and various actuator endpoint discovery classes.
- io.moderne.java.spring.boot3.SpringBoot35Deprecations
- Migrate Spring Boot 3.5 deprecated classes and methods
- Migrate deprecated classes and methods that have been marked for removal in Spring Boot 3.5.
- io.moderne.java.spring.boot3.SpringBoot3BestPractices
- Spring Boot 3.5 best practices
- Applies best practices to Spring Boot 3.5+ applications.
- io.moderne.java.spring.boot3.SpringBootProperties_3_4
- Migrate
@EndpointSecurity properties to 3.4 (Moderne Edition) - Migrate the settings for Spring Boot Management Endpoint Security from
true|falsetoread-only|none.
- Migrate
- io.moderne.java.spring.boot3.UpdateOpenTelemetryResourceAttributes
- Update OpenTelemetry resource attributes
- The
service.groupresource attribute has been deprecated for OpenTelemetry in Spring Boot 3.5. Consider using alternative attributes or remove the deprecated attribute.
- io.moderne.java.spring.boot3.UpgradeGradle7Spring34
- Upgrade Gradle to 7.6.4+ for Spring Boot 3.4
- Spring Boot 3.4 requires Gradle 7.6.4.
- io.moderne.java.spring.boot3.UpgradeGradle8Spring34
- Upgrade Gradle 8 to 8.4+ for Spring Boot 3.4
- Spring Boot 3.4 requires Gradle 8.4+.
- io.moderne.java.spring.boot3.UpgradeSpringBoot_3_4
- Migrate to Spring Boot 3.4 (Moderne Edition)
- Migrate applications to the latest Spring Boot 3.4 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 3.4.
- io.moderne.java.spring.boot3.UpgradeSpringBoot_3_5
- Migrate to Spring Boot 3.5 (Moderne Edition)
- Migrate applications to the latest Spring Boot 3.5 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 3.5.
- io.moderne.java.spring.boot3.UpgradeSpringKafka_3_3
- Migrate to Spring Kafka 3.3
- Migrate applications to the latest Spring Kafka 3.3 release.
- io.moderne.java.spring.boot4.AddJackson2ForJerseyJson
- Add Jackson2 for Jersey using JSON
- Check whether a module uses Jersey on combination with JSON and adds the needed
spring-boot-jacksondependency and conditionallyspring-boot-jackson2dependency.
- io.moderne.java.spring.boot4.AddModularStarters
- Add Spring Boot 4.0 modular starters
- Add Spring Boot 4.0 starter dependencies based on package usage. Note: Higher-level starters (like data-jpa) include lower-level ones (like jdbc) transitively, so only the highest-level detected starter is added for each technology.
- io.moderne.java.spring.boot4.AddMongoDbRepresentationProperties
- Add MongoDB representation properties for UUID and BigDecimal
- Adds the 'spring.mongodb.representation.uuid' property with value 'standard' and the 'spring.data.mongodb.representation.big-decimal' property with the value 'decimal128' to Spring configuration files when a MongoDB dependency is detected.
- io.moderne.java.spring.boot4.AddValidationStarterDependency
- Add
spring-boot-starter-validationdependency - In Spring Boot 4, validation is no longer auto-included from the web starter. This recipe adds the
spring-boot-starter-validationdependency when Jakarta Validation annotations are used in the project.
- Add
- io.moderne.java.spring.boot4.AdoptJackson3
- Adopt Jackson 3
- Adopt Jackson 3 which is supported by Spring Boot 4 and Jackson 2 support is deprecated.
- io.moderne.java.spring.boot4.MigrateHazelcastSpringSession
- Migrate Spring Session Hazelcast to Hazelcast Spring Session
- Spring Boot 4.0 removed direct support for Spring Session Hazelcast. The Hazelcast team now maintains their own Spring Session integration. This recipe changes the dependency from
org.springframework.session:spring-session-hazelcasttocom.hazelcast.spring:hazelcast-spring-sessionand updates the package fromorg.springframework.session.hazelcasttocom.hazelcast.spring.session.
- io.moderne.java.spring.boot4.MigrateMockMvcToAssertJ
- Migrate MockMvc to AssertJ assertions
- Migrates Spring MockMvc tests from Hamcrest-style
andExpect()assertions to AssertJ-style fluent assertions. ChangesMockMvctoMockMvcTesterand converts assertion chains.
- io.moderne.java.spring.boot4.MigrateRestAssured
- Add explicit version for REST Assured
- REST Assured is no longer managed by Spring Boot 4.0. This recipe adds an explicit version to REST Assured dependencies.
- io.moderne.java.spring.boot4.MigrateSpringRetry
- Migrate Spring Retry to Spring Resilience
- Handle spring-retry no longer managed by Spring Boot and the possible migration to Spring Core Resilience.
- io.moderne.java.spring.boot4.MigrateToModularStarters
- Migrate to Spring Boot 4.0 modular starters (Moderne Edition)
- Remove monolithic starters and adds the necessary Spring Boot 4.0 starter dependencies based on package usage, where any spring-boot-starter was used previously.
- io.moderne.java.spring.boot4.ModuleStarterRelocations
- Spring Boot 4.0 Module Starter Relocations
- Relocate types and packages for Spring Boot 4.0 modular starters.
- io.moderne.java.spring.boot4.RemoveSpringPulsarReactive
- Remove Spring Pulsar Reactive support
- Spring Boot 4.0 removed support for Spring Pulsar Reactive as it is no longer maintained. This recipe removes the Spring Pulsar Reactive dependencies.
- io.moderne.java.spring.boot4.SpringBoot4BestPractices
- Spring Boot 4.0 best practices
- Applies best practices to Spring Boot 4.+ applications.
- io.moderne.java.spring.boot4.UpgradeSpringBoot_4_0
- Migrate to Spring Boot 4.0 (Moderne Edition)
- Migrate applications to the latest Spring Boot 4.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 4.0.
- io.moderne.java.spring.boot4.UpgradeSpringKafka_4_0
- Migrate to Spring Kafka 4.0
- Migrate applications to Spring Kafka 4.0. This includes removing deprecated configuration options that are no longer supported.
- io.moderne.java.spring.cloud2020.SpringCloudProperties_2020
- Migrate Spring Cloud properties to 2020
- Migrate properties found in
application.propertiesandapplication.yml.
- io.moderne.java.spring.cloud2021.SpringCloudProperties_2021
- Migrate Spring Cloud properties to 2021
- Migrate properties found in
application.propertiesandapplication.yml.
- io.moderne.java.spring.cloud2022.SpringCloudProperties_2022
- Migrate Spring Cloud properties to 2022
- Migrate properties found in
application.propertiesandapplication.yml.
- io.moderne.java.spring.cloud2023.SpringCloudProperties_2023
- Migrate Spring Cloud properties to 2023
- Migrate properties found in
application.propertiesandapplication.yml.
- io.moderne.java.spring.cloud2024.SpringCloudProperties_2024
- Migrate Spring Cloud properties to 2024
- Migrate properties found in
application.propertiesandapplication.yml.
- io.moderne.java.spring.cloud2025.SpringCloudProperties_2025
- Migrate Spring Cloud properties to 2025
- Migrate properties found in
application.propertiesandapplication.yml.
- io.moderne.java.spring.cloud20251.SpringCloudProperties_2025_1
- Migrate Spring Cloud properties to 2025.1
- Migrate properties found in
application.propertiesandapplication.ymlfor Spring Cloud 2025.1 (Oakwood). This includes the stubrunner property prefix migration fromstubrunner.tospring.cloud.contract.stubrunner..
- io.moderne.java.spring.cloud20251.UpgradeSpringCloud_2025_1
- Upgrade to Spring Cloud 2025.1
- Upgrade to Spring Cloud 2025.1 (Oakwood). This release is based on Spring Framework 7 and Spring Boot 4. Each Spring Cloud project has been updated to version 5.0.0.
- io.moderne.java.spring.framework.FindDeprecatedPathMatcherUsage
- Find deprecated
PathMatcherusage - In Spring Framework 7.0,
PathMatcherandAntPathMatcherare deprecated in favor ofPathPatternParser. This recipe finds usages of the deprecatedAntPathMatcherclass that may require manual migration toPathPatternParser.
- Find deprecated
- io.moderne.java.spring.framework.MigrateDefaultResponseErrorHandler
- Migrate
DefaultResponseErrorHandler.handleErrormethod signature - Migrates overridden
handleError(ClientHttpResponse response)methods to the new signaturehandleError(URI url, HttpMethod method, ClientHttpResponse response)in classes extendingDefaultResponseErrorHandler. The old single-argument method was removed in Spring Framework 7.0.
- Migrate
- io.moderne.java.spring.framework.RemoveDeprecatedPathMappingOptions
- Migrate deprecated path mapping options
- Migrates deprecated path mapping configuration options that have been removed in Spring Framework 7.0. For trailing slash matching, this recipe adds explicit dual routes to controller methods before removing the deprecated configuration. For suffix pattern matching, this recipe flags usages for manual review since there is no automatic migration path. Path extension content negotiation options are removed as they should be replaced with query parameter-based negotiation.
- io.moderne.java.spring.framework.RemovePathExtensionContentNegotiation
- Remove path extension content negotiation methods
- Remove calls to
favorPathExtension()andignoreUnknownPathExtensions()onContentNegotiationConfigurer. These methods and the underlyingPathExtensionContentNegotiationStrategywere removed in Spring Framework 7.0. Path extension content negotiation was deprecated due to URI handling issues. Use query parameter-based negotiation withfavorParameter(true)as an alternative.
- io.moderne.java.spring.framework.jsf23.MigrateFacesConfig
- Migrate JSF variable-resolver to el-resolver
- Migrates JSF faces-config.xml from namespaces, tags and values that was deprecated in JSF 1.2 and removed in later versions, to the JSF 2.3 compatible constructs.
- io.moderne.java.spring.framework7.FindRemovedAPIs
- Find removed APIs in Spring Framework 7.0
- Finds usages of APIs that were removed in Spring Framework 7.0 and require manual intervention. This includes Theme support, OkHttp3 integration, and servlet view document/feed classes which have no direct automated replacement.
- io.moderne.java.spring.framework7.MigrateDeprecatedAPIs
- Migrate deprecated APIs removed in Spring Framework 7.0
- Migrates deprecated APIs that were removed in Spring Framework 7.0. This includes ListenableFuture to CompletableFuture migration.
- io.moderne.java.spring.framework7.MigrateHttpStatusToRfc9110
- Migrate
HttpStatusenum values to RFC 9110 names - Spring Framework 7.0 aligns HttpStatus enum values with RFC 9110. This recipe replaces deprecated status code constants with their RFC 9110 equivalents:
PAYLOAD_TOO_LARGEbecomesCONTENT_TOO_LARGEandUNPROCESSABLE_ENTITYbecomesUNPROCESSABLE_CONTENT.
- Migrate
- io.moderne.java.spring.framework7.MigrateJmsDestinationResolver
- Preserve DynamicDestinationResolver behavior for JmsTemplate
- Spring Framework 7.0 changed the default
DestinationResolverforJmsTemplatefromDynamicDestinationResolvertoSimpleDestinationResolver, which caches Session-resolved Queue and Topic instances. This recipe explicitly configuresDynamicDestinationResolverto preserve the pre-7.0 behavior. The caching behavior ofSimpleDestinationResolvershould be fine for most JMS brokers, so this explicit configuration can be removed once verified.
- io.moderne.java.spring.framework7.RemoveSpringJcl
- Remove spring-jcl dependency
- The
spring-jclmodule has been removed in Spring Framework 7.0 in favor of Apache Commons Logging 1.3.0. This recipe removes any explicit dependency onorg.springframework:spring-jcl. The change should be transparent for most applications, as spring-jcl was typically a transitive dependency and the logging API calls (org.apache.commons.logging.*) remain unchanged.
- io.moderne.java.spring.framework7.RenameMemberCategoryConstants
- Rename MemberCategory field constants for Spring Framework 7.0
- Renames deprecated
MemberCategoryconstants to their new names in Spring Framework 7.0.MemberCategory.PUBLIC_FIELDSis renamed toMemberCategory.INVOKE_PUBLIC_FIELDSandMemberCategory.DECLARED_FIELDSis renamed toMemberCategory.INVOKE_DECLARED_FIELDS. These renames clarify the original intent of these categories and align with the rest of the API.
- io.moderne.java.spring.framework7.RenameRequestContextJstlPresent
- Rename
RequestContext.jstPresenttoJSTL_PRESENT - Renames the protected static field
RequestContext.jstPresenttoJSTL_PRESENTin Spring Framework 7.0. This field was renamed as part of a codebase-wide effort to use uppercase for classpath-related static final field names (see https://github.com/spring-projects/spring-framework/issues/35525).
- Rename
- io.moderne.java.spring.framework7.UpdateGraalVmNativeHints
- Update GraalVM native reflection hints for Spring Framework 7.0
- Migrates GraalVM native reflection hints to Spring Framework 7.0 conventions. Spring Framework 7.0 adopts the unified reachability metadata format for GraalVM. This recipe renames deprecated
MemberCategoryconstants and simplifies reflection hint registrations where explicit member categories are no longer needed.
- io.moderne.java.spring.framework7.UpgradeSpringFramework_7_0
- Migrate to Spring Framework 7.0
- Migrates applications to Spring Framework 7.0. This recipe applies all necessary changes including API migrations, removed feature detection, and configuration updates.
- io.moderne.java.spring.orm.SpringORM5
- Migrate to Spring ORM to 5
- Migrate applications using Spring ORM Hibernate Support to Hibernate 5 compatible version. This will enable a further migration by the Spring Framework migration past 5.
- io.moderne.java.spring.security.MigrateAcegiToSpringSecurity_5_0
- Migrate from Acegi Security 1.0.x to Spring Security 5.0
- Migrates Acegi Security 1.0.x directly to Spring Security 5.0. This recipe handles dependency changes, type renames, XML configuration updates, web.xml filter migration, and adds TODO comments for password encoders that require manual migration.
- io.moderne.java.spring.security6.UpgradeSpringSecurity_6_5
- Migrate to Spring Security 6.5 (Moderne Edition)
- Migrate applications to the latest Spring Security 6.5 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- io.moderne.java.spring.security7.MigrateOAuth2AccessTokenResponseClient
- Migrate
OAuth2AccessTokenResponseClientfromRestOperationstoRestClientbased implementations - A new set of
OAuth2AccessTokenResponseClientimplementations were introduced based onRestClient. This recipe replaces theRestOperations-based implementations which have been deprecated. TheRestClientimplementations are drop-in replacements for the deprecated implementations.
- Migrate
- io.moderne.java.spring.security7.ModularizeSpringSecurity7
- Spring Security 7 modularization
- Spring Security Core was modularized in version 7, deprecated classes that are still a crucial part of some applications are moved to
spring-security-access.
- org.openrewrite.java.spring.batch.SpringBatch4To5Migration
- Migrate to Spring Batch 5.0 from 4.3
- Migrate applications built on Spring Batch 4.3 to the latest Spring Batch 5.0 release.
- org.openrewrite.java.spring.batch.SpringBatch5To6Migration
- Migrate to Spring Batch 6.0 from 5.2
- Migrate applications built on Spring Batch 5.2 to the latest Spring Batch 6.0 release.
- org.openrewrite.java.spring.boot2.SpringBoot2BestPractices
- Spring Boot 2.x best practices
- Applies best practices to Spring Boot 2 applications.
- org.openrewrite.java.spring.boot2.SpringBoot2JUnit4to5Migration
- Migrate Spring Boot 2.x projects to JUnit 5 from JUnit 4
- This recipe will migrate a Spring Boot application's tests from JUnit 4 to JUnit 5. This spring-specific migration includes conversion of Spring Test runners to Spring Test extensions and awareness of the composable Spring Test annotations.
- org.openrewrite.java.spring.boot2.SpringBootProperties_2_0
- Migrate Spring Boot properties to 2.0
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot2.SpringBootProperties_2_1
- Migrate Spring Boot properties to 2.1
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot2.SpringBootProperties_2_2
- Migrate Spring Boot properties to 2.2
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot2.SpringBootProperties_2_3
- Migrate Spring Boot properties to 2.3
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot2.SpringBootProperties_2_4
- Migrate Spring Boot properties to 2.4
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot2.SpringBootProperties_2_5
- Migrate Spring Boot properties to 2.5
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot2.SpringBootProperties_2_6
- Migrate Spring Boot properties to 2.6
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot2.SpringBootProperties_2_7
- Migrate Spring Boot properties to 2.7
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_0
- Migrate from Spring Boot 1.x to 2.0 (Community Edition)
- Migrate Spring Boot 1.x applications to the latest Spring Boot 2.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.0.
- org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_1
- Migrate to Spring Boot 2.1
- Migrate applications to the latest Spring Boot 2.1 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.1.
- org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_2
- Migrate to Spring Boot 2.2
- Migrate applications to the latest Spring Boot 2.2 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.2.
- org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_3
- Migrate to Spring Boot 2.3
- Migrate applications to the latest Spring Boot 2.3 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.3.
- org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_4
- Migrate to Spring Boot 2.4
- Migrate applications to the latest Spring Boot 2.4 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.4.
- org.openrewrite.java.spring.boot2.UpgradeSpringBoot_2_6
- Migrate to Spring Boot 2.6
- Migrate applications to the latest Spring Boot 2.6 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.6.
- org.openrewrite.java.spring.boot2.search.FindUpgradeRequirementsSpringBoot_2_5
- Find patterns that require updating for Spring Boot 2.5
- Looks for a series of patterns that have not yet had auto-remediation recipes developed for.
- org.openrewrite.java.spring.boot2.search.MessagesInTheDefaultErrorView
- Find projects affected by changes to the default error view message attribute
- As of Spring Boot 2.5 the
messageattribute in the default error view was removed rather than blanked when it is not shown.spring-webmvcorspring-webfluxprojects that parse the error response JSON may need to deal with the missing item (release notes). You can still use theserver.error.include-messageproperty if you want messages to be included.
- org.openrewrite.java.spring.boot3.ActuatorEndpointSanitization
- Remove the deprecated properties
additional-keys-to-sanitizefrom theconfigpropsandenvend points - Spring Boot 3.0 removed the key-based sanitization mechanism used in Spring Boot 2.x in favor of a unified approach. See https://github.com/openrewrite/rewrite-spring/issues/228.
- Remove the deprecated properties
- org.openrewrite.java.spring.boot3.DowngradeServletApiWhenUsingJetty
- Downgrade Jakarta Servlet API to 5.0 when using Jetty
- Jetty does not yet support Servlet 6.0. This recipe will detect the presence of the
spring-boot-starter-jettyas a first-order dependency and will add the maven propertyjakarta-servlet.versionsetting it's value to5.0.0. This will downgrade thejakarta-servletartifact if the pom's parent extends from the spring-boot-parent.
- org.openrewrite.java.spring.boot3.MigrateDropWizardDependencies
- Migrate dropWizard dependencies to Spring Boot 3.x
- Migrate dropWizard dependencies to the new artifactId, since these are changed with Spring Boot 3.
- org.openrewrite.java.spring.boot3.MigrateMaxHttpHeaderSize
- Rename
server.max-http-header-sizetoserver.max-http-request-header-size - Previously, the server.max-http-header-size was treated inconsistently across the four supported embedded web servers. When using Jetty, Netty, or Undertow it would configure the max HTTP request header size. When using Tomcat it would configure the max HTTP request and response header sizes. The renamed property is used to configure the http request header size in Spring Boot 3.0. To limit the max header size of an HTTP response on Tomcat or Jetty (the only two servers that support such a setting), use a
WebServerFactoryCustomizer.
- Rename
- org.openrewrite.java.spring.boot3.MigrateSapCfJavaLoggingSupport
- Migrate SAP cloud foundry logging support to Spring Boot 3.x
- Migrate SAP cloud foundry logging support from
cf-java-logging-support-servlettocf-java-logging-support-servlet-jakarta, to use Jakarta with Spring Boot 3.
- org.openrewrite.java.spring.boot3.MigrateThymeleafDependencies
- Migrate thymeleaf dependencies to Spring Boot 3.x
- Migrate thymeleaf dependencies to the new artifactId, since these are changed with Spring Boot 3.
- org.openrewrite.java.spring.boot3.ReplaceStringLiteralsWithConstants
- Replace String literals with Spring constants
- Replace String literals with Spring constants where applicable.
- org.openrewrite.java.spring.boot3.SpringBoot33BestPractices
- Spring Boot 3.3 best practices
- Applies best practices to Spring Boot 3 applications.
- org.openrewrite.java.spring.boot3.SpringBoot3BestPracticesOnly
- Spring Boot 3.3 best practices (only)
- Applies best practices to Spring Boot 3 applications, without chaining in upgrades to Spring Boot.
- org.openrewrite.java.spring.boot3.SpringBootProperties_3_0
- Migrate Spring Boot properties to 3.0
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot3.SpringBootProperties_3_1
- Migrate Spring Boot properties to 3.1
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot3.SpringBootProperties_3_2
- Migrate Spring Boot properties to 3.2
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot3.SpringBootProperties_3_3
- Migrate Spring Boot properties to 3.3
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot3.SpringBootProperties_3_4
- Migrate Spring Boot properties to 3.4 (Community Edition)
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot3.SpringBootProperties_3_4_EnabledToAccess
- Migrate Enabled to Access Spring Boot Properties
- Migrate properties found in
application.propertiesandapplication.yml, specifically converting 'enabled' to 'access'.
- org.openrewrite.java.spring.boot3.SpringBootProperties_3_5
- Migrate Spring Boot properties to 3.5
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_0
- Migrate to Spring Boot 3.0
- Migrate applications to the latest Spring Boot 3.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 2.7.
- org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_1
- Migrate to Spring Boot 3.1
- Migrate applications to the latest Spring Boot 3.1 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 3.0.
- org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_2
- Migrate to Spring Boot 3.2
- Migrate applications to the latest Spring Boot 3.2 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 3.1.
- org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_3
- Migrate to Spring Boot 3.3
- Migrate applications to the latest Spring Boot 3.3 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions. This recipe will also chain additional framework migrations (Spring Framework, Spring Data, etc) that are required as part of the migration to Spring Boot 3.2.
- org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_4
- Migrate to Spring Boot 3.4 (Community Edition)
- Migrate applications to the latest Spring Boot 3.4 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs.
- org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_5
- Migrate to Spring Boot 3.5 (Community Edition)
- Migrate applications to the latest Spring Boot 3.5 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs.
- org.openrewrite.java.spring.boot4.SpringBootProperties_4_0
- Migrate Spring Boot properties to 4.0
- Migrate properties found in
application.propertiesandapplication.yml.
- org.openrewrite.java.spring.boot4.UpgradeSpringBoot_4_0
- Migrate to Spring Boot 4.0 (Community Edition)
- Migrate applications to the latest Spring Boot 4.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs.
- org.openrewrite.java.spring.cloud2022.DependencyUpgrades
- Upgrade dependencies to Spring Cloud 2022
- Upgrade dependencies to Spring Cloud 2022 from prior 2021.x version.
- org.openrewrite.java.spring.cloud2022.MigrateCloudSleuthToMicrometerTracing
- Migrate Spring Cloud Sleuth 3.1 to Micrometer Tracing 1.0
- Spring Cloud Sleuth has been discontinued and only compatible with Spring Boot 2.x.
- org.openrewrite.java.spring.cloud2022.UpgradeSpringCloud_2022
- Migrate to Spring Cloud 2022
- Migrate applications to the latest Spring Cloud 2022 (Kilburn) release.
- org.openrewrite.java.spring.cloud2023.DependencyUpgrades
- Upgrade dependencies to Spring Cloud 2023
- Upgrade dependencies to Spring Cloud 2023 from prior 2022.x version.
- org.openrewrite.java.spring.cloud2023.UpgradeSpringCloud_2023
- Migrate to Spring Cloud 2023
- Migrate applications to the latest Spring Cloud 2023 (Leyton) release.
- org.openrewrite.java.spring.cloud2024.DependencyUpgrades
- Upgrade dependencies to Spring Cloud 2024
- Upgrade dependencies to Spring Cloud 2024 from prior 2023.x version.
- org.openrewrite.java.spring.cloud2024.UpgradeSpringCloud_2024
- Migrate to Spring Cloud 2024
- Migrate applications to the latest Spring Cloud 2024 (Moorgate) release.
- org.openrewrite.java.spring.cloud2025.AddSpringCloudDependenciesBom
- Add Spring Cloud dependencies BOM
- Adds the Spring Cloud dependencies BOM as a managed import, but only when the project already uses a Spring Cloud dependency. Prevents accidentally introducing the BOM into unrelated projects.
- org.openrewrite.java.spring.cloud2025.DependencyUpgrades
- Upgrade dependencies to Spring Cloud 2025
- Upgrade dependencies to Spring Cloud 2025 from prior 2024.x version.
- org.openrewrite.java.spring.cloud2025.SpringCloudGatewayDeprecatedModulesAndStarters
- Migrate to New Spring Cloud Gateway Modules and Starters
- Migrate to new Spring Cloud Gateway modules and starters for Spring Cloud 2025.
- org.openrewrite.java.spring.cloud2025.SpringCloudGatewayProperties
- Migrate Spring Cloud Gateway Properties
- Migrate Spring Cloud Gateway properties for Spring Cloud 2025 release.
- org.openrewrite.java.spring.cloud2025.SpringCloudGatewayProxyWebMvcProperties
- Migrate Spring Cloud Gateway Proxy WebMvc Properties
- Migrate Spring Cloud Gateway Proxy WebMvc properties for Spring Cloud 2025 release.
- org.openrewrite.java.spring.cloud2025.SpringCloudGatewayProxyWebfluxProperties
- Migrate Spring Cloud Gateway Proxy Webflux Properties
- Migrate Spring Cloud Gateway Proxy Webflux properties for Spring Cloud 2025 release.
- org.openrewrite.java.spring.cloud2025.SpringCloudGatewayWebMvcProperties
- Migrate Spring Cloud Gateway WebMvc Properties
- Migrate Spring Cloud Gateway WebMvc properties for Spring Cloud 2025 release.
- org.openrewrite.java.spring.cloud2025.SpringCloudGatewayWebfluxProperties
- Migrate Spring Cloud Gateway Webflux Properties
- Migrate Spring Cloud Gateway Webflux properties for Spring Cloud 2025 release.
- org.openrewrite.java.spring.cloud2025.UpgradeSpringCloud_2025
- Migrate to Spring Cloud 2025
- Migrate applications to the latest Spring Cloud 2025 (Northfields) release.
- org.openrewrite.java.spring.cloud2025.UpgradeSpringCloud_2025_1
- Migrate to Spring Cloud 2025.1
- Migrate applications to the latest Spring Cloud 2025.1 release, compatible with Spring Boot 4.0.
- org.openrewrite.java.spring.kafka.UpgradeSpringKafka_2_8_ErrorHandlers
- Migrates Spring Kafka deprecated error handlers
- Migrate error handlers deprecated in Spring Kafka
2.8.xto their replacements.
- org.openrewrite.java.spring.kafka.UpgradeSpringKafka_3_0
- Migrate to Spring Kafka 3.0
- Migrate applications to the latest Spring Kafka 3.0 release.
- org.openrewrite.java.spring.kafka.UpgradeSpringKafka_4_0
- Migrate to Spring Kafka 4.0
- Migrate applications to the latest Spring Kafka 4.0 release.
- org.openrewrite.java.spring.opentelemetry.MigrateBraveToOpenTelemetry
- Migrate Brave API to OpenTelemetry API
- Migrate Java code using Brave (Zipkin) tracing API to OpenTelemetry API. This recipe handles the migration of Brave Tracer, Span, and related classes to OpenTelemetry equivalents.
- org.openrewrite.java.spring.opentelemetry.MigrateDatadogToOpenTelemetry
- Migrate Datadog tracing to OpenTelemetry
- Migrate from Datadog Java tracing annotations to OpenTelemetry annotations. Replace Datadog @Trace annotations with @WithSpan annotations.
- org.openrewrite.java.spring.opentelemetry.MigrateFromZipkinToOpenTelemetry
- Migrate from Zipkin to OpenTelemetry OTLP
- Migrate from Zipkin tracing to OpenTelemetry OTLP. This recipe replaces Zipkin dependencies with OpenTelemetry OTLP exporter and updates the related configuration properties.
- org.openrewrite.java.spring.opentelemetry.MigrateNewRelicToOpenTelemetry
- Migrate New Relic Agent to OpenTelemetry
- Migrate from New Relic Java Agent annotations to OpenTelemetry annotations. Replace @Trace annotations with @WithSpan annotations.
- org.openrewrite.java.spring.opentelemetry.MigrateOpenTracingToOpenTelemetry
- Migrate OpenTracing API to OpenTelemetry API
- Migrate Java code using OpenTracing API to OpenTelemetry API. OpenTracing has been superseded by OpenTelemetry and is no longer actively maintained.
- org.openrewrite.java.spring.opentelemetry.MigrateSleuthToOpenTelemetry
- Migrate from Spring Cloud Sleuth to OpenTelemetry
- Migrate from Spring Cloud Sleuth to OpenTelemetry. Spring Cloud Sleuth has been deprecated and is replaced by Micrometer Tracing with OpenTelemetry as a backend. This recipe removes Sleuth dependencies and adds OpenTelemetry instrumentation.
- org.openrewrite.java.spring.opentelemetry.MigrateToOpenTelemetry
- Complete migration to OpenTelemetry
- Comprehensive migration to OpenTelemetry including dependencies, configuration properties, and Java code changes. This recipe handles migration from Spring Cloud Sleuth, Brave/Zipkin, and OpenTracing to OpenTelemetry.
- org.openrewrite.java.spring.security.SpringSecurityBestPractices
- Spring security best practices
- Applies security best practices to Spring applications, including TLS for database and message broker connections.
- org.openrewrite.java.spring.security5.RenameNimbusdsJsonObjectPackageName
- Rename the package name from
com.nimbusds.jose.shaded.jsontonet.minidev.json - Rename the package name from
com.nimbusds.jose.shaded.jsontonet.minidev.json.
- Rename the package name from
- org.openrewrite.java.spring.security5.ReplaceGlobalMethodSecurityWithMethodSecurityXml
- Replace global method security with method security
@EnableGlobalMethodSecurityand<global-method-security>are deprecated in favor of@EnableMethodSecurityand<method-security>, respectively. The new annotation and XML element activate Spring’s pre-post annotations by default and use AuthorizationManager internally.
- org.openrewrite.java.spring.security5.UpgradeSpringSecurity_5_7
- Migrate to Spring Security 5.7
- Migrate applications to the latest Spring Security 5.7 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.java.spring.security5.UpgradeSpringSecurity_5_8
- Migrate to Spring Security 5.8
- Migrate applications to the latest Spring Security 5.8 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.java.spring.security5.search.FindEncryptorsQueryableTextUses
- Finds uses of
Encryptors.queryableText() Encryptors.queryableText()is insecure and is removed in Spring Security 6.
- Finds uses of
- org.openrewrite.java.spring.security6.RemoveUseAuthorizationManager
- Remove unnecessary
use-authorization-managerfor message security in Spring security 6 - In Spring Security 6,
<websocket-message-broker>defaultsuse-authorization-managertotrue. So, theuse-authorization-managerattribute for message security is no longer needed and can be removed.
- Remove unnecessary
- org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_0
- Migrate to Spring Security 6.0
- Migrate applications to the latest Spring Security 6.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_1
- Migrate to Spring Security 6.1
- Migrate applications to the latest Spring Security 6.1 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_2
- Migrate to Spring Security 6.2
- Migrate applications to the latest Spring Security 6.2 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_3
- Migrate to Spring Security 6.3
- Migrate applications to the latest Spring Security 6.3 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_4
- Migrate to Spring Security 6.4
- Migrate applications to the latest Spring Security 6.4 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.java.spring.security6.UpgradeSpringSecurity_6_5
- Migrate to Spring Security 6.5 (Community Edition)
- Migrate applications to the latest Spring Security 6.5 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.java.spring.security7.SecurityConfigurerRemoveThrowsException
- Remove throws exception in
SecurityConfigurermethodsinitandconfigure - Remove throws exception in
SecurityConfigurermethodsinitandconfigure.
- Remove throws exception in
- org.openrewrite.java.spring.security7.UpgradeSpringSecurity_7_0
- Migrate to Spring Security 7.0
- Migrate applications to the latest Spring Security 7.0 release. This recipe will modify an application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have changes between versions.
- org.openrewrite.java.spring.ws.MigrateAxiomToSaaj
- Migrate Spring WS Axiom to SAAJ
- Migrate from Apache Axiom SOAP message handling to SAAJ (SOAP with Attachments API for Java). Spring WS 4.0.x removed support for Apache Axiom because Axiom did not support Jakarta EE at the time. This recipe changes Axiom types to their SAAJ equivalents.
- Tags: spring-ws
- org.openrewrite.java.spring.ws.UpgradeSpringWs_4_0
- Migrate to Spring WS 4.0
- Migrate applications to Spring WS 4.0. This recipe handles the removal of Apache Axiom support in Spring WS 4.0.x by migrating Axiom-based SOAP message handling to SAAJ (SOAP with Attachments API for Java). Note that Spring WS 4.1+ restores Axiom support if upgrading to that version is preferred.
- Tags: spring-ws
- org.openrewrite.java.testing.dbrider.MigrateDbRiderSpringToDbRiderJUnit5
- Migrate rider-spring (JUnit4) to rider-junit5 (JUnit5)
- This recipe will migrate the necessary dependencies and annotations from DbRider with JUnit4 to JUnit5 in a Spring application.
- org.openrewrite.quarkus.spring.AddSpringCompatibilityExtensions
- Add Spring compatibility extensions for commonly used annotations
- Adds Quarkus Spring compatibility extensions when Spring annotations are detected in the codebase.
- org.openrewrite.quarkus.spring.ConfigureNativeBuild
- Configure Quarkus Native Build Support
- Adds configuration and dependencies required for Quarkus native image compilation with GraalVM. Includes native profile configuration and reflection hints where needed.
- org.openrewrite.quarkus.spring.CustomizeQuarkusPluginGoals
- Customize Quarkus Maven Plugin Goals
- Allows customization of Quarkus Maven plugin goals. Adds or modifies the executions and goals for the quarkus-maven-plugin.
- org.openrewrite.quarkus.spring.CustomizeQuarkusVersion
- Customize Quarkus BOM Version
- Allows customization of the Quarkus BOM version used in the migration. By default uses 3.x (latest 3.x version), but can be configured to use a specific version.
- org.openrewrite.quarkus.spring.DerbyDriverToQuarkus
- Replace Derby driver with Quarkus JDBC Derby
- Migrates
org.apache.derby:derbyorderbyclienttoio.quarkus:quarkus-jdbc-derby(excludes test scope).
- org.openrewrite.quarkus.spring.DerbyTestDriverToQuarkus
- Replace Derby test driver with Quarkus JDBC Derby (test scope)
- Migrates
org.apache.derby:derbywith test scope toio.quarkus:quarkus-jdbc-derbywith test scope.
- org.openrewrite.quarkus.spring.EnableAnnotationsToQuarkusDependencies
- Migrate
@EnableXyzannotations to Quarkus extensions - Removes Spring
@EnableXyzannotations and adds the corresponding Quarkus extensions as dependencies.
- Migrate
- org.openrewrite.quarkus.spring.H2DriverToQuarkus
- Replace H2 driver with Quarkus JDBC H2
- Migrates
com.h2database:h2toio.quarkus:quarkus-jdbc-h2(excludes test scope).
- org.openrewrite.quarkus.spring.H2TestDriverToQuarkus
- Replace H2 test driver with Quarkus JDBC H2 (test scope)
- Migrates
com.h2database:h2with test scope toio.quarkus:quarkus-jdbc-h2with test scope.
- org.openrewrite.quarkus.spring.MigrateBootStarters
- Replace Spring Boot starter dependencies with Quarkus equivalents
- Migrates Spring Boot starter dependencies to their Quarkus equivalents, removing version tags as Quarkus manages versions through its BOM.
- org.openrewrite.quarkus.spring.MigrateConfigurationProperties
- Migrate @ConfigurationProperties to Quarkus @ConfigMapping
- Migrates Spring Boot @ConfigurationProperties to Quarkus @ConfigMapping. This recipe converts configuration property classes to the native Quarkus pattern.
- org.openrewrite.quarkus.spring.MigrateDatabaseDrivers
- Migrate database drivers to Quarkus JDBC extensions
- Replaces Spring Boot database driver dependencies with their Quarkus JDBC extension equivalents.
- org.openrewrite.quarkus.spring.MigrateEntitiesToPanache
- Migrate JPA Entities to Panache Entities
- Converts standard JPA entities to Quarkus Panache entities using the Active Record pattern. Entities will extend PanacheEntity and gain built-in CRUD operations.
- org.openrewrite.quarkus.spring.MigrateMavenPlugin
- Add or replace Spring Boot build plugin with Quarkus build plugin
- Remove Spring Boot Maven plugin if present and add Quarkus Maven plugin using the same version as the quarkus-bom.
- org.openrewrite.quarkus.spring.MigrateRequestParameterEdgeCases
- Migrate Additional Spring Web Parameter Annotations
- Migrates additional Spring Web parameter annotations not covered by the main WebToJaxRs recipe. Includes @MatrixVariable, @CookieValue, and other edge cases.
- org.openrewrite.quarkus.spring.MigrateSpringActuator
- Migrate Spring Boot Actuator to Quarkus Health and Metrics
- Migrates Spring Boot Actuator to Quarkus SmallRye Health and Metrics extensions. Converts HealthIndicator implementations to Quarkus HealthCheck pattern.
- org.openrewrite.quarkus.spring.MigrateSpringBootDevTools
- Remove Spring Boot DevTools
- Removes Spring Boot DevTools dependency and configuration. Quarkus has built-in dev mode with hot reload that replaces DevTools functionality.
- org.openrewrite.quarkus.spring.MigrateSpringCloudConfig
- Migrate Spring Cloud Config Client to Quarkus Config
- Migrates Spring Cloud Config Client to Quarkus configuration sources. Converts bootstrap.yml/properties patterns to Quarkus config.
- org.openrewrite.quarkus.spring.MigrateSpringCloudServiceDiscovery
- Migrate Spring Cloud Service Discovery to Quarkus
- Migrates Spring Cloud Service Discovery annotations and configurations to Quarkus equivalents. Converts @EnableDiscoveryClient and related patterns to Quarkus Stork service discovery.
- org.openrewrite.quarkus.spring.MigrateSpringDataMongodb
- Migrate Spring Data MongoDB to Quarkus Panache MongoDB
- Migrates Spring Data MongoDB repositories to Quarkus MongoDB with Panache. Converts MongoRepository interfaces to PanacheMongoRepository pattern.
- org.openrewrite.quarkus.spring.MigrateSpringEvents
- Migrate Spring Events to CDI Events
- Migrates Spring's event mechanism to CDI events. Converts ApplicationEventPublisher to CDI Event and @EventListener to @Observes.
- org.openrewrite.quarkus.spring.MigrateSpringTesting
- Migrate Spring Boot Testing to Quarkus Testing
- Migrates Spring Boot test annotations and utilities to Quarkus test equivalents. Converts @SpringBootTest to @QuarkusTest, @MockBean to @InjectMock, etc.
- org.openrewrite.quarkus.spring.MigrateSpringTransactional
- Migrate Spring @Transactional to Jakarta @Transactional
- Migrates Spring's @Transactional annotation to Jakarta's @Transactional. Maps propagation attributes to TxType and removes Spring-specific attributes.
- org.openrewrite.quarkus.spring.MigrateSpringValidation
- Migrate Spring Validation to Quarkus
- Migrates Spring Boot validation to Quarkus Hibernate Validator. Adds the quarkus-hibernate-validator dependency and handles validation annotation imports.
- org.openrewrite.quarkus.spring.SpringBootActiveMQToQuarkus
- Replace Spring Boot ActiveMQ with Quarkus Artemis JMS
- Migrates
spring-boot-starter-activemqtoquarkus-artemis-jms.
- org.openrewrite.quarkus.spring.SpringBootActuatorToQuarkus
- Replace Spring Boot Actuator with Quarkus SmallRye Health
- Migrates
spring-boot-starter-actuatortoquarkus-smallrye-health.
- org.openrewrite.quarkus.spring.SpringBootAmqpToQuarkusClassic
- Replace Spring Boot AMQP with Quarkus Messaging RabbitMQ
- Migrates
spring-boot-starter-amqptoquarkus-messaging-rabbitmqwhen no reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringBootAmqpToQuarkusReactive
- Replace Spring Boot AMQP with Quarkus Messaging AMQP
- Migrates
spring-boot-starter-amqptoquarkus-messaging-amqpwhen reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringBootArtemisToQuarkus
- Replace Spring Boot Artemis with Quarkus Artemis JMS
- Migrates
spring-boot-starter-artemistoquarkus-artemis-jms.
- org.openrewrite.quarkus.spring.SpringBootBatchToQuarkus
- Replace Spring Boot Batch with Quarkus Scheduler
- Migrates
spring-boot-starter-batchtoquarkus-scheduler.
- org.openrewrite.quarkus.spring.SpringBootCacheToQuarkus
- Replace Spring Boot Cache with Quarkus Cache
- Migrates
spring-boot-starter-cachetoquarkus-cache.
- org.openrewrite.quarkus.spring.SpringBootDataJpaToQuarkus
- Replace Spring Boot Data JPA with Quarkus Hibernate ORM Panache
- Migrates
spring-boot-starter-data-jpatoquarkus-hibernate-orm-panache.
- org.openrewrite.quarkus.spring.SpringBootDataMongoToQuarkus
- Replace Spring Boot Data MongoDB with Quarkus MongoDB Panache
- Migrates
spring-boot-starter-data-mongodbtoquarkus-mongodb-panache.
- org.openrewrite.quarkus.spring.SpringBootDataRedisToQuarkus
- Replace Spring Boot Data Redis with Quarkus Redis Client
- Migrates
spring-boot-starter-data-redistoquarkus-redis-client.
- org.openrewrite.quarkus.spring.SpringBootDataRestToQuarkus
- Replace Spring Boot Data REST with Quarkus REST
- Migrates
spring-boot-starter-data-resttoquarkus-rest-jackson.
- org.openrewrite.quarkus.spring.SpringBootElasticsearchToQuarkus
- Replace Spring Boot Elasticsearch with Quarkus Elasticsearch REST Client
- Migrates
spring-boot-starter-data-elasticsearchtoquarkus-elasticsearch-rest-client.
- org.openrewrite.quarkus.spring.SpringBootIntegrationToQuarkus
- Replace Spring Boot Integration with Camel Quarkus
- Migrates
spring-boot-starter-integrationtocamel-quarkus-core.
- org.openrewrite.quarkus.spring.SpringBootJdbcToQuarkus
- Replace Spring Boot JDBC with Quarkus Agroal
- Migrates
spring-boot-starter-jdbctoquarkus-agroal.
- org.openrewrite.quarkus.spring.SpringBootMailToQuarkus
- Replace Spring Boot Mail with Quarkus Mailer
- Migrates
spring-boot-starter-mailtoquarkus-mailer.
- org.openrewrite.quarkus.spring.SpringBootOAuth2ClientToQuarkus
- Replace Spring Boot OAuth2 Client with Quarkus OIDC Client
- Migrates spring-boot-starter-oauth2-client
toquarkus-oidc-client`.
- org.openrewrite.quarkus.spring.SpringBootOAuth2ResourceServerToQuarkus
- Replace Spring Boot OAuth2 Resource Server with Quarkus OIDC
- Migrates
spring-boot-starter-oauth2-resource-servertoquarkus-oidc.
- org.openrewrite.quarkus.spring.SpringBootQuartzToQuarkus
- Replace Spring Boot Quartz with Quarkus Quartz
- Migrates
spring-boot-starter-quartztoquarkus-quartz.
- org.openrewrite.quarkus.spring.SpringBootSecurityToQuarkus
- Replace Spring Boot Security with Quarkus Security
- Migrates
spring-boot-starter-securitytoquarkus-security.
- org.openrewrite.quarkus.spring.SpringBootTestToQuarkus
- Replace Spring Boot Test with Quarkus JUnit 5
- Migrates
spring-boot-starter-testtoquarkus-junit5.
- org.openrewrite.quarkus.spring.SpringBootThymeleafToQuarkus
- Replace Spring Boot Thymeleaf with Quarkus Qute
- Migrates
spring-boot-starter-thymeleaftoquarkus-qute.
- org.openrewrite.quarkus.spring.SpringBootToQuarkus
- Migrate Spring Boot to Quarkus
- Replace Spring Boot with Quarkus.
- org.openrewrite.quarkus.spring.SpringBootValidationToQuarkus
- Replace Spring Boot Validation with Quarkus Hibernate Validator
- Migrates
spring-boot-starter-validationtoquarkus-hibernate-validator.
- org.openrewrite.quarkus.spring.SpringBootWebFluxToQuarkusReactive
- Replace Spring Boot WebFlux with Quarkus REST Client
- Migrates
spring-boot-starter-webfluxtoquarkus-rest-client-jacksonwhen reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringBootWebSocketToQuarkus
- Replace Spring Boot WebSocket with Quarkus WebSockets
- Migrates
spring-boot-starter-websockettoquarkus-websockets.
- org.openrewrite.quarkus.spring.SpringBootWebToQuarkusClassic
- Replace Spring Boot Web with Quarkus RESTEasy Classic
- Migrates
spring-boot-starter-webtoquarkus-resteasy-jacksonwhen no reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringBootWebToQuarkusReactive
- Replace Spring Boot Web with Quarkus REST
- Migrates
spring-boot-starter-webtoquarkus-rest-jacksonwhen reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringKafkaToQuarkusClassic
- Replace Spring Kafka with Quarkus Kafka Client
- Migrates
spring-kafkatoquarkus-kafka-clientwhen no reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringKafkaToQuarkusReactive
- Replace Spring Kafka with Quarkus Messaging Kafka
- Migrates
spring-kafkatoquarkus-messaging-kafkawhen reactor dependencies are present.
springdata
2 recipes
- com.oracle.weblogic.rewrite.spring.data.UpgradeSpringDataBom
- Upgrade Spring Data BOM to 2024.1.x
- Upgrade Spring Data BOM to 2024.1.x version.
- com.oracle.weblogic.rewrite.spring.data.UpgradeSpringDataJpa
- Upgrade Spring Data JPA to 3.4.6
- Upgrade Spring Data JPA to 3.4.6 version, which is the version used by spring-data-bom v2024.1.x
springdoc
10 recipes
- org.openrewrite.java.springdoc.MigrateSpringdocCommon
- Migrate from springdoc-openapi-common to springdoc-openapi-starter-common
- Migrate from springdoc-openapi-common to springdoc-openapi-starter-common.
- org.openrewrite.java.springdoc.ReplaceSpringFoxDependencies
- Replace SpringFox Dependencies
- Replace SpringFox Dependencies.
- org.openrewrite.java.springdoc.SpringFoxToSpringDoc
- Migrate from SpringFox Swagger to SpringDoc and OpenAPI
- Migrate from SpringFox Swagger to SpringDoc and OpenAPI.
- org.openrewrite.java.springdoc.SwaggerToSpringDoc
- Migrate from Swagger to SpringDoc and OpenAPI
- Migrate from Swagger to SpringDoc and OpenAPI.
- org.openrewrite.java.springdoc.UpgradeSpringDoc_2
- Upgrade to SpringDoc 2.1
- Upgrade to SpringDoc v2.1, as described in the upgrade guide.
- org.openrewrite.java.springdoc.UpgradeSpringDoc_2_2
- Upgrade to SpringDoc 2.2
- Upgrade to SpringDoc v2.2.
- org.openrewrite.java.springdoc.UpgradeSpringDoc_2_5
- Upgrade to SpringDoc 2.5
- Upgrade to SpringDoc v2.5.
- org.openrewrite.java.springdoc.UpgradeSpringDoc_2_6
- Upgrade to SpringDoc 2.6
- Upgrade to SpringDoc v2.6.
- org.openrewrite.java.springdoc.UpgradeSpringDoc_2_8
- Upgrade to SpringDoc 2.8
- Upgrade to SpringDoc v2.8.
- org.openrewrite.java.springdoc.UpgradeSpringDoc_3_0
- Upgrade to SpringDoc 3.0
- Upgrade to SpringDoc v3.0.
springfox
2 recipes
- org.openrewrite.java.springdoc.ReplaceSpringFoxDependencies
- Replace SpringFox Dependencies
- Replace SpringFox Dependencies.
- org.openrewrite.java.springdoc.SpringFoxToSpringDoc
- Migrate from SpringFox Swagger to SpringDoc and OpenAPI
- Migrate from SpringFox Swagger to SpringDoc and OpenAPI.
springframework
9 recipes
- com.oracle.weblogic.rewrite.examples.spring.ChangeCacheManagerToSimpleCacheManager
- Change cacheManager to use the SimpleCacheManager
- Change cacheManager to use the SimpleCacheManager.
- com.oracle.weblogic.rewrite.examples.spring.MigratedPetClinicExtrasFor1511
- Add WebLogic 15.1.1 PetClinic extras
- Run migration extras for migrated Spring Framework PetClinic example run on WebLogic 15.1.1.
- com.oracle.weblogic.rewrite.examples.spring.SetupSpringFrameworkPetClinicFor1412
- Setup Spring Framework 5.3.x PetClinic for WebLogic 14.1.2
- Setup Spring Framework 5.3.x PetClinic for WebLogic 14.1.2.
- com.oracle.weblogic.rewrite.spring.data.UpgradeSpringDataBom
- Upgrade Spring Data BOM to 2024.1.x
- Upgrade Spring Data BOM to 2024.1.x version.
- com.oracle.weblogic.rewrite.spring.data.UpgradeSpringDataJpa
- Upgrade Spring Data JPA to 3.4.6
- Upgrade Spring Data JPA to 3.4.6 version, which is the version used by spring-data-bom v2024.1.x
- com.oracle.weblogic.rewrite.spring.framework.DefaultServletHandler
- Update Default Servlet Handler for Spring Framework if empty
- This recipe will update Spring Framework default servlet handler if empty, as noted in the Spring Framework 6.2 documentation.
- com.oracle.weblogic.rewrite.spring.framework.ReplaceWebLogicJtaTransactionManager
- Replace Removed WebLogicJtaTransactionManager from Spring Framework 5.3.x to 6.2.x
- Replace removed WebLogicJtaTransactionManager with JtaTransactionManager from Spring Framework 6.2.x.
- com.oracle.weblogic.rewrite.spring.framework.ReplaceWebLogicLoadTimeWeaver
- Replace Removed WebLogicLoadTimeWeaver from Spring Framework 5.3.x to 6.2.x
- Replace removed WebLogicLoadTimeWeaver with LoadTimeWeaver from Spring Framework 6.2.x.
- com.oracle.weblogic.rewrite.spring.framework.UpgradeToSpringFramework_6_2
- Migrate to Spring Framework 6.2 for WebLogic 15.1.1
- Migrate applications to the Spring Framework 6.2 release and compatibility with WebLogic 15.1.1.
sql
6 recipes
- org.openrewrite.sql.ConvertOracleDataTypesToPostgres
- Convert Oracle data types to PostgreSQL
- Replaces Oracle-specific data types with PostgreSQL equivalents.
- org.openrewrite.sql.ConvertOracleFunctionsToPostgres
- Convert Oracle functions to PostgreSQL
- Replaces Oracle-specific functions with PostgreSQL equivalents.
- org.openrewrite.sql.ConvertSqlServerDataTypesToPostgres
- Convert SQL Server data types to PostgreSQL
- Replaces SQL Server-specific data types with PostgreSQL equivalents.
- org.openrewrite.sql.ConvertSqlServerFunctionsToPostgres
- Convert SQL Server functions to PostgreSQL
- Replaces SQL Server-specific functions with PostgreSQL equivalents.
- org.openrewrite.sql.MigrateOracleToPostgres
- Migrate Oracle SQL to PostgreSQL
- Converts Oracle-specific SQL syntax and functions to PostgreSQL equivalents.
- org.openrewrite.sql.MigrateSqlServerToPostgres
- Migrate SQL Server to PostgreSQL
- Converts Microsoft SQL Server-specific SQL syntax and functions to PostgreSQL equivalents.
sqlserver
4 recipes
- org.openrewrite.java.flyway.AddFlywayModuleSqlServer
- Add missing Flyway module for SQL Server
- Database modules for Flyway 10 have been split out into separate modules for maintainability. Add the
flyway-sqlserverdependency if you are using SQL Server with Flyway 10, as detailed on https://github.com/flyway/flyway/issues/3780.
- org.openrewrite.sql.ConvertSqlServerDataTypesToPostgres
- Convert SQL Server data types to PostgreSQL
- Replaces SQL Server-specific data types with PostgreSQL equivalents.
- org.openrewrite.sql.ConvertSqlServerFunctionsToPostgres
- Convert SQL Server functions to PostgreSQL
- Replaces SQL Server-specific functions with PostgreSQL equivalents.
- org.openrewrite.sql.MigrateSqlServerToPostgres
- Migrate SQL Server to PostgreSQL
- Converts Microsoft SQL Server-specific SQL syntax and functions to PostgreSQL equivalents.
storybook
9 recipes
- org.openrewrite.codemods.cleanup.storybook.AwaitInteractions
- Interactions should be awaited
- Interactions should be awaited See rule details for storybook/await-interactions.
- org.openrewrite.codemods.cleanup.storybook.DefaultExports
- Story files should have a default export
- Story files should have a default export See rule details for storybook/default-exports.
- org.openrewrite.codemods.cleanup.storybook.HierarchySeparator
- Deprecated hierarchy separator in title property
- Deprecated hierarchy separator in title property See rule details for storybook/hierarchy-separator.
- org.openrewrite.codemods.cleanup.storybook.NoRedundantStoryName
- A story should not have a redundant name property
- A story should not have a redundant name property See rule details for storybook/no-redundant-story-name.
- org.openrewrite.codemods.cleanup.storybook.NoTitlePropertyInMeta
- Do not define a title in meta
- Do not define a title in meta See rule details for storybook/no-title-property-in-meta.
- org.openrewrite.codemods.cleanup.storybook.PreferPascalCase
- Stories should use PascalCase
- Stories should use PascalCase See rule details for storybook/prefer-pascal-case.
- org.openrewrite.codemods.cleanup.storybook.RecommendedStorybookCodeCleanup
- Recommended Storybook code cleanup
- Collection of cleanup ESLint rules from eslint-plugin-storybook.
- org.openrewrite.codemods.cleanup.storybook.UseStorybookExpect
- Use expect from @storybook/jest
- Use expect from @storybook/jest See rule details for storybook/use-storybook-expect.
- org.openrewrite.codemods.cleanup.storybook.UseStorybookTestingLibrary
- Do not use testing-library directly on stories
- Do not use testing-library directly on stories See rule details for storybook/use-storybook-testing-library.
style
109 recipes
- OpenRewrite.Recipes.CodeQuality.Style.AddTrailingComma
- Add trailing comma
- Add trailing commas to multi-line initializers and enum declarations for cleaner diffs.
- OpenRewrite.Recipes.CodeQuality.Style.ConstantValuesOnRightSide
- Place constant values on right side of comparisons
- Move constant values (literals, null) from the left side of comparisons to the right side for consistency and readability.
- OpenRewrite.Recipes.CodeQuality.Style.FindArgumentExceptionParameterName
- ArgumentException should specify argument name
- When throwing
ArgumentExceptionor derived types, specify the parameter name usingnameof().
- OpenRewrite.Recipes.CodeQuality.Style.FindAsyncMethodReturnsNull
- Find async void method
- Detect
async voidmethods. Useasync Taskinstead so callers can await and exceptions propagate correctly.
- OpenRewrite.Recipes.CodeQuality.Style.FindAsyncVoidDelegate
- Find async void delegate
- Detect async lambdas used as delegates where the return type is void. Use
Func<Task>instead ofActionfor async delegates.
- OpenRewrite.Recipes.CodeQuality.Style.FindAvoidAnonymousDelegateForUnsubscribe
- Do not use anonymous delegates to unsubscribe from events
- Unsubscribing from events using anonymous delegates or lambdas has no effect because each lambda creates a new delegate instance.
- OpenRewrite.Recipes.CodeQuality.Style.FindAwaitTaskBeforeDisposing
- Find unawaited task return in using block
- Detect
returnof a Task inside ausingblock withoutawait. The resource may be disposed before the task completes.
- OpenRewrite.Recipes.CodeQuality.Style.FindBothConditionSidesIdentical
- Find binary expression with identical sides
- Detect binary expressions where both sides are identical, e.g.
x == xora && a. This is likely a copy-paste bug.
- OpenRewrite.Recipes.CodeQuality.Style.FindClassWithEqualsButNoIEquatable
- Find class with Equals(T) but no IEquatable<T>
- Detect classes that define
Equals(T)but do not implementIEquatable<T>. Implementing the interface ensures consistency and enables value-based equality.
- OpenRewrite.Recipes.CodeQuality.Style.FindCompareToWithoutIComparable
- Find CompareTo without IComparable
- Detect classes that provide a
CompareTomethod but do not implementIComparable<T>.
- OpenRewrite.Recipes.CodeQuality.Style.FindDangerousThreadingMethods
- Do not use dangerous threading methods
- Avoid
Thread.Abort(),Thread.Suspend(), andThread.Resume(). These methods are unreliable and can corrupt state.
- OpenRewrite.Recipes.CodeQuality.Style.FindDefaultParameterValueNeedsOptional
- Find [DefaultParameterValue] without [Optional]
- Detect parameters with
[DefaultParameterValue]that are missing[Optional]. Both attributes are needed for COM interop default parameter behavior.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotCallVirtualMethodInConstructor
- Find virtual method call in constructor
- Detect calls to virtual or abstract methods within constructors. Derived classes may not be fully initialized when these methods execute.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotCompareWithNaN
- Find comparison with NaN
- Detect comparisons with
NaNusing==or!=. Usedouble.IsNaN()orfloat.IsNaN()instead, asx == NaNis always false.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotCreateTypeWithBCLName
- Find type with BCL name
- Detect class declarations that use names from well-known BCL types like
Task,Action,String, which can cause confusion.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotDeclareStaticMembersOnGenericTypes
- Find static members on generic types
- Detect static members declared on generic types. Static members on generic types require specifying type arguments at the call site, reducing discoverability.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotOverwriteParameterValue
- Find overwritten parameter values
- Detect assignments to method parameters, which can mask the original argument and lead to confusion.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotPassNullForCancellationToken
- Find null passed for CancellationToken
- Detect
nullordefaultpassed forCancellationTokenparameters. UseCancellationToken.Noneinstead.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotRaiseApplicationException
- Do not raise ApplicationException
- Avoid throwing
ApplicationException. Use a more specific exception type.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotRaiseNotImplementedException
- Do not throw NotImplementedException
- Throwing
NotImplementedExceptionindicates incomplete implementation. Implement the functionality or throw a more specific exception.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotRaiseReservedExceptionType
- Do not raise reserved exception types
- Avoid throwing
Exception,SystemException, orApplicationException. Use more specific exception types.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotThrowFromFinalizer
- Find throw statements in finalizer
- Detect
throwstatements inside finalizer/destructor methods. Throwing from a finalizer can terminate the process.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotThrowFromFinallyBlock
- Do not throw from finally block
- Throwing from a
finallyblock can mask the original exception and make debugging difficult.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotUseCertificateValidationCallback
- Do not write custom certificate validation
- Custom certificate validation callbacks can introduce security vulnerabilities by accidentally accepting invalid certificates.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotUseEqualityComparerDefaultOfString
- Find EqualityComparer<string>.Default
- Detect
EqualityComparer<string>.Defaultwhich may use different comparison semantics across platforms. Use an explicitStringComparer.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotUseGetHashCodeForString
- Find GetType() on Type instance
- Detect
.GetType()called on an object that is already aSystem.Type. Usetypeof()directly.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotUseObjectToString
- Find ToString on object-typed parameter
- Detect
.ToString()calls onobject-typed parameters. The defaultobject.ToString()returns the type name, which is rarely the intended behavior.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotUseSleep
- Find Thread.Sleep usage
- Detect
Thread.Sleep()which blocks the thread. Useawait Task.Delay()in async contexts instead.
- OpenRewrite.Recipes.CodeQuality.Style.FindDoNotUseStringGetHashCode
- Find string.GetHashCode() usage
- Detect
string.GetHashCode()which is not stable across runs. UseStringComparer.GetHashCode()orstring.GetHashCode(StringComparison)instead.
- OpenRewrite.Recipes.CodeQuality.Style.FindEmbedCaughtExceptionAsInner
- Embed caught exception as inner exception
- When rethrowing a different exception in a catch block, pass the original exception as the inner exception to preserve the stack trace.
- OpenRewrite.Recipes.CodeQuality.Style.FindEnumDefaultValueZero
- Find explicit zero initialization in enum
- Detect enum members explicitly initialized to
0. The default value of an enum is already0.
- OpenRewrite.Recipes.CodeQuality.Style.FindEqualsWithoutNotNullWhen
- Find Equals without [NotNullWhen(true)]
- Detect
Equals(object?)overrides that are missing[NotNullWhen(true)]on the parameter, which helps nullable analysis.
- OpenRewrite.Recipes.CodeQuality.Style.FindEventArgsSenderNotNull
- Find event raised with null EventArgs
- Detect event invocations that pass
nullfor EventArgs. UseEventArgs.Emptyinstead.
- OpenRewrite.Recipes.CodeQuality.Style.FindFlowCancellationTokenInAwaitForEach
- Find await foreach without CancellationToken
- Detect
await foreachloops that don't pass aCancellationTokenviaWithCancellation()when one is available in the enclosing method.
- OpenRewrite.Recipes.CodeQuality.Style.FindIComparableWithoutComparisonOperators
- Find IComparable without comparison operators
- Detect classes that implement
IComparable<T>but do not override comparison operators (<,>,<=,>=).
- OpenRewrite.Recipes.CodeQuality.Style.FindIComparableWithoutIEquatable
- Find IComparable<T> without IEquatable<T>
- Detect classes that implement
IComparable<T>but notIEquatable<T>. Both interfaces should be implemented together for consistent comparison semantics.
- OpenRewrite.Recipes.CodeQuality.Style.FindIEquatableWithoutEquals
- Find IEquatable<T> without Equals(object) override
- Detect classes that implement
IEquatable<T>but do not overrideEquals(object), which can lead to inconsistent equality behavior.
- OpenRewrite.Recipes.CodeQuality.Style.FindILoggerTypeMismatch
- Find ILogger<T> type parameter mismatch
- Detect
ILogger<T>fields or parameters whereTdoesn't match the containing type name.
- OpenRewrite.Recipes.CodeQuality.Style.FindIfElseBranchesIdentical
- Find if/else with identical branches
- Detect
if/elsestatements where both branches contain identical code. This is likely a copy-paste bug.
- OpenRewrite.Recipes.CodeQuality.Style.FindImplementNonGenericInterface
- Find missing non-generic interface implementation
- Detect types implementing
IComparable<T>withoutIComparable, orIEquatable<T>without proper Equals override.
- OpenRewrite.Recipes.CodeQuality.Style.FindImplicitCultureSensitiveToStringDirect
- Find implicit culture-sensitive ToString in concatenation
- Detect string concatenation with numeric types that implicitly call culture-sensitive
ToString(). Use an explicit format orCultureInfo.InvariantCulture.
- OpenRewrite.Recipes.CodeQuality.Style.FindImplicitDateTimeOffsetConversion
- Find implicit DateTime to DateTimeOffset conversion
- Detect implicit conversion from
DateTimetoDateTimeOffsetwhich uses the local time zone and can produce unexpected results.
- OpenRewrite.Recipes.CodeQuality.Style.FindInterpolatedStringWithoutParameters
- Find interpolated string without parameters
- Detect interpolated strings (
$"...") that contain no interpolation expressions. Use a regular string literal instead.
- OpenRewrite.Recipes.CodeQuality.Style.FindInvalidAttributeArgumentType
- Find potentially invalid attribute argument type
- Detect attribute arguments that use types not valid in attribute constructors (only primitives, string, Type, enums, and arrays of these are allowed).
- OpenRewrite.Recipes.CodeQuality.Style.FindMethodTooLong
- Find method that is too long
- Detect methods with more than 60 statements. Long methods are harder to understand and maintain.
- OpenRewrite.Recipes.CodeQuality.Style.FindMissingCancellationTokenOverload
- Find async call missing CancellationToken
- Detect async method calls that don't pass a
CancellationTokenwhen the enclosing method has one available as a parameter.
- OpenRewrite.Recipes.CodeQuality.Style.FindMissingNamedParameter
- Find boolean literal arguments without parameter name
- Detect method calls passing
trueorfalseliterals as arguments. Using named parameters improves readability.
- OpenRewrite.Recipes.CodeQuality.Style.FindMissingParamsInOverride
- Find override method missing params keyword
- Detect override methods that may be missing the
paramskeyword on array parameters that the base method declares asparams.
- OpenRewrite.Recipes.CodeQuality.Style.FindMissingStringComparison
- Find string method missing StringComparison
- Detect string methods like
Equals,Contains,StartsWith,EndsWithcalled without an explicitStringComparisonparameter.
- OpenRewrite.Recipes.CodeQuality.Style.FindMultiLineXmlComment
- Find multi-line XML doc comments
- Detect
/** */style XML documentation comments that could use the///single-line syntax for consistency.
- OpenRewrite.Recipes.CodeQuality.Style.FindNonConstantStaticFieldsVisible
- Non-constant static fields should not be visible
- Public static fields that are not
constorreadonlycan be modified by any code, breaking encapsulation. Make themreadonlyor use a property.
- OpenRewrite.Recipes.CodeQuality.Style.FindNonDeterministicEndOfLine
- Find non-deterministic end-of-line in strings
- Detect string literals containing
\nthat may behave differently across platforms. Consider usingEnvironment.NewLineinstead.
- OpenRewrite.Recipes.CodeQuality.Style.FindNonFlagsEnumWithFlagsAttribute
- Find non-flags enum with [Flags]
- Detect enums marked with
[Flags]whose values are not powers of two, indicating they are not truly flags enums.
- OpenRewrite.Recipes.CodeQuality.Style.FindNotNullIfNotNullAttribute
- Find missing NotNullIfNotNull attribute
- Detect methods with nullable return types depending on nullable parameters that lack
[NotNullIfNotNull]attribute.
- OpenRewrite.Recipes.CodeQuality.Style.FindObserveAsyncResult
- Find unobserved async call result
- Detect calls to async methods where the returned Task is not awaited, assigned, or otherwise observed. Unobserved tasks may silently swallow exceptions.
- OpenRewrite.Recipes.CodeQuality.Style.FindObsoleteWithoutMessage
- Obsolete attribute should include explanation
- The
[Obsolete]attribute should include a message explaining why the member is obsolete and what to use instead.
- OpenRewrite.Recipes.CodeQuality.Style.FindOverrideChangesParameterDefaults
- Find overrides that change parameter defaults
- Detect
overridemethods with default parameter values. Overrides should not change defaults from the base method as this causes confusing behavior depending on the reference type.
- OpenRewrite.Recipes.CodeQuality.Style.FindPreferCollectionAbstraction
- Find concrete collection in public API
- Detect public method parameters or return types that use concrete collection types like
List<T>instead ofIList<T>orIEnumerable<T>.
- OpenRewrite.Recipes.CodeQuality.Style.FindPrimaryConstructorReadonly
- Find reassigned primary constructor parameter
- Detect primary constructor parameters that are reassigned in the class body. Primary constructor parameters should be treated as readonly.
- OpenRewrite.Recipes.CodeQuality.Style.FindRawStringImplicitEndOfLine
- Find raw string with implicit end of line
- Detect raw string literals (
"""...""") that contain implicit end-of-line characters which may behave differently across platforms.
- OpenRewrite.Recipes.CodeQuality.Style.FindReadOnlyStructMembers
- Find struct member that could be readonly
- Detect struct methods and properties that don't modify state and could be marked
readonlyto prevent defensive copies.
- OpenRewrite.Recipes.CodeQuality.Style.FindRedundantArgumentValue
- Find redundant default argument values
- Detect named arguments that explicitly pass a default value. Removing them simplifies the call.
- OpenRewrite.Recipes.CodeQuality.Style.FindSenderNullForStaticEvents
- Find static event with non-null sender
- Detect static event invocations that pass
thisas the sender. Static events should usenullas the sender.
- OpenRewrite.Recipes.CodeQuality.Style.FindSingleLineXmlComment
- Find multi-line XML doc comment style
- Detect
/** ... */style XML doc comments. Use///single-line style instead for consistency.
- OpenRewrite.Recipes.CodeQuality.Style.FindSpanEqualityOperator
- Find equality operator on Span<T>
- Detect
==or!=operators onSpan<T>orReadOnlySpan<T>. UseSequenceEqualinstead.
- OpenRewrite.Recipes.CodeQuality.Style.FindStreamReadIgnored
- Find Stream.Read() return value ignored
- Detect
Stream.Read()calls where the return value (bytes read) is not used. This can lead to incomplete reads.
- OpenRewrite.Recipes.CodeQuality.Style.FindStringFormatConstant
- Find non-constant string.Format format string
- Detect non-constant format strings passed to
string.Format. Use a constant to prevent format string injection.
- OpenRewrite.Recipes.CodeQuality.Style.FindTaskInUsing
- Find unawaited task in using statement
- Detect
usingstatements where a Task is not awaited, which can cause premature disposal before the task completes.
- OpenRewrite.Recipes.CodeQuality.Style.FindThreadStaticOnInstanceField
- Do not use ThreadStatic on instance fields
[ThreadStatic]only works on static fields. Using it on instance fields has no effect.
- OpenRewrite.Recipes.CodeQuality.Style.FindThrowIfNullWithNonNullable
- Find ThrowIfNull with value type argument
- Detect
ArgumentNullException.ThrowIfNullcalled with value type parameters that can never be null.
- OpenRewrite.Recipes.CodeQuality.Style.FindTypeNameMatchesNamespace
- Find type name matching namespace
- Detect type names that match their containing namespace, which can cause ambiguous references.
- OpenRewrite.Recipes.CodeQuality.Style.FindTypeShouldNotExtendApplicationException
- Types should not extend ApplicationException
- Do not create custom exceptions that inherit from
ApplicationException. Inherit fromExceptionor a more specific exception type.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseCallerArgumentExpression
- Find redundant nameof with CallerArgumentExpression
- Detect
nameof(param)passed to parameters marked with[CallerArgumentExpression]. The attribute fills the value automatically.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseDateTimeOffsetInsteadOfDateTime
- Find DateTime.Now/UtcNow usage
- Detect
DateTime.NowandDateTime.UtcNowusage. UseDateTimeOffsetinstead for unambiguous time representation across time zones.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseDebuggerDisplayAttribute
- Find ToString override without DebuggerDisplay
- Detect classes that override
ToString()but lack[DebuggerDisplay]attribute for debugger integration.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseDefaultParameterValue
- Find [DefaultValue] on parameter
- Detect
[DefaultValue]on method parameters. Use[DefaultParameterValue]instead, as[DefaultValue]is for component model metadata only.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseElementAccessInsteadOfLinq
- Find ElementAt() that could use indexer
- Detect LINQ
.ElementAt(index)calls that could be replaced with direct indexer access[index].
- OpenRewrite.Recipes.CodeQuality.Style.FindUseEqualsMethodInsteadOfOperator
- Find == comparison that should use Equals()
- Detect
==comparisons on reference types that overrideEquals. Using==may compare references instead of values.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseExplicitEnumValue
- Find integer 0 used instead of named enum value
- Detect usage of integer literal
0where a named enum member should be used for clarity.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseFormatProviderInToString
- Find Parse/ToString without IFormatProvider
- Detect calls to culture-sensitive methods like
int.Parse,double.Parsewithout an explicitIFormatProviderorCultureInfo.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseIFormatProvider
- Find Parse/TryParse without IFormatProvider
- Detect
int.Parse(str)and similar calls without anIFormatProviderparameter. UseCultureInfo.InvariantCulturefor culture-independent parsing.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseLangwordInXmlComment
- Find missing langword in XML comment
- Detect XML doc comments that reference
null,true,falseas plain text instead of using<see langword="..."/>.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseLazyInitializerEnsureInitialize
- Find Interlocked.CompareExchange lazy init pattern
- Detect
Interlocked.CompareExchange(ref field, new T(), null)pattern. UseLazyInitializer.EnsureInitializedfor cleaner lazy initialization.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseListPatternMatching
- Find collection emptiness check
- Detect
.Length == 0or.Count == 0checks that could use list patterns likeis []in C# 11+.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseNamedParameter
- Find boolean literal argument without name
- Detect boolean literal arguments (
true/false) passed without named parameters. Named arguments improve readability.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseOperatingSystemMethods
- Use OperatingSystem methods instead of RuntimeInformation
- Use
OperatingSystem.IsWindows()and similar methods instead ofRuntimeInformation.IsOSPlatform(). The OperatingSystem methods are more concise and can be optimized by the JIT.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseProcessStartWithStartInfo
- Find Process.Start with string argument
- Detect
Process.Start("filename")which should use theProcessStartInfooverload for explicit control overUseShellExecuteand other settings.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseRecordClassExplicitly
- Find implicit record class declaration
- Detect
recorddeclarations that should userecord classexplicitly to clarify that they are reference types.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseRegexOptions
- Find Regex without ExplicitCapture option
- Detect
new Regex()orRegex.IsMatch()withoutRegexOptions.ExplicitCapture. Using this option avoids unnecessary unnamed captures.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseShellExecuteFalseWhenRedirecting
- Find redirect without UseShellExecute=false
- Detect
ProcessStartInfothat setsRedirectStandard*without explicitly settingUseShellExecute = false.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseShellExecuteNotSet
- Find ProcessStartInfo without UseShellExecute
- Detect
new ProcessStartInfo()without explicitly settingUseShellExecute. The default changed between .NET Framework (true) and .NET Core (false).
- OpenRewrite.Recipes.CodeQuality.Style.FindUseStringComparer
- Find Dictionary/HashSet without StringComparer
- Detect
Dictionary<string, T>orHashSet<string>created without an explicitStringComparer. UseStringComparer.OrdinalorStringComparer.OrdinalIgnoreCase.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseStringCreateInsteadOfConcat
- Find FormattableString usage
- Detect
FormattableStringusage. Consider usingString.Createon .NET 6+ for better performance.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseStringEqualsInsteadOfIsPattern
- Find 'is' pattern with string literal
- Detect
x is "literal"patterns that should usestring.Equalswith explicitStringComparisonfor culture-aware or case-insensitive comparisons.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseSystemThreadingLock
- Use System.Threading.Lock instead of object for locking
- In .NET 9+, use
System.Threading.Lockinstead ofobjectfor lock objects. The dedicated Lock type provides better performance.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseTaskUnwrap
- Find double await pattern
- Detect
await awaitpattern which can be replaced with.Unwrap()for clarity.
- OpenRewrite.Recipes.CodeQuality.Style.FindUseTimeProviderInsteadOfCustom
- Find custom time abstraction
- Detect interfaces or abstract classes that appear to be custom time providers. Use
System.TimeProvider(available in .NET 8+) instead.
- OpenRewrite.Recipes.CodeQuality.Style.FindValidateArgumentsBeforeYield
- Find argument validation in iterator method
- Detect iterator methods that validate arguments after
yield return. Argument validation in iterators is deferred until enumeration begins.
- OpenRewrite.Recipes.CodeQuality.Style.ParenthesizeNotPattern
- Parenthesize not pattern for clarity
- Add parentheses to
not A or B→(not A) or Bto clarify thatnotbinds tighter thanor.
- OpenRewrite.Recipes.CodeQuality.Style.PreferNullCheckOverTypeCheck
- Prefer null check over type check
- Replace
x is objectwithx is not nullfor clarity.
- OpenRewrite.Recipes.CodeQuality.Style.StyleCodeQuality
- Style code quality
- Code style modernization recipes for C#.
- OpenRewrite.Recipes.CodeQuality.Style.UseCollectionExpression
- Use collection expression
- Replace array/list creation with collection expressions (C# 12).
- OpenRewrite.Recipes.CodeQuality.Style.UseExplicitTypeInsteadOfVar
- Use explicit type instead of var
- Use explicit type instead of
varwhen the type is not evident.
- OpenRewrite.Recipes.CodeQuality.Style.UseFileScopedNamespace
- Use file-scoped namespace
- Detect block-scoped namespace declarations that could use file-scoped syntax (C# 10).
- OpenRewrite.Recipes.CodeQuality.Style.UseMethodGroupConversion
- Use method group conversion
- Replace
x => Foo(x)withFoowhere method group conversion applies.
- OpenRewrite.Recipes.CodeQuality.Style.UsePrimaryConstructor
- Use primary constructor
- Convert classes with a single constructor into primary constructor syntax (C# 12).
- OpenRewrite.Recipes.CodeQuality.Style.UseStringContains
- Use string.Contains instead of IndexOf comparison
- Replace
s.IndexOf(x) >= 0withs.Contains(x)ands.IndexOf(x) == -1with!s.Contains(x).
- OpenRewrite.Recipes.CodeQuality.Style.UseStringIsNullOrEmpty
- Use string.IsNullOrEmpty method
- Replace
s == null || s == ""ands == null || s.Length == 0withstring.IsNullOrEmpty(s).
- OpenRewrite.Recipes.CodeQuality.Style.UseStringLengthComparison
- Use string.Length instead of comparison with empty string
- Replace
s == ""withs.Length == 0ands != ""withs.Length != 0.
stylistic
87 recipes
- org.openrewrite.codemods.format.ArrayBracketNewline
- Enforce linebreaks after opening and before closing array brackets
- Enforce linebreaks after opening and before closing array brackets See rule details.
- org.openrewrite.codemods.format.ArrayBracketSpacing
- Enforce consistent spacing inside array brackets
- Enforce consistent spacing inside array brackets See rule details.
- org.openrewrite.codemods.format.ArrayElementNewline
- Enforce line breaks after each array element
- Enforce line breaks after each array element See rule details.
- org.openrewrite.codemods.format.ArrowParens
- Require parentheses around arrow function arguments
- Require parentheses around arrow function arguments See rule details.
- org.openrewrite.codemods.format.ArrowSpacing
- Enforce consistent spacing before and after the arrow in arrow functions
- Enforce consistent spacing before and after the arrow in arrow functions See rule details.
- org.openrewrite.codemods.format.BlockSpacing
- Disallow or enforce spaces inside of blocks after opening block and before closing block
- Disallow or enforce spaces inside of blocks after opening block and before closing block See rule details.
- org.openrewrite.codemods.format.BraceStyle
- Enforce consistent brace style for blocks
- Enforce consistent brace style for blocks See rule details.
- org.openrewrite.codemods.format.CommaDangle
- Require or disallow trailing commas
- Require or disallow trailing commas See rule details.
- org.openrewrite.codemods.format.CommaSpacing
- Enforce consistent spacing before and after commas
- Enforce consistent spacing before and after commas See rule details.
- org.openrewrite.codemods.format.CommaStyle
- Enforce consistent comma style
- Enforce consistent comma style See rule details.
- org.openrewrite.codemods.format.ComputedPropertySpacing
- Enforce consistent spacing inside computed property brackets
- Enforce consistent spacing inside computed property brackets See rule details.
- org.openrewrite.codemods.format.DotLocation
- Enforce consistent newlines before and after dots
- Enforce consistent newlines before and after dots See rule details.
- org.openrewrite.codemods.format.EolLast
- Require or disallow newline at the end of files
- Require or disallow newline at the end of files See rule details.
- org.openrewrite.codemods.format.FuncCallSpacing
- Require or disallow spacing between function identifiers and their invocations. Alias of `function-call-spacing`
- Require or disallow spacing between function identifiers and their invocations. Alias of `function-call-spacing`. See rule details.
- org.openrewrite.codemods.format.FunctionCallArgumentNewline
- Enforce line breaks between arguments of a function call
- Enforce line breaks between arguments of a function call See rule details.
- org.openrewrite.codemods.format.FunctionCallSpacing
- Require or disallow spacing between function identifiers and their invocations
- Require or disallow spacing between function identifiers and their invocations See rule details.
- org.openrewrite.codemods.format.FunctionParenNewline
- Enforce consistent line breaks inside function parentheses
- Enforce consistent line breaks inside function parentheses See rule details.
- org.openrewrite.codemods.format.GeneratorStarSpacing
- Enforce consistent spacing around `*` operators in generator functions
- Enforce consistent spacing around `*` operators in generator functions See rule details.
- org.openrewrite.codemods.format.ImplicitArrowLinebreak
- Enforce the location of arrow function bodies
- Enforce the location of arrow function bodies See rule details.
- org.openrewrite.codemods.format.Indent
- Enforce consistent indentation
- Enforce consistent indentation See rule details.
- org.openrewrite.codemods.format.IndentBinaryOps
- Indentation for binary operators
- Indentation for binary operators See rule details.
- org.openrewrite.codemods.format.JsxClosingBracketLocation
- Enforce closing bracket location in JSX
- Enforce closing bracket location in JSX See rule details.
- org.openrewrite.codemods.format.JsxClosingTagLocation
- Enforce closing tag location for multiline JSX
- Enforce closing tag location for multiline JSX See rule details.
- org.openrewrite.codemods.format.JsxCurlyBracePresence
- Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes
- Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes See rule details.
- org.openrewrite.codemods.format.JsxCurlyNewline
- Enforce consistent linebreaks in curly braces in JSX attributes and expressions
- Enforce consistent linebreaks in curly braces in JSX attributes and expressions See rule details.
- org.openrewrite.codemods.format.JsxCurlySpacing
- Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
- Enforce or disallow spaces inside of curly braces in JSX attributes and expressions See rule details.
- org.openrewrite.codemods.format.JsxEqualsSpacing
- Enforce or disallow spaces around equal signs in JSX attributes
- Enforce or disallow spaces around equal signs in JSX attributes See rule details.
- org.openrewrite.codemods.format.JsxFirstPropNewLine
- Enforce proper position of the first property in JSX
- Enforce proper position of the first property in JSX See rule details.
- org.openrewrite.codemods.format.JsxIndent
- Enforce JSX indentation
- Enforce JSX indentation See rule details.
- org.openrewrite.codemods.format.JsxIndentProps
- Enforce props indentation in JSX
- Enforce props indentation in JSX See rule details.
- org.openrewrite.codemods.format.JsxMaxPropsPerLine
- Enforce maximum of props on a single line in JSX
- Enforce maximum of props on a single line in JSX See rule details.
- org.openrewrite.codemods.format.JsxNewline
- Require or prevent a new line after jsx elements and expressions
- Require or prevent a new line after jsx elements and expressions. See rule details.
- org.openrewrite.codemods.format.JsxOneExpressionPerLine
- Require one JSX element per line
- Require one JSX element per line See rule details.
- org.openrewrite.codemods.format.JsxPascalCase
- Enforce PascalCase for user-defined JSX components
- Enforce PascalCase for user-defined JSX components See rule details.
- org.openrewrite.codemods.format.JsxPropsNoMultiSpaces
- Disallow multiple spaces between inline JSX props
- Disallow multiple spaces between inline JSX props See rule details.
- org.openrewrite.codemods.format.JsxQuotes
- Enforce the consistent use of either double or single quotes in JSX attributes
- Enforce the consistent use of either double or single quotes in JSX attributes See rule details.
- org.openrewrite.codemods.format.JsxSelfClosingComp
- Disallow extra closing tags for components without children
- Disallow extra closing tags for components without children See rule details.
- org.openrewrite.codemods.format.JsxSortProps
- Enforce props alphabetical sorting
- Enforce props alphabetical sorting See rule details.
- org.openrewrite.codemods.format.JsxTagSpacing
- Enforce whitespace in and around the JSX opening and closing brackets
- Enforce whitespace in and around the JSX opening and closing brackets See rule details.
- org.openrewrite.codemods.format.JsxWrapMultilines
- Disallow missing parentheses around multiline JSX
- Disallow missing parentheses around multiline JSX See rule details.
- org.openrewrite.codemods.format.KeySpacing
- Enforce consistent spacing between keys and values in object literal properties
- Enforce consistent spacing between keys and values in object literal properties See rule details.
- org.openrewrite.codemods.format.KeywordSpacing
- Enforce consistent spacing before and after keywords
- Enforce consistent spacing before and after keywords See rule details.
- org.openrewrite.codemods.format.LinebreakStyle
- Enforce consistent linebreak style
- Enforce consistent linebreak style See rule details.
- org.openrewrite.codemods.format.LinesAroundComment
- Require empty lines around comments
- Require empty lines around comments See rule details.
- org.openrewrite.codemods.format.LinesBetweenClassMembers
- Require or disallow an empty line between class members
- Require or disallow an empty line between class members See rule details.
- org.openrewrite.codemods.format.MemberDelimiterStyle
- Require a specific member delimiter style for interfaces and type literals
- Require a specific member delimiter style for interfaces and type literals See rule details.
- org.openrewrite.codemods.format.MultilineTernary
- Enforce newlines between operands of ternary expressions
- Enforce newlines between operands of ternary expressions See rule details.
- org.openrewrite.codemods.format.NewParens
- Enforce or disallow parentheses when invoking a constructor with no arguments
- Enforce or disallow parentheses when invoking a constructor with no arguments See rule details.
- org.openrewrite.codemods.format.NewlinePerChainedCall
- Require a newline after each call in a method chain
- Require a newline after each call in a method chain See rule details.
- org.openrewrite.codemods.format.NoConfusingArrow
- Disallow arrow functions where they could be confused with comparisons
- Disallow arrow functions where they could be confused with comparisons See rule details.
- org.openrewrite.codemods.format.NoExtraParens
- Disallow unnecessary parentheses
- Disallow unnecessary parentheses See rule details.
- org.openrewrite.codemods.format.NoExtraSemi
- Disallow unnecessary semicolons
- Disallow unnecessary semicolons See rule details.
- org.openrewrite.codemods.format.NoFloatingDecimal
- Disallow leading or trailing decimal points in numeric literals
- Disallow leading or trailing decimal points in numeric literals See rule details.
- org.openrewrite.codemods.format.NoMultiSpaces
- Disallow multiple spaces
- Disallow multiple spaces See rule details.
- org.openrewrite.codemods.format.NoMultipleEmptyLines
- Disallow multiple empty lines
- Disallow multiple empty lines See rule details.
- org.openrewrite.codemods.format.NoTrailingSpaces
- Disallow trailing whitespace at the end of lines
- Disallow trailing whitespace at the end of lines See rule details.
- org.openrewrite.codemods.format.NoWhitespaceBeforeProperty
- Disallow whitespace before properties
- Disallow whitespace before properties See rule details.
- org.openrewrite.codemods.format.NonblockStatementBodyPosition
- Enforce the location of single-line statements
- Enforce the location of single-line statements See rule details.
- org.openrewrite.codemods.format.ObjectCurlyNewline
- Enforce consistent line breaks after opening and before closing braces
- Enforce consistent line breaks after opening and before closing braces See rule details.
- org.openrewrite.codemods.format.ObjectCurlySpacing
- Enforce consistent spacing inside braces
- Enforce consistent spacing inside braces See rule details.
- org.openrewrite.codemods.format.ObjectPropertyNewline
- Enforce placing object properties on separate lines
- Enforce placing object properties on separate lines See rule details.
- org.openrewrite.codemods.format.OneVarDeclarationPerLine
- Require or disallow newlines around variable declarations
- Require or disallow newlines around variable declarations See rule details.
- org.openrewrite.codemods.format.OperatorLinebreak
- Enforce consistent linebreak style for operators
- Enforce consistent linebreak style for operators See rule details.
- org.openrewrite.codemods.format.PaddedBlocks
- Require or disallow padding within blocks
- Require or disallow padding within blocks See rule details.
- org.openrewrite.codemods.format.PaddingLineBetweenStatements
- Require or disallow padding lines between statements
- Require or disallow padding lines between statements See rule details.
- org.openrewrite.codemods.format.QuoteProps
- Require quotes around object literal property names
- Require quotes around object literal property names See rule details.
- org.openrewrite.codemods.format.Quotes
- Enforce the consistent use of either backticks, double, or single quotes
- Enforce the consistent use of either backticks, double, or single quotes See rule details.
- org.openrewrite.codemods.format.RecommendedESLintStyling
- Recommended ESLint Styling
- Collection of stylistic ESLint rules that are recommended by the ESLint Style..
- org.openrewrite.codemods.format.RestSpreadSpacing
- Enforce spacing between rest and spread operators and their expressions
- Enforce spacing between rest and spread operators and their expressions See rule details.
- org.openrewrite.codemods.format.Semi
- Require or disallow semicolons instead of ASI
- Require or disallow semicolons instead of ASI See rule details.
- org.openrewrite.codemods.format.SemiSpacing
- Enforce consistent spacing before and after semicolons
- Enforce consistent spacing before and after semicolons See rule details.
- org.openrewrite.codemods.format.SemiStyle
- Enforce location of semicolons
- Enforce location of semicolons See rule details.
- org.openrewrite.codemods.format.SpaceBeforeBlocks
- Enforce consistent spacing before blocks
- Enforce consistent spacing before blocks See rule details.
- org.openrewrite.codemods.format.SpaceBeforeFunctionParen
- Enforce consistent spacing before `function` definition opening parenthesis
- Enforce consistent spacing before `function` definition opening parenthesis See rule details.
- org.openrewrite.codemods.format.SpaceInParens
- Enforce consistent spacing inside parentheses
- Enforce consistent spacing inside parentheses See rule details.
- org.openrewrite.codemods.format.SpaceInfixOps
- Require spacing around infix operators
- Require spacing around infix operators See rule details.
- org.openrewrite.codemods.format.SpaceUnaryOps
- Enforce consistent spacing before or after unary operators
- Enforce consistent spacing before or after unary operators See rule details.
- org.openrewrite.codemods.format.SpacedComment
- Enforce consistent spacing after the `//` or `/*` in a comment
- Enforce consistent spacing after the `//` or `/*` in a comment See rule details.
- org.openrewrite.codemods.format.SwitchColonSpacing
- Enforce spacing around colons of switch statements
- Enforce spacing around colons of switch statements See rule details.
- org.openrewrite.codemods.format.TemplateCurlySpacing
- Require or disallow spacing around embedded expressions of template strings
- Require or disallow spacing around embedded expressions of template strings See rule details.
- org.openrewrite.codemods.format.TemplateTagSpacing
- Require or disallow spacing between template tags and their literals
- Require or disallow spacing between template tags and their literals See rule details.
- org.openrewrite.codemods.format.TypeAnnotationSpacing
- Require consistent spacing around type annotations
- Require consistent spacing around type annotations See rule details.
- org.openrewrite.codemods.format.TypeGenericSpacing
- Enforces consistent spacing inside TypeScript type generics
- Enforces consistent spacing inside TypeScript type generics See rule details.
- org.openrewrite.codemods.format.TypeNamedTupleSpacing
- Expect space before the type declaration in the named tuple
- Expect space before the type declaration in the named tuple See rule details.
- org.openrewrite.codemods.format.WrapIife
- Require parentheses around immediate `function` invocations
- Require parentheses around immediate `function` invocations See rule details.
- org.openrewrite.codemods.format.WrapRegex
- Require parenthesis around regex literals
- Require parenthesis around regex literals See rule details.
- org.openrewrite.codemods.format.YieldStarSpacing
- Require or disallow spacing around the `` in `yield` expressions
- Require or disallow spacing around the `` in `yield` expressions See rule details.
subprocess
2 recipes
- org.openrewrite.python.migrate.FindOsPopen
- Find deprecated
os.popen()usage os.popen()has been deprecated since Python 3.6. Usesubprocess.run()orsubprocess.Popen()instead for better control over process creation and output handling.
- Find deprecated
- org.openrewrite.python.migrate.FindOsSpawn
- Find deprecated
os.spawn*()usage - The
os.spawn*()family of functions are deprecated. Usesubprocess.run()orsubprocess.Popen()instead.
- Find deprecated
supply
1 recipe
- org.openrewrite.github.security.GitHubActionsSecurity
- GitHub Actions security insights
- Finds potential security issues in GitHub Actions workflows, based on Zizmor security analysis rules.
- Tags: supply-chain
svelte
18 recipes
- org.openrewrite.codemods.cleanup.svelte.FirstAttributeLinebreak
- Enforce the location of first attribute
- Enforce the location of first attribute See rule details for svelte/first-attribute-linebreak.
- org.openrewrite.codemods.cleanup.svelte.HtmlClosingBracketSpacing
- Require or disallow a space before tag's closing brackets
- Require or disallow a space before tag's closing brackets See rule details for svelte/html-closing-bracket-spacing.
- org.openrewrite.codemods.cleanup.svelte.HtmlQuotes
- Enforce quotes style of HTML attributes
- Enforce quotes style of HTML attributes See rule details for svelte/html-quotes.
- org.openrewrite.codemods.cleanup.svelte.HtmlSelfClosing
- Enforce self-closing style
- Enforce self-closing style See rule details for svelte/html-self-closing.
- org.openrewrite.codemods.cleanup.svelte.Indent
- Enforce consistent indentation
- Enforce consistent indentation See rule details for svelte/indent.
- org.openrewrite.codemods.cleanup.svelte.MaxAttributesPerLine
- Enforce the maximum number of attributes per line
- Enforce the maximum number of attributes per line See rule details for svelte/max-attributes-per-line.
- org.openrewrite.codemods.cleanup.svelte.MustacheSpacing
- Enforce unified spacing in mustache
- Enforce unified spacing in mustache See rule details for svelte/mustache-spacing.
- org.openrewrite.codemods.cleanup.svelte.NoDynamicSlotName
- Disallow dynamic slot name
- Disallow dynamic slot name See rule details for svelte/no-dynamic-slot-name.
- org.openrewrite.codemods.cleanup.svelte.NoSpacesAroundEqualSignsInAttribute
- Disallow spaces around equal signs in attribute
- Disallow spaces around equal signs in attribute See rule details for svelte/no-spaces-around-equal-signs-in-attribute.
- org.openrewrite.codemods.cleanup.svelte.NoUselessMustaches
- Disallow unnecessary mustache interpolations
- Disallow unnecessary mustache interpolations See rule details for svelte/no-useless-mustaches.
- org.openrewrite.codemods.cleanup.svelte.PreferClassDirective
- Require class directives instead of ternary expressions
- Require class directives instead of ternary expressions See rule details for svelte/prefer-class-directive.
- org.openrewrite.codemods.cleanup.svelte.PreferStyleDirective
- Require style directives instead of style attribute
- Require style directives instead of style attribute See rule details for svelte/prefer-style-directive.
- org.openrewrite.codemods.cleanup.svelte.RecommendedsvelteCodeCleanup
- Recommended svelte code cleanup
- Collection of cleanup ESLint rules from eslint-plugin-svelte.
- org.openrewrite.codemods.cleanup.svelte.RequireStoreReactiveAccess
- Disallow to use of the store itself as an operand. Need to use $ prefix or get function
- Disallow to use of the store itself as an operand. Need to use $ prefix or get function. See rule details for svelte/require-store-reactive-access.
- org.openrewrite.codemods.cleanup.svelte.ShorthandAttribute
- Enforce use of shorthand syntax in attribute
- Enforce use of shorthand syntax in attribute See rule details for svelte/shorthand-attribute.
- org.openrewrite.codemods.cleanup.svelte.ShorthandDirective
- Enforce use of shorthand syntax in directives
- Enforce use of shorthand syntax in directives See rule details for svelte/shorthand-directive.
- org.openrewrite.codemods.cleanup.svelte.SortAttributes
- Enforce order of attributes
- Enforce order of attributes See rule details for svelte/sort-attributes.
- org.openrewrite.codemods.cleanup.svelte.SpacedHtmlComment
- Enforce consistent spacing after the <!-- and before the --> in a HTML comment
- Enforce consistent spacing after the <!-- and before the --> in a HTML comment See rule details for svelte/spaced-html-comment.
swagger
9 recipes
- org.openrewrite.java.springdoc.SpringFoxToSpringDoc
- Migrate from SpringFox Swagger to SpringDoc and OpenAPI
- Migrate from SpringFox Swagger to SpringDoc and OpenAPI.
- org.openrewrite.java.springdoc.SwaggerToSpringDoc
- Migrate from Swagger to SpringDoc and OpenAPI
- Migrate from Swagger to SpringDoc and OpenAPI.
- org.openrewrite.openapi.swagger.MigrateApiImplicitParamsToParameters
- Migrate from
@ApiImplicitParamsto@Parameters - Converts
@ApiImplicitParamsto@Parametersand the@ApiImplicitParamannotation to@Parameterand converts the directly mappable attributes and removes the others.
- Migrate from
- org.openrewrite.openapi.swagger.MigrateApiModelPropertyToSchema
- Migrate from
@ApiModelPropertyto@Schema - Converts the
@ApiModelPropertyannotation to@Schemaand converts the "value" attribute to "description".
- Migrate from
- org.openrewrite.openapi.swagger.MigrateApiOperationToOperation
- Migrate from
@ApiOperationto@Operation - Converts the
@ApiOperationannotation to@Operationand converts the directly mappable attributes and removes the others.
- Migrate from
- org.openrewrite.openapi.swagger.MigrateApiParamToParameter
- Migrate from
@ApiParamto@Parameter - Converts the
@ApiParamannotation to@Parameterand converts the directly mappable attributes.
- Migrate from
- org.openrewrite.openapi.swagger.MigrateApiResponsesToApiResponses
- Migrate from
@ApiResponsesto@ApiResponses - Changes the namespace of the
@ApiResponsesand@ApiResponseannotations and converts its attributes (ex. code -> responseCode, message -> description, response -> content).
- Migrate from
- org.openrewrite.openapi.swagger.SwaggerToOpenAPI
- Migrate from Swagger to OpenAPI
- Migrate from Swagger to OpenAPI.
- org.openrewrite.openapi.swagger.UseJakartaSwaggerArtifacts
- Use Jakarta Swagger Artifacts
- Migrate from javax Swagger artifacts to Jakarta versions.
sys
2 recipes
- org.openrewrite.python.migrate.FindSysCoroutineWrapper
- Find removed
sys.set_coroutine_wrapper()/sys.get_coroutine_wrapper() sys.set_coroutine_wrapper()andsys.get_coroutine_wrapper()were deprecated in Python 3.7 and removed in Python 3.8.
- Find removed
- org.openrewrite.python.migrate.ReplaceSysLastExcInfo
- Replace
sys.last_valuewithsys.last_excand flagsys.last_type/sys.last_traceback sys.last_type,sys.last_value, andsys.last_tracebackwere deprecated in Python 3.12.sys.last_valueis auto-replaced withsys.last_exc;sys.last_typeandsys.last_tracebackare flagged for manual review.
- Replace
taglib
3 recipes
- com.oracle.weblogic.rewrite.examples.AddImplicitTldFileWithTaglib2_1
- Add implicit TLD with taglib 2.1
- Add
implicit.tldfile with taglib 2.1 tosrc/main/webapp/WEB-INF/tags.
- com.oracle.weblogic.rewrite.examples.AddImplicitTldFileWithTaglib3_0
- Add implicit TLD with taglib 3.0
- Add
implicit.tldfile with taglib 3.0 tosrc/main/webapp/WEB-INF/tags.
- com.oracle.weblogic.rewrite.jakarta.JavaxFacesTagLibraryXmlToJakartaFaces3TagLibraryXml
- Migrate xmlns entries in
*taglib*.xmlfiles for Jakarta Server Faces 3 - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
taglibs
1 recipe
- com.oracle.weblogic.rewrite.jakarta.MigrateTagLibsToJakartaEE9
- Migrate Tag Libraries to 2.0 (Jakarta EE 9)
- Upgrade Jakarta Standard Tag libraries to 2.0 (Jakarta EE9) versions.
tapestry
4 recipes
- org.openrewrite.tapestry.ChangeTapestryPackages
- Change Tapestry 4 packages to Tapestry 5
- Updates package imports from org.apache.tapestry to org.apache.tapestry5. Only renames packages that have direct equivalents in Tapestry 5.
- org.openrewrite.tapestry.ChangeTapestryTypes
- Change Tapestry 4 types to Tapestry 5 equivalents
- Renames Tapestry 4 types that have direct equivalents in Tapestry 5. This handles types from different packages that were reorganized in T5.
- org.openrewrite.tapestry.MigrateTapestry4To5
- Migrate Tapestry 4 to Tapestry 5
- Migrates Apache Tapestry 4 applications to Tapestry 5. This includes package renames, removing base class inheritance, converting listener interfaces to annotations, and updating dependencies.
- org.openrewrite.tapestry.UpdateTapestryDependencies
- Update Tapestry dependencies
- Updates dependencies from Tapestry 4 to Tapestry 5.
tar
1 recipe
- OpenRewrite.Recipes.Net10.FindGnuTarPaxTarEntry
- Find
GnuTarEntry/PaxTarEntrydefault timestamp change - Finds
new GnuTarEntry(...)andnew PaxTarEntry(...)constructor calls. In .NET 10, these no longer set atime and ctime by default. SetAccessTime/ChangeTimeexplicitly if needed.
- Find
tarfile
1 recipe
- org.openrewrite.python.migrate.ReplaceTarfileFilemode
- Replace
tarfile.filemodewithstat.filemode tarfile.filemodewas removed in Python 3.8. Usestat.filemode()instead.
- Replace
tempfile
1 recipe
- org.openrewrite.python.migrate.FindTempfileMktemp
- Find deprecated
tempfile.mktemp()usage - Find usage of
tempfile.mktemp()which is deprecated due to security concerns (race condition). Usemkstemp()orNamedTemporaryFile()instead.
- Find deprecated
templating
1 recipe
- org.openrewrite.quarkus.spring.SpringBootThymeleafToQuarkus
- Replace Spring Boot Thymeleaf with Quarkus Qute
- Migrates
spring-boot-starter-thymeleaftoquarkus-qute.
terraform
122 recipes
- org.openrewrite.terraform.UpgradeTerraformTo0_14
- Upgrade Terraform to 0.14
- Migrate Terraform configuration from 0.13 to 0.14. Moves version constraints from
providerblocks toterraform \{ required_providers \{ ... \} \}.
- org.openrewrite.terraform.aws.AWSBestPractices
- Best practices for AWS
- Securely operate on Amazon Web Services.
- org.openrewrite.terraform.aws.DisableInstanceMetadataServiceV1
- Disable Instance Metadata Service version 1
- As a request/response method IMDSv1 is prone to local misconfigurations.
- org.openrewrite.terraform.aws.EnableApiGatewayCaching
- Enable API gateway caching
- Enable caching for all methods of API Gateway.
- org.openrewrite.terraform.aws.EnableDynamoDbPITR
- Enable point-in-time recovery for DynamoDB
- DynamoDB Point-In-Time Recovery (PITR) is an automatic backup service for DynamoDB table data that helps protect your DynamoDB tables from accidental write or delete operations.
- org.openrewrite.terraform.aws.EnableECRScanOnPush
- Scan images pushed to ECR
- ECR Image Scanning assesses and identifies operating system vulnerabilities. Using automated image scans you can ensure container image vulnerabilities are found before getting pushed to production.
- org.openrewrite.terraform.aws.EncryptAuroraClusters
- Encrypt Aurora clusters
- Native Aurora encryption helps protect your cloud applications and fulfils compliance requirements for data-at-rest encryption.
- org.openrewrite.terraform.aws.EncryptCodeBuild
- Encrypt CodeBuild projects
- Build artifacts, such as a cache, logs, exported raw test report data files, and build results, are encrypted by default using CMKs for Amazon S3 that are managed by the AWS Key Management Service.
- org.openrewrite.terraform.aws.EncryptDAXStorage
- Encrypt DAX storage at rest
- DAX encryption at rest automatically integrates with AWS KMS for managing the single service default key used to encrypt clusters.
- org.openrewrite.terraform.aws.EncryptDocumentDB
- Encrypt DocumentDB storage
- The encryption feature available for Amazon DocumentDB clusters provides an additional layer of data protection by helping secure your data against unauthorized access to the underlying storage.
- org.openrewrite.terraform.aws.EncryptEBSSnapshots
- Encrypt EBS snapshots
- EBS snapshots should be encrypted, as they often include sensitive information, customer PII or CPNI.
- org.openrewrite.terraform.aws.EncryptEBSVolumeLaunchConfiguration
- Encrypt EBS volume launch configurations
- EBS volumes allow you to create encrypted launch configurations when creating EC2 instances and auto scaling. When the entire EBS volume is encrypted, data stored at rest on the volume, disk I/O, snapshots created from the volume, and data in-transit between EBS and EC2 are all encrypted.
- org.openrewrite.terraform.aws.EncryptEBSVolumes
- Encrypt EBS volumes
- Encrypting EBS volumes ensures that replicated copies of your images are secure even if they are accidentally exposed. AWS EBS encryption uses AWS KMS customer master keys (CMK) when creating encrypted volumes and snapshots. Storing EBS volumes in their encrypted state reduces the risk of data exposure or data loss.
- org.openrewrite.terraform.aws.EncryptEFSVolumesInECSTaskDefinitionsInTransit
- Encrypt EFS Volumes in ECS Task Definitions in transit
- Enable attached EFS definitions in ECS tasks to use encryption in transit.
- org.openrewrite.terraform.aws.EncryptElastiCacheRedisAtRest
- Encrypt ElastiCache Redis at rest
- ElastiCache for Redis offers default encryption at rest as a service.
- org.openrewrite.terraform.aws.EncryptElastiCacheRedisInTransit
- Encrypt ElastiCache Redis in transit
- ElastiCache for Redis offers optional encryption in transit. In-transit encryption provides an additional layer of data protection when transferring data over standard HTTPS protocol.
- org.openrewrite.terraform.aws.EncryptNeptuneStorage
- Encrypt Neptune storage
- Encryption of Neptune storage protects data and metadata against unauthorized access.
- org.openrewrite.terraform.aws.EncryptRDSClusters
- Encrypt RDS clusters
- Native RDS encryption helps protect your cloud applications and fulfils compliance requirements for data-at-rest encryption.
- org.openrewrite.terraform.aws.EncryptRedshift
- Encrypt Redshift storage at rest
- Redshift clusters should be securely encrypted at rest.
- org.openrewrite.terraform.aws.EnsureAWSCMKRotationIsEnabled
- Ensure AWS CMK rotation is enabled
- Ensure AWS CMK rotation is enabled.
- org.openrewrite.terraform.aws.EnsureAWSEFSWithEncryptionForDataAtRestIsEnabled
- Ensure AWS EFS with encryption for data at rest is enabled
- Ensure AWS EFS with encryption for data at rest is enabled.
- org.openrewrite.terraform.aws.EnsureAWSEKSClusterEndpointAccessIsPubliclyDisabled
- Ensure AWS EKS cluster endpoint access is publicly disabled
- Ensure AWS EKS cluster endpoint access is publicly disabled.
- org.openrewrite.terraform.aws.EnsureAWSElasticsearchDomainEncryptionForDataAtRestIsEnabled
- Ensure AWS Elasticsearch domain encryption for data at rest is enabled
- Ensure AWS Elasticsearch domain encryption for data at rest is enabled.
- org.openrewrite.terraform.aws.EnsureAWSElasticsearchDomainsHaveEnforceHTTPSEnabled
- Ensure AWS Elasticsearch domains have
EnforceHTTPSenabled - Ensure AWS Elasticsearch domains have
EnforceHTTPSenabled.
- Ensure AWS Elasticsearch domains have
- org.openrewrite.terraform.aws.EnsureAWSElasticsearchHasNodeToNodeEncryptionEnabled
- Ensure AWS Elasticsearch has node-to-node encryption enabled
- Ensure AWS Elasticsearch has node-to-node encryption enabled.
- org.openrewrite.terraform.aws.EnsureAWSIAMPasswordPolicyHasAMinimumOf14Characters
- Ensure AWS IAM password policy has a minimum of 14 characters
- Ensure AWS IAM password policy has a minimum of 14 characters.
- org.openrewrite.terraform.aws.EnsureAWSLambdaFunctionIsConfiguredForFunctionLevelConcurrentExecutionLimit
- Ensure AWS Lambda function is configured for function-level concurrent execution limit
- Ensure AWS Lambda function is configured for function-level concurrent execution limit.
- org.openrewrite.terraform.aws.EnsureAWSLambdaFunctionsHaveTracingEnabled
- Ensure AWS Lambda functions have tracing enabled
- Ensure AWS Lambda functions have tracing enabled.
- org.openrewrite.terraform.aws.EnsureAWSRDSDatabaseInstanceIsNotPubliclyAccessible
- Ensure AWS RDS database instance is not publicly accessible
- Ensure AWS RDS database instance is not publicly accessible.
- org.openrewrite.terraform.aws.EnsureAWSS3ObjectVersioningIsEnabled
- Ensure AWS S3 object versioning is enabled
- Ensure AWS S3 object versioning is enabled.
- org.openrewrite.terraform.aws.EnsureAmazonEKSControlPlaneLoggingEnabledForAllLogTypes
- Ensure Amazon EKS control plane logging enabled for all log types
- Ensure Amazon EKS control plane logging enabled for all log types.
- org.openrewrite.terraform.aws.EnsureCloudTrailLogFileValidationIsEnabled
- Ensure CloudTrail log file validation is enabled
- Ensure CloudTrail log file validation is enabled.
- org.openrewrite.terraform.aws.EnsureDataStoredInAnS3BucketIsSecurelyEncryptedAtRest
- Ensure data stored in an S3 bucket is securely encrypted at rest
- Ensure data stored in an S3 bucket is securely encrypted at rest.
- org.openrewrite.terraform.aws.EnsureDetailedMonitoringForEC2InstancesIsEnabled
- Ensure detailed monitoring for EC2 instances is enabled
- Ensure detailed monitoring for EC2 instances is enabled.
- org.openrewrite.terraform.aws.EnsureEC2IsEBSOptimized
- Ensure EC2 is EBS optimized
- Ensure EC2 is EBS optimized.
- org.openrewrite.terraform.aws.EnsureECRRepositoriesAreEncrypted
- Ensure ECR repositories are encrypted
- Ensure ECR repositories are encrypted.
- org.openrewrite.terraform.aws.EnsureEnhancedMonitoringForAmazonRDSInstancesIsEnabled
- Ensure enhanced monitoring for Amazon RDS instances is enabled
- Ensure enhanced monitoring for Amazon RDS instances is enabled.
- org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyExpiresPasswordsWithin90DaysOrLess
- Ensure IAM password policy expires passwords within 90 days or less
- Ensure IAM password policy expires passwords within 90 days or less.
- org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyPreventsPasswordReuse
- Ensure IAM password policy prevents password reuse
- Ensure IAM password policy prevents password reuse.
- org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyRequiresAtLeastOneLowercaseLetter
- Ensure IAM password policy requires at least one lowercase letter
- Ensure IAM password policy requires at least one lowercase letter.
- org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyRequiresAtLeastOneNumber
- Ensure IAM password policy requires at least one number
- Ensure IAM password policy requires at least one number.
- org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyRequiresAtLeastOneSymbol
- Ensure IAM password policy requires at least one symbol
- Ensure IAM password policy requires at least one symbol.
- org.openrewrite.terraform.aws.EnsureIAMPasswordPolicyRequiresAtLeastOneUppercaseLetter
- Ensure IAM password policy requires at least one uppercase letter
- Ensure IAM password policy requires at least one uppercase letter.
- org.openrewrite.terraform.aws.EnsureKinesisStreamIsSecurelyEncrypted
- Ensure Kinesis Stream is securely encrypted
- Ensure Kinesis Stream is securely encrypted.
- org.openrewrite.terraform.aws.EnsureRDSDatabaseHasIAMAuthenticationEnabled
- Ensure RDS database has IAM authentication enabled
- Ensure RDS database has IAM authentication enabled.
- org.openrewrite.terraform.aws.EnsureRDSInstancesHaveMultiAZEnabled
- Ensure RDS instances have Multi-AZ enabled
- Ensure RDS instances have Multi-AZ enabled.
- org.openrewrite.terraform.aws.EnsureRespectiveLogsOfAmazonRDSAreEnabled
- Ensure respective logs of Amazon RDS are enabled
- Ensure respective logs of Amazon RDS are enabled.
- org.openrewrite.terraform.aws.EnsureTheS3BucketHasAccessLoggingEnabled
- Ensure the S3 bucket has access logging enabled
- Ensure the S3 bucket has access logging enabled.
- org.openrewrite.terraform.aws.EnsureVPCSubnetsDoNotAssignPublicIPByDefault
- Ensure VPC subnets do not assign public IP by default
- Ensure VPC subnets do not assign public IP by default.
- org.openrewrite.terraform.aws.ImmutableECRTags
- Make ECR tags immutable
- Amazon ECR supports immutable tags, preventing image tags from being overwritten. In the past, ECR tags could have been overwritten, this could be overcome by requiring users to uniquely identify an image using a naming convention.
- org.openrewrite.terraform.aws.UpgradeAwsAuroraMySqlToV3
- Upgrade AWS Aurora MySQL to version 3 (MySQL 8.0)
- Upgrade
engine_versionto Aurora MySQL version 3 (MySQL 8.0 compatible) onaws_rds_clusterresources and setallow_major_version_upgrade = trueto permit the major version change.
- org.openrewrite.terraform.aws.UpgradeAwsAuroraPostgresToV17
- Upgrade AWS Aurora PostgreSQL to 17
- Upgrade
engine_versionto Aurora PostgreSQL 17 onaws_rds_clusterresources and setallow_major_version_upgrade = trueto permit the major version change.
- org.openrewrite.terraform.aws.UpgradeAwsRdsMySqlToV8_4
- Upgrade AWS RDS MySQL to 8.4
- Upgrade
engine_versionto MySQL 8.4 onaws_db_instanceresources and setallow_major_version_upgrade = trueto permit the major version change.
- org.openrewrite.terraform.aws.UpgradeAwsRdsPostgresToV17
- Upgrade AWS RDS PostgreSQL to 17
- Upgrade
engine_versionto PostgreSQL 17 onaws_db_instanceresources and setallow_major_version_upgrade = trueto permit the major version change.
- org.openrewrite.terraform.aws.UseHttpsForCloudfrontDistribution
- Use HTTPS for Cloudfront distribution
- Secure communication by default.
- org.openrewrite.terraform.azure.AzureBestPractices
- Best practices for Azure
- Securely operate on Microsoft Azure.
- org.openrewrite.terraform.azure.DisableKubernetesDashboard
- Disable Kubernetes dashboard
- Disabling the dashboard eliminates it as an attack vector. The dashboard add-on is disabled by default for all new clusters created on Kubernetes 1.18 or greater.
- org.openrewrite.terraform.azure.EnableAzureStorageAccountTrustedMicrosoftServicesAccess
- Enable Azure Storage Account Trusted Microsoft Services access
- Certain Microsoft services that interact with storage accounts operate from networks that cannot be granted access through network rules. Using this configuration, you can allow the set of trusted Microsoft services to bypass those network rules.
- org.openrewrite.terraform.azure.EnableAzureStorageSecureTransferRequired
- Enable Azure Storage secure transfer required
- Microsoft recommends requiring secure transfer for all storage accounts.
- org.openrewrite.terraform.azure.EnableGeoRedundantBackupsOnPostgreSQLServer
- Enable geo-redundant backups on PostgreSQL server
- Ensure PostgreSQL server enables geo-redundant backups.
- org.openrewrite.terraform.azure.EncryptAzureVMDataDiskWithADECMK
- Encrypt Azure VM data disk with ADE/CMK
- Ensure Azure VM data disk is encrypted with ADE/CMK.
- org.openrewrite.terraform.azure.EnsureAKSPoliciesAddOn
- Ensure AKS policies add-on
- Azure Policy Add-on for Kubernetes service (AKS) extends Gatekeeper v3, an admission controller webhook for Open Policy Agent (OPA), to apply at-scale enforcements and safeguards on your clusters in a centralized, consistent manner.
- org.openrewrite.terraform.azure.EnsureAKVSecretsHaveAnExpirationDateSet
- Ensure AKV secrets have an expiration date set
- Ensure AKV secrets have an expiration date set.
- org.openrewrite.terraform.azure.EnsureASecurityContactPhoneNumberIsPresent
- Ensure a security contact phone number is present
- Ensure a security contact phone number is present.
- org.openrewrite.terraform.azure.EnsureActivityLogRetentionIsSetTo365DaysOrGreater
- Ensure activity log retention is set to 365 days or greater
- Ensure activity log retention is set to 365 days or greater.
- org.openrewrite.terraform.azure.EnsureAllKeysHaveAnExpirationDate
- Ensure all keys have an expiration date
- Ensure all keys have an expiration date.
- org.openrewrite.terraform.azure.EnsureAppServiceEnablesDetailedErrorMessages
- Ensure app service enables detailed error messages
- Ensure app service enables detailed error messages.
- org.openrewrite.terraform.azure.EnsureAppServiceEnablesFailedRequestTracing
- Ensure app service enables failed request tracing
- Ensure app service enables failed request tracing.
- org.openrewrite.terraform.azure.EnsureAppServiceEnablesHTTPLogging
- Ensure app service enables HTTP logging
- Ensure app service enables HTTP logging.
- org.openrewrite.terraform.azure.EnsureAppServicesUseAzureFiles
- Ensure app services use Azure files
- Ensure app services use Azure files.
- org.openrewrite.terraform.azure.EnsureAzureAppServiceWebAppRedirectsHTTPToHTTPS
- Ensure Azure App Service Web app redirects HTTP to HTTPS
- Ensure Azure App Service Web app redirects HTTP to HTTPS.
- org.openrewrite.terraform.azure.EnsureAzureApplicationGatewayHasWAFEnabled
- Ensure Azure application gateway has WAF enabled
- Ensure Azure application gateway has WAF enabled.
- org.openrewrite.terraform.azure.EnsureAzureKeyVaultIsRecoverable
- Ensure Azure key vault is recoverable
- Ensure Azure key vault is recoverable.
- org.openrewrite.terraform.azure.EnsureAzureNetworkWatcherNSGFlowLogsRetentionIsGreaterThan90Days
- Ensure Azure Network Watcher NSG flow logs retention is greater than 90 days
- Ensure Azure Network Watcher NSG flow logs retention is greater than 90 days.
- org.openrewrite.terraform.azure.EnsureAzurePostgreSQLDatabaseServerWithSSLConnectionIsEnabled
- Ensure Azure PostgreSQL database server with SSL connection is enabled
- Ensure Azure PostgreSQL database server with SSL connection is enabled.
- org.openrewrite.terraform.azure.EnsureAzureSQLServerAuditLogRetentionIsGreaterThan90Days
- Ensure Azure SQL server audit log retention is greater than 90 days
- Ensure Azure SQL server audit log retention is greater than 90 days.
- org.openrewrite.terraform.azure.EnsureAzureSQLServerSendAlertsToFieldValueIsSet
- Ensure Azure SQL server send alerts to field value is set
- Ensure Azure SQL server send alerts to field value is set.
- org.openrewrite.terraform.azure.EnsureAzureSQLServerThreatDetectionAlertsAreEnabledForAllThreatTypes
- Ensure Azure SQL Server threat detection alerts are enabled for all threat types
- Ensure Azure SQL Server threat detection alerts are enabled for all threat types.
- org.openrewrite.terraform.azure.EnsureFTPDeploymentsAreDisabled
- Ensure FTP Deployments are disabled
- Ensure FTP Deployments are disabled.
- org.openrewrite.terraform.azure.EnsureKeyVaultAllowsFirewallRulesSettings
- Ensure key vault allows firewall rules settings
- Ensure key vault allows firewall rules settings.
- org.openrewrite.terraform.azure.EnsureKeyVaultEnablesPurgeProtection
- Ensure key vault enables purge protection
- Ensure key vault enables purge protection.
- org.openrewrite.terraform.azure.EnsureKeyVaultKeyIsBackedByHSM
- Ensure key vault key is backed by HSM
- Ensure key vault key is backed by HSM.
- org.openrewrite.terraform.azure.EnsureKeyVaultSecretsHaveContentTypeSet
- Ensure key vault secrets have
content_typeset - Ensure key vault secrets have
content_typeset.
- Ensure key vault secrets have
- org.openrewrite.terraform.azure.EnsureLogProfileIsConfiguredToCaptureAllActivities
- Ensure log profile is configured to capture all activities
- Ensure log profile is configured to capture all activities.
- org.openrewrite.terraform.azure.EnsureMSSQLServersHaveEmailServiceAndCoAdministratorsEnabled
- Ensure MSSQL servers have email service and co-administrators enabled
- Ensure MSSQL servers have email service and co-administrators enabled.
- org.openrewrite.terraform.azure.EnsureManagedIdentityProviderIsEnabledForAppServices
- Ensure managed identity provider is enabled for app services
- Ensure managed identity provider is enabled for app services.
- org.openrewrite.terraform.azure.EnsureMySQLIsUsingTheLatestVersionOfTLSEncryption
- Ensure MySQL is using the latest version of TLS encryption
- Ensure MySQL is using the latest version of TLS encryption.
- org.openrewrite.terraform.azure.EnsureMySQLServerDatabasesHaveEnforceSSLConnectionEnabled
- Ensure MySQL server databases have Enforce SSL connection enabled
- Ensure MySQL server databases have Enforce SSL connection enabled.
- org.openrewrite.terraform.azure.EnsureMySQLServerDisablesPublicNetworkAccess
- Ensure MySQL server disables public network access
- Ensure MySQL server disables public network access.
- org.openrewrite.terraform.azure.EnsureMySQLServerEnablesGeoRedundantBackups
- Ensure MySQL server enables geo-redundant backups
- Ensure MySQL server enables geo-redundant backups.
- org.openrewrite.terraform.azure.EnsureMySQLServerEnablesThreatDetectionPolicy
- Ensure MySQL server enables Threat Detection policy
- Ensure MySQL server enables Threat Detection policy.
- org.openrewrite.terraform.azure.EnsurePostgreSQLServerDisablesPublicNetworkAccess
- Ensure PostgreSQL server disables public network access
- Ensure PostgreSQL server disables public network access.
- org.openrewrite.terraform.azure.EnsurePostgreSQLServerEnablesInfrastructureEncryption
- Ensure PostgreSQL server enables infrastructure encryption
- Ensure PostgreSQL server enables infrastructure encryption.
- org.openrewrite.terraform.azure.EnsurePostgreSQLServerEnablesThreatDetectionPolicy
- Ensure PostgreSQL server enables Threat Detection policy
- Ensure PostgreSQL server enables Threat Detection policy.
- org.openrewrite.terraform.azure.EnsurePublicNetworkAccessEnabledIsSetToFalseForMySQLServers
- Ensure public network access enabled is set to False for mySQL servers
- Ensure public network access enabled is set to False for mySQL servers.
- org.openrewrite.terraform.azure.EnsureSendEmailNotificationForHighSeverityAlertsIsEnabled
- Ensure Send email notification for high severity alerts is enabled
- Ensure Send email notification for high severity alerts is enabled.
- org.openrewrite.terraform.azure.EnsureSendEmailNotificationForHighSeverityAlertsToAdminsIsEnabled
- Ensure Send email notification for high severity alerts to admins is enabled
- Ensure Send email notification for high severity alerts to admins is enabled.
- org.openrewrite.terraform.azure.EnsureStandardPricingTierIsSelected
- Ensure standard pricing tier is selected
- Ensure standard pricing tier is selected.
- org.openrewrite.terraform.azure.EnsureStorageAccountUsesLatestTLSVersion
- Ensure storage account uses latest TLS version
- Communication between an Azure Storage account and a client application is encrypted using Transport Layer Security (TLS). Microsoft recommends using the latest version of TLS for all your Microsoft Azure App Service web applications.
- org.openrewrite.terraform.azure.EnsureTheStorageContainerStoringActivityLogsIsNotPubliclyAccessible
- Ensure the storage container storing activity logs is not publicly accessible
- Ensure the storage container storing activity logs is not publicly accessible.
- org.openrewrite.terraform.azure.EnsureWebAppHasIncomingClientCertificatesEnabled
- Ensure Web App has incoming client certificates enabled
- Ensure Web App has incoming client certificates enabled.
- org.openrewrite.terraform.azure.EnsureWebAppUsesTheLatestVersionOfHTTP
- Ensure Web App uses the latest version of HTTP
- Ensure Web App uses the latest version of HTTP.
- org.openrewrite.terraform.azure.EnsureWebAppUsesTheLatestVersionOfTLSEncryption
- Ensure Web App uses the latest version of TLS encryption
- Ensure Web App uses the latest version of TLS encryption.
- org.openrewrite.terraform.azure.SetAzureStorageAccountDefaultNetworkAccessToDeny
- Set Azure Storage Account default network access to deny
- Ensure Azure Storage Account default network access is set to Deny.
- org.openrewrite.terraform.gcp.EnablePodSecurityPolicyControllerOnGKEClusters
- Enable
PodSecurityPolicycontroller on Google Kubernetes Engine (GKE) clusters - Ensure
PodSecurityPolicycontroller is enabled on Google Kubernetes Engine (GKE) clusters.
- Enable
- org.openrewrite.terraform.gcp.EnableVPCFlowLogsAndIntranodeVisibility
- Enable VPC flow logs and intranode visibility
- Enable VPC flow logs and intranode visibility.
- org.openrewrite.terraform.gcp.EnableVPCFlowLogsForSubnetworks
- Enable VPC Flow Logs for subnetworks
- Ensure GCP VPC flow logs for subnets are enabled. Flow Logs capture information on IP traffic moving through network interfaces. This information can be used to monitor anomalous traffic and provide security insights.
- org.openrewrite.terraform.gcp.EnsureBinaryAuthorizationIsUsed
- Ensure binary authorization is used
- Ensure binary authorization is used.
- org.openrewrite.terraform.gcp.EnsureComputeInstancesLaunchWithShieldedVMEnabled
- Ensure compute instances launch with shielded VM enabled
- Ensure compute instances launch with shielded VM enabled.
- org.openrewrite.terraform.gcp.EnsureGCPCloudStorageBucketWithUniformBucketLevelAccessAreEnabled
- Ensure GCP cloud storage bucket with uniform bucket-level access are enabled
- Ensure GCP cloud storage bucket with uniform bucket-level access are enabled.
- org.openrewrite.terraform.gcp.EnsureGCPKubernetesClusterNodeAutoRepairConfigurationIsEnabled
- Ensure GCP Kubernetes cluster node auto-repair configuration is enabled
- Ensure GCP Kubernetes cluster node auto-repair configuration is enabled.
- org.openrewrite.terraform.gcp.EnsureGCPKubernetesEngineClustersHaveLegacyComputeEngineMetadataEndpointsDisabled
- Ensure GCP Kubernetes engine clusters have legacy compute engine metadata endpoints disabled
- Ensure GCP Kubernetes engine clusters have legacy compute engine metadata endpoints disabled.
- org.openrewrite.terraform.gcp.EnsureGCPVMInstancesHaveBlockProjectWideSSHKeysFeatureEnabled
- Ensure GCP VM instances have block project-wide SSH keys feature enabled
- Ensure GCP VM instances have block project-wide SSH keys feature enabled.
- org.openrewrite.terraform.gcp.EnsureIPForwardingOnInstancesIsDisabled
- Ensure IP forwarding on instances is disabled
- Ensure IP forwarding on instances is disabled.
- org.openrewrite.terraform.gcp.EnsurePrivateClusterIsEnabledWhenCreatingKubernetesClusters
- Ensure private cluster is enabled when creating Kubernetes clusters
- Ensure private cluster is enabled when creating Kubernetes clusters.
- org.openrewrite.terraform.gcp.EnsureSecureBootForShieldedGKENodesIsEnabled
- Ensure secure boot for shielded GKE nodes is enabled
- Ensure secure boot for shielded GKE nodes is enabled.
- org.openrewrite.terraform.gcp.EnsureShieldedGKENodesAreEnabled
- Ensure shielded GKE nodes are enabled
- Ensure shielded GKE nodes are enabled.
- org.openrewrite.terraform.gcp.EnsureTheGKEMetadataServerIsEnabled
- Ensure the GKE metadata server is enabled
- Ensure the GKE metadata server is enabled.
- org.openrewrite.terraform.gcp.GCPBestPractices
- Best practices for GCP
- Securely operate on Google Cloud Platform.
- org.openrewrite.terraform.terraform012.UpgradeTerraformTo0_12
- Upgrade Terraform to 0.12
- Migrate Terraform configuration from 0.11 (HCL1) to 0.12 (HCL2) syntax. Removes interpolation-only expressions, unquotes type constraints, replaces deprecated collection functions, and fixes legacy index syntax.
- org.openrewrite.terraform.terraform013.UpgradeTerraformTo0_13
- Upgrade Terraform to 0.13
- Migrate Terraform configuration from 0.12 to 0.13 syntax. Upgrades
required_providersentries from shorthand version strings to the object syntax with explicitsourceandversionattributes.
- org.openrewrite.terraform.terraform015.UpgradeTerraformTo0_15
- Upgrade Terraform to 0.15
- Migrate Terraform configuration from 0.14 to 0.15. Finds usage of provisioners that were removed in Terraform 0.15:
chef,habitat,puppet, andsalt-masterless.
test
5 recipes
- com.oracle.weblogic.rewrite.jakarta.JavaxTestXmlsToJakartaTestsXmls
- Migrate xmlns entries in
test-*.xmlfiles for Jakarta EE 9.1 using test interfaces - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation for test interfaces like arquillian.
- Migrate xmlns entries in
- org.openrewrite.java.spring.boot2.SpringBoot2JUnit4to5Migration
- Migrate Spring Boot 2.x projects to JUnit 5 from JUnit 4
- This recipe will migrate a Spring Boot application's tests from JUnit 4 to JUnit 5. This spring-specific migration includes conversion of Spring Test runners to Spring Test extensions and awareness of the composable Spring Test annotations.
- org.openrewrite.quarkus.spring.DerbyTestDriverToQuarkus
- Replace Derby test driver with Quarkus JDBC Derby (test scope)
- Migrates
org.apache.derby:derbywith test scope toio.quarkus:quarkus-jdbc-derbywith test scope.
- org.openrewrite.quarkus.spring.H2TestDriverToQuarkus
- Replace H2 test driver with Quarkus JDBC H2 (test scope)
- Migrates
com.h2database:h2with test scope toio.quarkus:quarkus-jdbc-h2with test scope.
- org.openrewrite.quarkus.spring.SpringBootTestToQuarkus
- Replace Spring Boot Test with Quarkus JUnit 5
- Migrates
spring-boot-starter-testtoquarkus-junit5.
testing
68 recipes
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.AsyncLifetimeToBeforeAfterTest
- Find
IAsyncLifetimeneeding TUnit migration - Find classes implementing
IAsyncLifetimethat should use[Before(Test)]and[After(Test)]for TUnit.
- Find
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.ChangeXUnitUsings
- Change xUnit using directives to TUnit
- Replace
using Xunit;withusing TUnit.Core;andusing TUnit.Assertions;, and removeusing Xunit.Abstractions;andusing Xunit.Sdk;.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.ClassFixtureToClassDataSource
- Find
IClassFixture<T>needing TUnit migration - Find classes implementing
IClassFixture<T>that should use[ClassDataSource<T>]for TUnit.
- Find
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.CollectionToNotInParallel
- Replace
[Collection]with[NotInParallel] - Replace the xUnit
[Collection("name")]attribute with the TUnit[NotInParallel("name")]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.ConstructorToBeforeTest
- Find test constructors needing
[Before(Test)] - Find constructors in test classes that should be converted to
[Before(Test)]methods for TUnit.
- Find test constructors needing
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.DisposableToAfterTest
- Replace
IDisposablewith[After(Test)] - Remove
IDisposablefrom the base type list and add[After(Test)]to theDispose()method.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.FactSkipToSkipAttribute
- Extract
Skipinto[Skip]attribute - Extract the
Skipargument from[Fact(Skip = "...")]or[Theory(Skip = "...")]into a separate TUnit[Skip("...")]attribute.
- Extract
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.FactTimeoutToTimeoutAttribute
- Extract
Timeoutinto[Timeout]attribute - Extract the
Timeoutargument from[Fact(Timeout = ...)]or[Theory(Timeout = ...)]into a separate TUnit[Timeout(...)]attribute.
- Extract
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.FactToTest
- Replace
[Fact]with[Test] - Replace the xUnit
[Fact]attribute with the TUnit[Test]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.InlineDataToArguments
- Replace
[InlineData]with[Arguments] - Replace the xUnit
[InlineData]attribute with the TUnit[Arguments]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MemberDataToMethodDataSource
- Replace
[MemberData]with[MethodDataSource] - Replace the xUnit
[MemberData]attribute with the TUnit[MethodDataSource]attribute. Fields and properties referenced by MemberData are converted to methods.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateFromXUnit
- Migrate from xUnit to TUnit
- Migrate xUnit test attributes, assertions, and lifecycle patterns to their TUnit equivalents.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateFromXUnitAttributes
- Migrate xUnit attributes to TUnit
- Replace xUnit test attributes ([Fact], [Theory], [InlineData], etc.) with their TUnit equivalents.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateXUnitAssertions
- Migrate xUnit assertions to TUnit
- Replace xUnit
Assert.*calls with TUnit's fluentawait Assert.That(...).Is*()assertions. Note: test methods may need to be changed toasync Taskseparately.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateXUnitDependencies
- Migrate xUnit NuGet dependencies to TUnit
- Remove xUnit NuGet package references, add TUnit, and upgrade the target framework to at least .NET 9.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TestOutputHelperToTestContext
- Find
ITestOutputHelperneeding TUnit migration - Find usages of xUnit's
ITestOutputHelperthat should be replaced with TUnit'sTestContext.
- Find
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TheoryToTest
- Replace
[Theory]with[Test] - Replace the xUnit
[Theory]attribute with the TUnit[Test]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TraitCategoryToCategory
- Replace
[Trait("Category", ...)]with[Category] - Replace xUnit
[Trait("Category", "X")]with TUnit's dedicated[Category("X")]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TraitToProperty
- Replace
[Trait]with[Property] - Replace the xUnit
[Trait]attribute with the TUnit[Property]attribute.
- Replace
- io.moderne.java.spring.boot4.MigrateMockMvcToAssertJ
- Migrate MockMvc to AssertJ assertions
- Migrates Spring MockMvc tests from Hamcrest-style
andExpect()assertions to AssertJ-style fluent assertions. ChangesMockMvctoMockMvcTesterand converts assertion chains.
- org.openrewrite.cucumber.jvm.CucumberJava8ToJava
- Migrate
cucumber-java8tocucumber-java - Migrates
cucumber-java8step definitions andLambdaGluehooks tocucumber-javaannotated methods.
- Migrate
- org.openrewrite.cucumber.jvm.CucumberToJunitPlatformSuite
- Cucumber to JUnit test
@Suite - Migrates Cucumber tests to JUnit test
@Suite.
- Cucumber to JUnit test
- org.openrewrite.cucumber.jvm.UpgradeCucumber2x
- Upgrade to Cucumber-JVM 2.x
- Upgrade to Cucumber-JVM 2.x from any previous version.
- org.openrewrite.cucumber.jvm.UpgradeCucumber5x
- Upgrade to Cucumber-JVM 5.x
- Upgrade to Cucumber-JVM 5.x from any previous version.
- org.openrewrite.cucumber.jvm.UpgradeCucumber7x
- Upgrade to Cucumber-JVM 7.x
- Upgrade to Cucumber-JVM 7.x from any previous version.
- org.openrewrite.java.testing.arquillian.ArquillianJUnit4ToArquillianJUnit5
- Use Arquillian JUnit 5 Extension
- Migrates Arquillian JUnit 4 to JUnit 5.
- org.openrewrite.java.testing.assertj.Assertj
- AssertJ best practices
- Migrates JUnit asserts to AssertJ and applies best practices to assertions.
- org.openrewrite.java.testing.assertj.FestToAssertj
- Migrate Fest 2.x to AssertJ
- AssertJ provides a rich set of assertions, truly helpful error messages, improves test code readability. Converts Fest 2.x imports to AssertJ imports.
- org.openrewrite.java.testing.assertj.JUnitToAssertj
- Migrate JUnit asserts to AssertJ
- AssertJ provides a rich set of assertions, truly helpful error messages, improves test code readability. Converts assertions from
org.junit.jupiter.api.Assertionstoorg.assertj.core.api.Assertions. Will convert JUnit 4 to JUnit Jupiter if necessary to match and modify assertions.
- org.openrewrite.java.testing.assertj.SimplifyAssertJAssertions
- Shorten AssertJ assertions
- Replace AssertJ assertions where a dedicated assertion is available for the same actual value.
- org.openrewrite.java.testing.assertj.SimplifyChainedAssertJAssertions
- Simplify AssertJ chained assertions
- Replace AssertJ assertions where a method is called on the actual value with a dedicated assertion.
- org.openrewrite.java.testing.assertj.StaticImports
- Statically import AssertJ's
assertThat - Consistently use a static import rather than inlining the
Assertionsclass name in tests.
- Statically import AssertJ's
- org.openrewrite.java.testing.byteman.BytemanJUnit4ToBytemanJUnit5
- Use Byteman JUnit 5 dependency
- Migrates Byteman JUnit 4 to JUnit 5.
- org.openrewrite.java.testing.cleanup.BestPractices
- Testing best practices
- Applies best practices to tests.
- org.openrewrite.java.testing.dbrider.MigrateDbRiderSpringToDbRiderJUnit5
- Migrate rider-spring (JUnit4) to rider-junit5 (JUnit5)
- This recipe will migrate the necessary dependencies and annotations from DbRider with JUnit4 to JUnit5 in a Spring application.
- org.openrewrite.java.testing.easymock.EasyMockToMockito
- Migrate from EasyMock to Mockito
- This recipe will apply changes commonly needed when migrating from EasyMock to Mockito.
- org.openrewrite.java.testing.hamcrest.AddHamcrestIfUsed
- Add
org.hamcrest:hamcrestif it is used - JUnit Jupiter does not include hamcrest as a transitive dependency. If needed, add a direct dependency.
- Add
- org.openrewrite.java.testing.hamcrest.ConsistentHamcrestMatcherImports
- Use consistent Hamcrest matcher imports
- Use consistent imports for Hamcrest matchers, and remove wrapping
is(Matcher)calls ahead of further changes.
- org.openrewrite.java.testing.hamcrest.MigrateHamcrestToAssertJ
- Migrate Hamcrest assertions to AssertJ
- Migrate Hamcrest
assertThat(..)to AssertJAssertions.
- org.openrewrite.java.testing.hamcrest.MigrateHamcrestToJUnit5
- Migrate Hamcrest assertions to JUnit Jupiter
- Migrate Hamcrest
assertThat(..)to JUnit JupiterAssertions.
- org.openrewrite.java.testing.jmockit.JMockitToMockito
- Migrate from JMockit to Mockito
- This recipe will apply changes commonly needed when migrating from JMockit to Mockito.
- org.openrewrite.java.testing.junit.JUnit6BestPractices
- JUnit 6 best practices
- Applies best practices to tests.
- org.openrewrite.java.testing.junit.JupiterBestPractices
- JUnit Jupiter best practices
- Applies best practices to tests.
- org.openrewrite.java.testing.junit5.CleanupAssertions
- Clean Up Assertions
- Simplifies JUnit Jupiter assertions to their most-direct equivalents.
- org.openrewrite.java.testing.junit5.IgnoreToDisabled
- Use JUnit Jupiter
@Disabled - Migrates JUnit 4.x
@Ignoreto JUnit Jupiter@Disabled.
- Use JUnit Jupiter
- org.openrewrite.java.testing.junit5.JUnit4to5Migration
- JUnit Jupiter migration from JUnit 4.x
- Migrates JUnit 4.x tests to JUnit Jupiter.
- org.openrewrite.java.testing.junit5.JUnit5BestPractices
- JUnit 5 best practices
- Applies best practices to tests.
- org.openrewrite.java.testing.junit5.MigrateAssertionFailedError
- Migrate JUnit 4 assertion failure exceptions to JUnit Jupiter
- Replace JUnit 4's
junit.framework.AssertionFailedErrorandorg.junit.ComparisonFailurewith JUnit Jupiter'sorg.opentest4j.AssertionFailedError.
- org.openrewrite.java.testing.junit5.MigrateAssumptions
- Use
Assertions#assume*(..)and Hamcrest'sMatcherAssume#assume*(..) - Many of JUnit 4's
Assume#assume(..)methods have no direct counterpart in JUnit 5 and require Hamcrest JUnit'sMatcherAssume.
- Use
- org.openrewrite.java.testing.junit5.StaticImports
- Statically import JUnit Jupiter assertions
- Always use a static import for assertion methods.
- org.openrewrite.java.testing.junit5.ThrowingRunnableToExecutable
- Use JUnit Jupiter
Executable - Migrates JUnit 4.x
ThrowingRunnableto JUnit JupiterExecutable.
- Use JUnit Jupiter
- org.openrewrite.java.testing.junit5.UpgradeOkHttpMockWebServer
- Use OkHttp 3 MockWebServer for JUnit 5
- Migrates OkHttp 3
MockWebServerto enable JUnit Jupiter Extension support.
- org.openrewrite.java.testing.junit5.UpgradeToJUnit513
- Upgrade to JUnit 5.13
- Upgrades JUnit 5 to 5.13.x and migrates all deprecated APIs.
- org.openrewrite.java.testing.junit5.UpgradeToJUnit514
- Upgrade to JUnit 5.14
- Upgrades JUnit 5 to 5.14.x and migrates all deprecated APIs.
- org.openrewrite.java.testing.junit5.UseHamcrestAssertThat
- Use
MatcherAssert#assertThat(..) - JUnit 4's
Assert#assertThat(..)This method was deprecated in JUnit 4 and removed in JUnit Jupiter.
- Use
- org.openrewrite.java.testing.junit5.UseMockitoExtension
- Use Mockito JUnit Jupiter extension
- Migrate uses of
@RunWith(MockitoJUnitRunner.class)(and similar annotations) to@ExtendWith(MockitoExtension.class).
- org.openrewrite.java.testing.junit5.UseXMLUnitLegacy
- Use XMLUnit Legacy for JUnit 5
- Migrates XMLUnit 1.x to XMLUnit legacy 2.x.
- org.openrewrite.java.testing.junit5.VertxUnitToVertxJunit5
- Use Vert.x JUnit 5 Extension
- Migrates Vert.x
@RunWithVertxUnitRunnerto the JUnit Jupiter@ExtendWithVertxExtension.
- org.openrewrite.java.testing.junit6.JUnit5to6Migration
- JUnit 6 migration from JUnit 5.x
- Migrates JUnit 5.x tests to JUnit 6.x.
- org.openrewrite.java.testing.mockito.Mockito1to3Migration
- Mockito 3.x migration from 1.x
- Upgrade Mockito from 1.x to 3.x.
- org.openrewrite.java.testing.mockito.Mockito1to4Migration
- Mockito 4.x upgrade
- Upgrade Mockito from 1.x to 4.x.
- org.openrewrite.java.testing.mockito.Mockito1to5Migration
- Mockito 5.x upgrade
- Upgrade Mockito from 1.x to 5.x.
- org.openrewrite.java.testing.mockito.Mockito4to5Only
- Mockito 4 to 5.x upgrade only
- Upgrade Mockito from 4.x to 5.x. Does not include 1.x to 4.x migration.
- org.openrewrite.java.testing.mockito.MockitoBestPractices
- Mockito best practices
- Applies best practices for Mockito tests.
- org.openrewrite.java.testing.mockito.ReplacePowerMockito
- Replace PowerMock with raw Mockito
- PowerMockito with raw Mockito; best executed as part of a Mockito upgrade.
- org.openrewrite.java.testing.testng.TestNgToAssertj
- Migrate TestNG assertions to AssertJ
- Convert assertions from
org.testng.Asserttoorg.assertj.core.api.Assertions.
- org.openrewrite.java.testing.truth.MigrateTruthToAssertJ
- Migrate Google Truth to AssertJ
- Migrate Google Truth assertions to AssertJ assertions.
- org.openrewrite.quarkus.spring.MigrateSpringTesting
- Migrate Spring Boot Testing to Quarkus Testing
- Migrates Spring Boot test annotations and utilities to Quarkus test equivalents. Converts @SpringBootTest to @QuarkusTest, @MockBean to @InjectMock, etc.
testng
1 recipe
- org.openrewrite.java.testing.testng.TestNgToAssertj
- Migrate TestNG assertions to AssertJ
- Convert assertions from
org.testng.Asserttoorg.assertj.core.api.Assertions.
testwebxml
1 recipe
- com.oracle.weblogic.rewrite.jakarta.JavaxTestWebXmlToJakartaTestWebXml5
- Migrate xmlns entries in
test-web.xmlfiles for Jakarta Server Faces 3 using test interfaces - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation for test interfaces like arquillian.
- Migrate xmlns entries in
threading
11 recipes
- OpenRewrite.Recipes.Net6.FindThreadAbort
- Find
Thread.Abortusage (SYSLIB0006) - Finds calls to
Thread.Abort()which throwsPlatformNotSupportedExceptionin .NET 6+ (SYSLIB0006). UseCancellationTokenfor cooperative cancellation instead.
- Find
- OpenRewrite.Recipes.Net9.UseVolatileReadWrite
- Use Volatile.Read/Write (SYSLIB0054)
- Replace
Thread.VolatileReadandThread.VolatileWritewithVolatile.ReadandVolatile.Write. The Thread methods are obsolete in .NET 9 (SYSLIB0054).
- org.openrewrite.python.migrate.ReplaceConditionNotifyAll
- Replace
Condition.notifyAll()withCondition.notify_all() - Replace
notifyAll()method calls withnotify_all(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceEventIsSet
- Replace
Event.isSet()withEvent.is_set() - Replace
isSet()method calls withis_set(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadGetName
- Replace
Thread.getName()withThread.name - Replace
getName()method calls with thenameproperty. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadIsAlive
- Replace
Thread.isAlive()withThread.is_alive() - Replace
isAlive()method calls withis_alive(). Deprecated in Python 3.1 and removed in 3.9.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadIsDaemon
- Replace
Thread.isDaemon()withThread.daemon - Replace
isDaemon()method calls with thedaemonproperty. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadSetDaemon
- Replace
Thread.setDaemon()withThread.daemon = ... - Replace
setDaemon()method calls withdaemonproperty assignment. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadSetName
- Replace
Thread.setName()withThread.name = ... - Replace
setName()method calls withnameproperty assignment. Deprecated in Python 3.10, removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadingActiveCount
- Replace
threading.activeCount()withthreading.active_count() - Replace
threading.activeCount()withthreading.active_count(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
- org.openrewrite.python.migrate.ReplaceThreadingCurrentThread
- Replace
threading.currentThread()withthreading.current_thread() - Replace
threading.currentThread()withthreading.current_thread(). The camelCase version was deprecated in Python 3.10 and removed in 3.12.
- Replace
thymeleaf
1 recipe
- org.openrewrite.java.spring.boot3.MigrateThymeleafDependencies
- Migrate thymeleaf dependencies to Spring Boot 3.x
- Migrate thymeleaf dependencies to the new artifactId, since these are changed with Spring Boot 3.
tld
1 recipe
- com.oracle.weblogic.rewrite.jakarta.JavaxWebJspTagLibraryTldsToJakarta9WebJspTagLibraryTlds
- Migrate xmlns entries in
*.tldfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
tls
1 recipe
- OpenRewrite.Recipes.Net10.FindSslAuthEnumTypes
- Find obsolete SSL authentication enum types
- Finds usage of
ExchangeAlgorithmType,CipherAlgorithmType, andHashAlgorithmTypefromSystem.Security.Authentication. These enum types are obsolete in .NET 10 (SYSLIB0058). UseSslStream.NegotiatedCipherSuiteinstead.
tracing
1 recipe
- org.openrewrite.java.spring.cloud2022.MigrateCloudSleuthToMicrometerTracing
- Migrate Spring Cloud Sleuth 3.1 to Micrometer Tracing 1.0
- Spring Cloud Sleuth has been discontinued and only compatible with Spring Boot 2.x.
transaction
3 recipes
- io.quarkus.updates.core.quarkus30.JavaxTransactionMigrationToJakartaTransaction
- Migrate deprecated
javax.transactionpackages tojakarta.transaction - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxTransactionMigrationToJakartaTransaction
- Migrate deprecated
javax.transactionpackages tojakarta.transaction - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.quarkus.spring.MigrateSpringTransactional
- Migrate Spring @Transactional to Jakarta @Transactional
- Migrates Spring's @Transactional annotation to Jakarta's @Transactional. Maps propagation attributes to TxType and removes Spring-specific attributes.
truth
1 recipe
- org.openrewrite.java.testing.truth.MigrateTruthToAssertJ
- Migrate Google Truth to AssertJ
- Migrate Google Truth assertions to AssertJ assertions.
tunit
19 recipes
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.AsyncLifetimeToBeforeAfterTest
- Find
IAsyncLifetimeneeding TUnit migration - Find classes implementing
IAsyncLifetimethat should use[Before(Test)]and[After(Test)]for TUnit.
- Find
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.ChangeXUnitUsings
- Change xUnit using directives to TUnit
- Replace
using Xunit;withusing TUnit.Core;andusing TUnit.Assertions;, and removeusing Xunit.Abstractions;andusing Xunit.Sdk;.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.ClassFixtureToClassDataSource
- Find
IClassFixture<T>needing TUnit migration - Find classes implementing
IClassFixture<T>that should use[ClassDataSource<T>]for TUnit.
- Find
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.CollectionToNotInParallel
- Replace
[Collection]with[NotInParallel] - Replace the xUnit
[Collection("name")]attribute with the TUnit[NotInParallel("name")]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.ConstructorToBeforeTest
- Find test constructors needing
[Before(Test)] - Find constructors in test classes that should be converted to
[Before(Test)]methods for TUnit.
- Find test constructors needing
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.DisposableToAfterTest
- Replace
IDisposablewith[After(Test)] - Remove
IDisposablefrom the base type list and add[After(Test)]to theDispose()method.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.FactSkipToSkipAttribute
- Extract
Skipinto[Skip]attribute - Extract the
Skipargument from[Fact(Skip = "...")]or[Theory(Skip = "...")]into a separate TUnit[Skip("...")]attribute.
- Extract
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.FactTimeoutToTimeoutAttribute
- Extract
Timeoutinto[Timeout]attribute - Extract the
Timeoutargument from[Fact(Timeout = ...)]or[Theory(Timeout = ...)]into a separate TUnit[Timeout(...)]attribute.
- Extract
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.FactToTest
- Replace
[Fact]with[Test] - Replace the xUnit
[Fact]attribute with the TUnit[Test]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.InlineDataToArguments
- Replace
[InlineData]with[Arguments] - Replace the xUnit
[InlineData]attribute with the TUnit[Arguments]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MemberDataToMethodDataSource
- Replace
[MemberData]with[MethodDataSource] - Replace the xUnit
[MemberData]attribute with the TUnit[MethodDataSource]attribute. Fields and properties referenced by MemberData are converted to methods.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateFromXUnit
- Migrate from xUnit to TUnit
- Migrate xUnit test attributes, assertions, and lifecycle patterns to their TUnit equivalents.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateFromXUnitAttributes
- Migrate xUnit attributes to TUnit
- Replace xUnit test attributes ([Fact], [Theory], [InlineData], etc.) with their TUnit equivalents.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateXUnitAssertions
- Migrate xUnit assertions to TUnit
- Replace xUnit
Assert.*calls with TUnit's fluentawait Assert.That(...).Is*()assertions. Note: test methods may need to be changed toasync Taskseparately.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateXUnitDependencies
- Migrate xUnit NuGet dependencies to TUnit
- Remove xUnit NuGet package references, add TUnit, and upgrade the target framework to at least .NET 9.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TestOutputHelperToTestContext
- Find
ITestOutputHelperneeding TUnit migration - Find usages of xUnit's
ITestOutputHelperthat should be replaced with TUnit'sTestContext.
- Find
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TheoryToTest
- Replace
[Theory]with[Test] - Replace the xUnit
[Theory]attribute with the TUnit[Test]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TraitCategoryToCategory
- Replace
[Trait("Category", ...)]with[Category] - Replace xUnit
[Trait("Category", "X")]with TUnit's dedicated[Category("X")]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TraitToProperty
- Replace
[Trait]with[Property] - Replace the xUnit
[Trait]attribute with the TUnit[Property]attribute.
- Replace
typescript
1 recipe
- org.openrewrite.javascript.cleanup.async-callback-in-sync-array-method
- Detect async callbacks in synchronous array methods
- Detects async callbacks passed to array methods like .some(), .every(), .filter() which don't await promises. This is a common bug where Promise objects are always truthy.
typing
2 recipes
- org.openrewrite.python.migrate.ReplaceTypingOptionalWithUnion
- Replace
typing.Optional[X]withX | None - PEP 604 introduced the
|operator for union types in Python 3.10. ReplaceOptional[X]with the more conciseX | Nonesyntax.
- Replace
- org.openrewrite.python.migrate.ReplaceTypingUnionWithPipe
- Replace
typing.Union[X, Y]withX | Y - PEP 604 introduced the
|operator for union types in Python 3.10. ReplaceUnion[X, Y, ...]with the more conciseX | Y | ...syntax.
- Replace
unaffected
1 recipe
- com.oracle.weblogic.rewrite.jakarta.MitigateUnaffectedNonEEJakarta9Packages
- Mitigate Unaffected Non-EE Jakarta 9 Packages
- Mitigate Unaffected Non-EE Jakarta 9 Packages. Reference: https://github.com/jakartaee/platform/blob/main/namespace/unaffected-packages.adoc
underscore
4 recipes
- org.openrewrite.codemods.migrate.lodash.LodashUnderscoreArray
- Replace lodash and underscore array functions with native JavaScript
-
_.head(x)->x[0]-_.head(x, n)->x.slice(n)-_.first(alias for_.head) -_.tail(x)->x.slice(1)-_.tail(x, n)->x.slice(n)-_.rest(alias for_.tail) -_.last(x)->x[x.length - 1]-_.last(x, n)->x.slice(x.length - n).
- org.openrewrite.codemods.migrate.lodash.LodashUnderscoreFunction
- Replace lodash and underscore function functions with native JavaScript
-
_.bind(fn, obj, ...x)->fn.bind(obj, ...x)-_.partial(fn, a, b);->(...args) => fn(a, b, ...args).
- org.openrewrite.codemods.migrate.lodash.LodashUnderscoreObjects
- Replace lodash and underscore object functions with native JavaScript
-
_.clone(x)->\{ ...x \}-_.extend(\{\}, x, y)->\{ ...x, ...y \}-_.extend(obj, x, y)->Object.assign(obj, x, y)-_.keys(x)->Object.keys(x)-_.pairs(x)->Object.entries(x)-_.values(x)->Object.values(x).
- org.openrewrite.codemods.migrate.lodash.LodashUnderscoreUtil
- Replace lodash and underscore utility functions with native JavaScript
-
_.isArray(x)->Array.isArray(x)-_.isBoolean(x)->typeof(x) === 'boolean'-_.isFinite(x)->Number.isFinite(x)-_.isFunction(x)->typeof(x) === 'function'-_.isNull(x)->x === null-_.isString(x)->typeof(x) === 'string'-_.isUndefined(x)->typeof(x) === 'undefined'.
urllib
2 recipes
- org.openrewrite.python.migrate.FindUrllibParseSplitFunctions
- Find deprecated urllib.parse split functions
- Find usage of deprecated urllib.parse split functions (splithost, splitport, etc.) removed in Python 3.14. Use urlparse() instead.
- org.openrewrite.python.migrate.FindUrllibParseToBytes
- Find deprecated
urllib.parse.to_bytes()usage - Find usage of
urllib.parse.to_bytes()which was deprecated in Python 3.8 and removed in 3.14. Use str.encode() directly.
- Find deprecated
validation
5 recipes
- com.oracle.weblogic.rewrite.jakarta.JavaxValidationMappingXmlsToJakarta9ValidationMappingXmls
- Migrate xmlns entries in
**/validation/*.xmlfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Tags: validation-mapping
- Migrate xmlns entries in
- io.quarkus.updates.core.quarkus30.JavaxValidationMigrationToJakartaValidation
- Migrate deprecated
javax.validationpackages tojakarta.validation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.java.migrate.jakarta.JavaxValidationMigrationToJakartaValidation
- Migrate deprecated
javax.validationpackages tojakarta.validation - Java EE has been rebranded to Jakarta EE, necessitating a package relocation.
- Migrate deprecated
- org.openrewrite.quarkus.spring.MigrateSpringValidation
- Migrate Spring Validation to Quarkus
- Migrates Spring Boot validation to Quarkus Hibernate Validator. Adds the quarkus-hibernate-validator dependency and handles validation annotation imports.
- org.openrewrite.quarkus.spring.SpringBootValidationToQuarkus
- Replace Spring Boot Validation with Quarkus Hibernate Validator
- Migrates
spring-boot-starter-validationtoquarkus-hibernate-validator.
var
1 recipe
- org.openrewrite.java.migrate.lang.UseVar
- Use local variable type inference
- Apply local variable type inference (
var) for primitives and objects. These recipes can cause unused imports, be advised to run `org.openrewrite.java.RemoveUnusedImports afterwards.
version
1 recipe
- org.openrewrite.quarkus.spring.CustomizeQuarkusVersion
- Customize Quarkus BOM Version
- Allows customization of the Quarkus BOM version used in the migration. By default uses 3.x (latest 3.x version), but can be configured to use a specific version.
virtual
2 recipes
- org.openrewrite.java.migrate.lang.FindNonVirtualExecutors
- Find non-virtual
ExecutorServicecreation - Find all places where static
java.util.concurrent.Executorsmethod creates a non-virtualjava.util.concurrent.ExecutorService. This recipe can be used to search froExecutorServicethat can be replaced by Virtual Thread executor. - Tags: virtual_threads
- Find non-virtual
- org.openrewrite.java.migrate.lang.FindVirtualThreadOpportunities
- Find Virtual Thread opportunities
- Find opportunities to convert existing code to use Virtual Threads.
- Tags: virtual_threads
vue
57 recipes
- org.openrewrite.codemods.cleanup.vue.ArrayBracketNewline
- Enforce linebreaks after opening and before closing array brackets in
<template> - Enforce linebreaks after opening and before closing array brackets in
<template>See rule details for vue/array-bracket-newline.
- Enforce linebreaks after opening and before closing array brackets in
- org.openrewrite.codemods.cleanup.vue.ArrayBracketSpacing
- Enforce consistent spacing inside array brackets in
<template> - Enforce consistent spacing inside array brackets in
<template>See rule details for vue/array-bracket-spacing.
- Enforce consistent spacing inside array brackets in
- org.openrewrite.codemods.cleanup.vue.ArrayElementNewline
- Enforce line breaks after each array element in
<template> - Enforce line breaks after each array element in
<template>See rule details for vue/array-element-newline.
- Enforce line breaks after each array element in
- org.openrewrite.codemods.cleanup.vue.ArrowSpacing
- Enforce consistent spacing before and after the arrow in arrow functions in
<template> - Enforce consistent spacing before and after the arrow in arrow functions in
<template>See rule details for vue/arrow-spacing.
- Enforce consistent spacing before and after the arrow in arrow functions in
- org.openrewrite.codemods.cleanup.vue.AttributesOrder
- Enforce order of attributes
- Enforce order of attributes See rule details for vue/attributes-order.
- org.openrewrite.codemods.cleanup.vue.BlockOrder
- Enforce order of component top-level elements
- Enforce order of component top-level elements See rule details for vue/block-order.
- org.openrewrite.codemods.cleanup.vue.BlockSpacing
- Disallow or enforce spaces inside of blocks after opening block and before closing block in
<template> - Disallow or enforce spaces inside of blocks after opening block and before closing block in
<template>See rule details for vue/block-spacing.
- Disallow or enforce spaces inside of blocks after opening block and before closing block in
- org.openrewrite.codemods.cleanup.vue.BlockTagNewline
- Enforce line breaks after opening and before closing block-level tags
- Enforce line breaks after opening and before closing block-level tags See rule details for vue/block-tag-newline.
- org.openrewrite.codemods.cleanup.vue.BraceStyle
- Enforce consistent brace style for blocks in
<template> - Enforce consistent brace style for blocks in
<template>See rule details for vue/brace-style.
- Enforce consistent brace style for blocks in
- org.openrewrite.codemods.cleanup.vue.CommaDangle
- Require or disallow trailing commas in
<template> - Require or disallow trailing commas in
<template>See rule details for vue/comma-dangle.
- Require or disallow trailing commas in
- org.openrewrite.codemods.cleanup.vue.CommaSpacing
- Enforce consistent spacing before and after commas in
<template> - Enforce consistent spacing before and after commas in
<template>See rule details for vue/comma-spacing.
- Enforce consistent spacing before and after commas in
- org.openrewrite.codemods.cleanup.vue.CommaStyle
- Enforce consistent comma style in
<template> - Enforce consistent comma style in
<template>See rule details for vue/comma-style.
- Enforce consistent comma style in
- org.openrewrite.codemods.cleanup.vue.ComponentNameInTemplateCasing
- Enforce specific casing for the component naming style in template
- Enforce specific casing for the component naming style in template See rule details for vue/component-name-in-template-casing.
- org.openrewrite.codemods.cleanup.vue.ComponentOptionsNameCasing
- Enforce the casing of component name in components options
- Enforce the casing of component name in components options See rule details for vue/component-options-name-casing.
- org.openrewrite.codemods.cleanup.vue.ComponentTagsOrder
- Enforce order of component top-level elements
- Enforce order of component top-level elements See rule details for vue/component-tags-order.
- org.openrewrite.codemods.cleanup.vue.DefineMacrosOrder
- Enforce order of defineEmits and defineProps compiler macros
- Enforce order of defineEmits and defineProps compiler macros See rule details for vue/define-macros-order.
- org.openrewrite.codemods.cleanup.vue.DotLocation
- Enforce consistent newlines before and after dots in
<template> - Enforce consistent newlines before and after dots in
<template>See rule details for vue/dot-location.
- Enforce consistent newlines before and after dots in
- org.openrewrite.codemods.cleanup.vue.DotNotation
- Enforce dot notation whenever possible in
<template> - Enforce dot notation whenever possible in
<template>See rule details for vue/dot-notation.
- Enforce dot notation whenever possible in
- org.openrewrite.codemods.cleanup.vue.Eqeqeq
- Require the use of === and !== in
<template> - Require the use of === and !== in
<template>See rule details for vue/eqeqeq.
- Require the use of === and !== in
- org.openrewrite.codemods.cleanup.vue.FuncCallSpacing
- Require or disallow spacing between function identifiers and their invocations in
<template> - Require or disallow spacing between function identifiers and their invocations in
<template>See rule details for vue/func-call-spacing.
- Require or disallow spacing between function identifiers and their invocations in
- org.openrewrite.codemods.cleanup.vue.HtmlCommentContentNewline
- Enforce unified line brake in HTML comments
- Enforce unified line brake in HTML comments See rule details for vue/html-comment-content-newline.
- org.openrewrite.codemods.cleanup.vue.HtmlCommentContentSpacing
- Enforce unified spacing in HTML comments
- Enforce unified spacing in HTML comments See rule details for vue/html-comment-content-spacing.
- org.openrewrite.codemods.cleanup.vue.HtmlCommentIndent
- Enforce consistent indentation in HTML comments
- Enforce consistent indentation in HTML comments See rule details for vue/html-comment-indent.
- org.openrewrite.codemods.cleanup.vue.KeySpacing
- Enforce consistent spacing between keys and values in object literal properties in
<template> - Enforce consistent spacing between keys and values in object literal properties in
<template>See rule details for vue/key-spacing.
- Enforce consistent spacing between keys and values in object literal properties in
- org.openrewrite.codemods.cleanup.vue.KeywordSpacing
- Enforce consistent spacing before and after keywords in
<template> - Enforce consistent spacing before and after keywords in
<template>See rule details for vue/keyword-spacing.
- Enforce consistent spacing before and after keywords in
- org.openrewrite.codemods.cleanup.vue.MultilineTernary
- Enforce newlines between operands of ternary expressions in
<template> - Enforce newlines between operands of ternary expressions in
<template>See rule details for vue/multiline-ternary.
- Enforce newlines between operands of ternary expressions in
- org.openrewrite.codemods.cleanup.vue.NewLineBetweenMultiLineProperty
- Enforce new lines between multi-line properties in Vue components
- Enforce new lines between multi-line properties in Vue components See rule details for vue/new-line-between-multi-line-property.
- org.openrewrite.codemods.cleanup.vue.NextTickStyle
- Enforce Promise or callback style in nextTick
- Enforce Promise or callback style in nextTick See rule details for vue/next-tick-style.
- org.openrewrite.codemods.cleanup.vue.NoExtraParens
- Disallow unnecessary parentheses in
<template> - Disallow unnecessary parentheses in
<template>See rule details for vue/no-extra-parens.
- Disallow unnecessary parentheses in
- org.openrewrite.codemods.cleanup.vue.NoRequiredPropWithDefault
- Enforce props with default values to be optional
- Enforce props with default values to be optional See rule details for vue/no-required-prop-with-default.
- org.openrewrite.codemods.cleanup.vue.NoUnsupportedFeatures
- Disallow unsupported Vue.js syntax on the specified version
- Disallow unsupported Vue.js syntax on the specified version See rule details for vue/no-unsupported-features.
- org.openrewrite.codemods.cleanup.vue.NoUselessMustaches
- Disallow unnecessary mustache interpolations
- Disallow unnecessary mustache interpolations See rule details for vue/no-useless-mustaches.
- org.openrewrite.codemods.cleanup.vue.NoUselessVBind
- Disallow unnecessary v-bind directives
- Disallow unnecessary v-bind directives See rule details for vue/no-useless-v-bind.
- org.openrewrite.codemods.cleanup.vue.ObjectCurlyNewline
- Enforce consistent line breaks after opening and before closing braces in
<template> - Enforce consistent line breaks after opening and before closing braces in
<template>See rule details for vue/object-curly-newline.
- Enforce consistent line breaks after opening and before closing braces in
- org.openrewrite.codemods.cleanup.vue.ObjectCurlySpacing
- Enforce consistent spacing inside braces in
<template> - Enforce consistent spacing inside braces in
<template>See rule details for vue/object-curly-spacing.
- Enforce consistent spacing inside braces in
- org.openrewrite.codemods.cleanup.vue.ObjectPropertyNewline
- Enforce placing object properties on separate lines in
<template> - Enforce placing object properties on separate lines in
<template>See rule details for vue/object-property-newline.
- Enforce placing object properties on separate lines in
- org.openrewrite.codemods.cleanup.vue.ObjectShorthand
- Require or disallow method and property shorthand syntax for object literals in
<template> - Require or disallow method and property shorthand syntax for object literals in
<template>See rule details for vue/object-shorthand.
- Require or disallow method and property shorthand syntax for object literals in
- org.openrewrite.codemods.cleanup.vue.OperatorLinebreak
- Enforce consistent linebreak style for operators in
<template> - Enforce consistent linebreak style for operators in
<template>See rule details for vue/operator-linebreak.
- Enforce consistent linebreak style for operators in
- org.openrewrite.codemods.cleanup.vue.OrderInComponents
- Enforce order of properties in components
- Enforce order of properties in components See rule details for vue/order-in-components.
- org.openrewrite.codemods.cleanup.vue.PaddingLineBetweenBlocks
- Require or disallow padding lines between blocks
- Require or disallow padding lines between blocks See rule details for vue/padding-line-between-blocks.
- org.openrewrite.codemods.cleanup.vue.PaddingLineBetweenTags
- Require or disallow newlines between sibling tags in template
- Require or disallow newlines between sibling tags in template See rule details for vue/padding-line-between-tags.
- org.openrewrite.codemods.cleanup.vue.PaddingLinesInComponentDefinition
- Require or disallow padding lines in component definition
- Require or disallow padding lines in component definition See rule details for vue/padding-lines-in-component-definition.
- org.openrewrite.codemods.cleanup.vue.PreferDefineOptions
- Enforce use of defineOptions instead of default export
- Enforce use of defineOptions instead of default export. See rule details for vue/prefer-define-options.
- org.openrewrite.codemods.cleanup.vue.PreferSeparateStaticClass
- Require static class names in template to be in a separate class attribute
- Require static class names in template to be in a separate class attribute See rule details for vue/prefer-separate-static-class.
- org.openrewrite.codemods.cleanup.vue.PreferTemplate
- Require template literals instead of string concatenation in
<template> - Require template literals instead of string concatenation in
<template>See rule details for vue/prefer-template.
- Require template literals instead of string concatenation in
- org.openrewrite.codemods.cleanup.vue.QuoteProps
- Require quotes around object literal property names in
<template> - Require quotes around object literal property names in
<template>See rule details for vue/quote-props.
- Require quotes around object literal property names in
- org.openrewrite.codemods.cleanup.vue.RecommendedVueCodeCleanup
- Recommended vue code cleanup
- Collection of cleanup ESLint rules from eslint-plugin-vue.
- org.openrewrite.codemods.cleanup.vue.ScriptIndent
- Enforce consistent indentation in
<script> - Enforce consistent indentation in
<script>See rule details for vue/script-indent.
- Enforce consistent indentation in
- org.openrewrite.codemods.cleanup.vue.SpaceInParens
- Enforce consistent spacing inside parentheses in
<template> - Enforce consistent spacing inside parentheses in
<template>See rule details for vue/space-in-parens.
- Enforce consistent spacing inside parentheses in
- org.openrewrite.codemods.cleanup.vue.SpaceInfixOps
- Require spacing around infix operators in
<template> - Require spacing around infix operators in
<template>See rule details for vue/space-infix-ops.
- Require spacing around infix operators in
- org.openrewrite.codemods.cleanup.vue.SpaceUnaryOps
- Enforce consistent spacing before or after unary operators in
<template> - Enforce consistent spacing before or after unary operators in
<template>See rule details for vue/space-unary-ops.
- Enforce consistent spacing before or after unary operators in
- org.openrewrite.codemods.cleanup.vue.StaticClassNamesOrder
- Enforce static class names order
- Enforce static class names order See rule details for vue/static-class-names-order.
- org.openrewrite.codemods.cleanup.vue.TemplateCurlySpacing
- Require or disallow spacing around embedded expressions of template strings in
<template> - Require or disallow spacing around embedded expressions of template strings in
<template>See rule details for vue/template-curly-spacing.
- Require or disallow spacing around embedded expressions of template strings in
- org.openrewrite.codemods.cleanup.vue.ThisInTemplate
- Disallow usage of this in template
- Disallow usage of this in template See rule details for vue/this-in-template.
- org.openrewrite.codemods.cleanup.vue.VForDelimiterStyle
- Enforce v-for directive's delimiter style
- Enforce v-for directive's delimiter style See rule details for vue/v-for-delimiter-style.
- org.openrewrite.codemods.cleanup.vue.VIfElseKey
- Require key attribute for conditionally rendered repeated components
- Require key attribute for conditionally rendered repeated components See rule details for vue/v-if-else-key.
- org.openrewrite.codemods.cleanup.vue.VOnHandlerStyle
- Enforce writing style for handlers in v-on directives
- Enforce writing style for handlers in v-on directives See rule details for vue/v-on-handler-style.
web
10 recipes
- com.oracle.weblogic.rewrite.WebLogicXmlCreateIfNotExists1511
- Create
weblogic.xmlif it does not exist - This recipe will create a
weblogic.xmlfile with the WebLogic 15.1.1 namespace if it does not already exist. - Tags: web-app
- Create
- com.oracle.weblogic.rewrite.WebLogicXmlPreferApplicationPackagesJPA
- Add
prefer-application-packagesfor JPA inweblogic.xml - This recipe will add a
prefer-application-packagesentry for Jakarta Persistence inweblogic.xmlif it does not already exist. - Tags: web-app
- Add
- com.oracle.weblogic.rewrite.WebLogicXmlPreferApplicationPackagesSlf4j
- Add
prefer-application-packagesfor SLF4J inweblogic.xml - This recipe will add a
prefer-application-packagesentry for SLF4J inweblogic.xmlif it does not already exist. - Tags: web-app
- Add
- com.oracle.weblogic.rewrite.WebLogicXmlWebAppNamespace1412
- Migrate xmlns entries in
weblogic.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic schema files to WebLogic 14.1.2
- Tags: web-app
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicXmlWebAppNamespace1511
- Migrate xmlns entries in
weblogic.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic.xmlfiles to WebLogic 15.1.1 - Tags: web-app
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxWebFragmentXmlToJakartaWebFragmentXml5
- Migrate xmlns entries in
web-fragment.xmlfiles for Jakarta Server Faces 3 - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Tags: web-fragment
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.MigrateJavaxWebToJakartaWeb9
- Migrate javax.javaee-web-api to jakarta.jakartaee-web-api (Jakarta EE 9)
- Update Java EE Web API dependency to Jakarta EE Web Profile API 9.1
- Tags: web-api
- org.openrewrite.quarkus.spring.MigrateRequestParameterEdgeCases
- Migrate Additional Spring Web Parameter Annotations
- Migrates additional Spring Web parameter annotations not covered by the main WebToJaxRs recipe. Includes @MatrixVariable, @CookieValue, and other edge cases.
- org.openrewrite.quarkus.spring.SpringBootWebToQuarkusClassic
- Replace Spring Boot Web with Quarkus RESTEasy Classic
- Migrates
spring-boot-starter-webtoquarkus-resteasy-jacksonwhen no reactor dependencies are present.
- org.openrewrite.quarkus.spring.SpringBootWebToQuarkusReactive
- Replace Spring Boot Web with Quarkus REST
- Migrates
spring-boot-starter-webtoquarkus-rest-jacksonwhen reactor dependencies are present.
webflux
1 recipe
- org.openrewrite.quarkus.spring.SpringBootWebFluxToQuarkusReactive
- Replace Spring Boot WebFlux with Quarkus REST Client
- Migrates
spring-boot-starter-webfluxtoquarkus-rest-client-jacksonwhen reactor dependencies are present.
weblogic
56 recipes
- com.oracle.weblogic.rewrite.ChangeJAXBBindAPIDependencyScope
- Change the jakarta.xml.bind-api dependency to scope provided when jakartaee-api 9.x is provided.
- This recipe will change the jakarta.xml.bind-api dependency scope to provided when jakarta.jakartaee-api version 9.x is provided in WebLogic 15.1.1. This prevents the jakarta.xml.bind-api jar from being deployed to WebLogic which can cause class conflicts.
- com.oracle.weblogic.rewrite.ChangeJakartaInjectAPIDependencyScope
- Change the jakarta.inject-api dependency to scope provided when jakartaee-api 9.x is provided.
- This recipe will change the jakarta.inject-api dependency scope to provided when jakarta.jakartaee-api version 9.x is provided in WebLogic 15.1.1. This prevents the jakarta.inject-api jar from being deployed to WebLogic which can cause class conflicts.
- com.oracle.weblogic.rewrite.ChangeJakartaWebServiceRSAPIDependencyScope
- Change the jakarta.ws.rs-api dependency to scope provided when jakartaee-api 9.x is provided.
- This recipe will change the jakarta.ws.rs-api dependency scope to provided when jakarta.jakartaee-api version 9.x is provided in WebLogic 15.1.1. This prevents the jakarta.ws.rs-api jar from being deployed to WebLogic which can cause class conflicts.
- com.oracle.weblogic.rewrite.JakartaEE9_1
- Migrate to Jakarta EE 9.1
- These recipes help with Migration to Jakarta EE 9.1, flagging and updating deprecated methods.
- com.oracle.weblogic.rewrite.MigrateWebLogicSchemasTo1412
- Migrate WebLogic Schemas to 14.1.2
- This recipe will migrate WebLogic schemas to 14.1.2
- com.oracle.weblogic.rewrite.MigrateWebLogicSchemasTo1511
- Migrate WebLogic Schemas to 15.1.1
- This recipe will migrate WebLogic schemas to 15.1.1
- com.oracle.weblogic.rewrite.UpgradeTo1411
- Migrate to WebLogic 14.1.1
- This recipe will apply changes required for migrating to WebLogic 14.1.1
- com.oracle.weblogic.rewrite.UpgradeTo1412
- Migrate to WebLogic 14.1.2
- This recipe will apply changes required for migrating to WebLogic 14.1.2
- com.oracle.weblogic.rewrite.UpgradeTo1511
- Migrate to WebLogic 15.1.1
- This recipe will apply changes required for migrating to WebLogic 15.1.1 and Jakarta EE 9.1
- com.oracle.weblogic.rewrite.WebLogic1412JavaXmlBindMitigation
- Mitigation of Java XML Bind Deprecation in Java 11 vs WebLogic 14.1.2
- This recipe will mitigate the Javax XML Bind deprecation in Java 11 vs WebLogic 14.1.2
- com.oracle.weblogic.rewrite.WebLogicApplicationClientXmlNamespace1412
- Migrate xmlns entries in
application-client.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Application Client schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicApplicationClientXmlNamespace1511
- Migrate xmlns entries in
application-client.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inapplication-client.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicApplicationXmlNamespace1412
- Migrate xmlns entries in
weblogic-application.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Application schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicApplicationXmlNamespace1511
- Migrate xmlns entries in
weblogic-application.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-application.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicEjbJar32XmlNamespace1412
- Migrate xmlns entries in
weblogic-ejb-jar.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic EJB 3.2 schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicEjbJar32XmlNamespace1511
- Migrate xmlns entries in
weblogic-ejb-jar.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-ejb-jar.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicJdbcXmlNamespace1412
- Migrate xmlns entries in
*-jdbc.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic JDBC schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicJdbcXmlNamespace1511
- Migrate xmlns entries in
*-jdbc.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries in*-jdbc.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicJmsXmlNamespace1412
- Migrate xmlns entries in
*-jms.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic JMS schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicJmsXmlNamespace1511
- Migrate xmlns entries in
*-jms.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries in*-jms.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicPersistenceConfigurationXmlNamespace1412
- Migrate xmlns entries in
persistence-configuration.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic EJB 3.2 Persistence Configuration schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicPersistenceConfigurationXmlNamespace1511
- Migrate xmlns entries in
persistence-configuration.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inpersistence-configuration.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicPlanXmlNamespace1412
- Migrate xmlns entries in
plan.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Plan schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicPlanXmlNamespace1511
- Migrate xmlns entries in
plan.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inplan.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicPubSubXmlNamespace1412
- Migrate xmlns entries in
weblogic-pubsub.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic PubSub schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicPubSubXmlNamespace1511
- Migrate xmlns entries in
weblogic-pubsub.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-pubsub.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicRaXmlNamespace1412
- Migrate xmlns entries in
weblogic-ra.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Resource Adapter schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicRaXmlNamespace1511
- Migrate xmlns entries in
weblogic-ra.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-ra.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicRdbmsJarXmlNamespace1412
- Migrate xmlns entries in
weblogic-rdbms-jar.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic EJB 3.2 RDBMS schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicRdbmsJarXmlNamespace1511
- Migrate xmlns entries in
weblogic-rdbms-jar.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-rdbms-jar.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicResourceDeploymentPlanXmlNamespace1412
- Migrate xmlns entries in
resource-deployment-plan.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Resource Deployment Plan schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicResourceDeploymentPlanXmlNamespace1511
- Migrate xmlns entries in
resource-deployment-plan.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inresource-deployment-plan.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWebServicesXmlNamespace1412
- Migrate xmlns entries in
weblogic-webservices.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Web Services schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWebServicesXmlNamespace1511
- Migrate xmlns entries in
weblogic-webservices.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-webservices.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWebservicesPolicyRefXmlNamespace1412
- Migrate xmlns entries in
weblogic-webservices-policy.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Web Service Policy Reference schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWebservicesPolicyRefXmlNamespace1511
- Migrate xmlns entries in
weblogic-webservices-policy.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-webservices-policy.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWseeClientHandlerChainXmlNamespace1412
- Migrate xmlns entries in
weblogic-wsee-clientHandlerChain.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic WSEE Client Handler Chains schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWseeClientHandlerChainXmlNamespace1511
- Migrate xmlns entries in
weblogic-wsee-clientHandlerChain.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-wsee-clientHandlerChain.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWseeStandaloneClientXmlNamespace1412
- Migrate xmlns entries in
weblogic-wsee-standaloneclient.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic WSEE Standalone Client schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWseeStandaloneClientXmlNamespace1511
- Migrate xmlns entries in
weblogic-wsee-standaloneclient.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-wsee-standaloneclient.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicXmlCreateIfNotExists1511
- Create
weblogic.xmlif it does not exist - This recipe will create a
weblogic.xmlfile with the WebLogic 15.1.1 namespace if it does not already exist.
- Create
- com.oracle.weblogic.rewrite.WebLogicXmlPreferApplicationPackagesJPA
- Add
prefer-application-packagesfor JPA inweblogic.xml - This recipe will add a
prefer-application-packagesentry for Jakarta Persistence inweblogic.xmlif it does not already exist.
- Add
- com.oracle.weblogic.rewrite.WebLogicXmlPreferApplicationPackagesSlf4j
- Add
prefer-application-packagesfor SLF4J inweblogic.xml - This recipe will add a
prefer-application-packagesentry for SLF4J inweblogic.xmlif it does not already exist.
- Add
- com.oracle.weblogic.rewrite.WebLogicXmlWebAppNamespace1412
- Migrate xmlns entries in
weblogic.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicXmlWebAppNamespace1511
- Migrate xmlns entries in
weblogic.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.examples.AddImplicitTldFileWithTaglib2_1
- Add implicit TLD with taglib 2.1
- Add
implicit.tldfile with taglib 2.1 tosrc/main/webapp/WEB-INF/tags.
- com.oracle.weblogic.rewrite.examples.AddImplicitTldFileWithTaglib3_0
- Add implicit TLD with taglib 3.0
- Add
implicit.tldfile with taglib 3.0 tosrc/main/webapp/WEB-INF/tags.
- com.oracle.weblogic.rewrite.examples.spring.MigratedPetClinicExtrasFor1511
- Add WebLogic 15.1.1 PetClinic extras
- Run migration extras for migrated Spring Framework PetClinic example run on WebLogic 15.1.1.
- com.oracle.weblogic.rewrite.examples.spring.SetupSpringFrameworkPetClinicFor1412
- Setup Spring Framework 5.3.x PetClinic for WebLogic 14.1.2
- Setup Spring Framework 5.3.x PetClinic for WebLogic 14.1.2.
- com.oracle.weblogic.rewrite.jakarta.JakartaEeNamespaces9_1
- Migrate from JavaX to Jakarta EE 9.1 Namespaces
- These recipes help with Migration From JavaX to Jakarta EE 9.1 Namespaces.
- com.oracle.weblogic.rewrite.jakarta.UpdateJakartaPersistenceTo31
- Update Jakarta Persistence to 3.1
- Update Jakarta Persistence to 3.1.
- com.oracle.weblogic.rewrite.jakarta.UpdateJakartaPersistenceTo32
- Update Jakarta Persistence to 3.2
- Update Jakarta Persistence to 3.2.
- com.oracle.weblogic.rewrite.spring.framework.DefaultServletHandler
- Update Default Servlet Handler for Spring Framework if empty
- This recipe will update Spring Framework default servlet handler if empty, as noted in the Spring Framework 6.2 documentation.
- com.oracle.weblogic.rewrite.spring.framework.ReplaceWebLogicJtaTransactionManager
- Replace Removed WebLogicJtaTransactionManager from Spring Framework 5.3.x to 6.2.x
- Replace removed WebLogicJtaTransactionManager with JtaTransactionManager from Spring Framework 6.2.x.
- com.oracle.weblogic.rewrite.spring.framework.ReplaceWebLogicLoadTimeWeaver
- Replace Removed WebLogicLoadTimeWeaver from Spring Framework 5.3.x to 6.2.x
- Replace removed WebLogicLoadTimeWeaver with LoadTimeWeaver from Spring Framework 6.2.x.
- com.oracle.weblogic.rewrite.spring.framework.UpgradeToSpringFramework_6_2
- Migrate to Spring Framework 6.2 for WebLogic 15.1.1
- Migrate applications to the Spring Framework 6.2 release and compatibility with WebLogic 15.1.1.
webservices
5 recipes
- com.oracle.weblogic.rewrite.WebLogicWebServicesXmlNamespace1412
- Migrate xmlns entries in
weblogic-webservices.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Web Services schema files to WebLogic 14.1.2
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWebServicesXmlNamespace1511
- Migrate xmlns entries in
weblogic-webservices.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-webservices.xmlfiles to WebLogic 15.1.1
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWebservicesPolicyRefXmlNamespace1412
- Migrate xmlns entries in
weblogic-webservices-policy.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic Web Service Policy Reference schema files to WebLogic 14.1.2
- Tags: webservices-policy
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWebservicesPolicyRefXmlNamespace1511
- Migrate xmlns entries in
weblogic-webservices-policy.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-webservices-policy.xmlfiles to WebLogic 15.1.1 - Tags: webservices-policy
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.jakarta.JavaxWebServicesXmlToJakarta9WebServicesXml
- Migrate xmlns entries in
webservices.xmlfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
websocket
1 recipe
- org.openrewrite.quarkus.spring.SpringBootWebSocketToQuarkus
- Replace Spring Boot WebSocket with Quarkus WebSockets
- Migrates
spring-boot-starter-websockettoquarkus-websockets.
webxml
1 recipe
- com.oracle.weblogic.rewrite.jakarta.JavaxWebXmlToJakartaWebXml5
- Migrate xmlns entries in
web.xmlfiles for Jakarta Server Faces 3 - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
winforms
6 recipes
- OpenRewrite.Recipes.Net10.FindClipboardGetData
- Find obsolete
Clipboard.GetDatacalls (WFDEV005) - Finds calls to
Clipboard.GetData(string). In .NET 10, this method is obsolete (WFDEV005). UseClipboard.TryGetDatamethods instead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindFormOnClosingObsolete
- Find obsolete
Form.OnClosing/OnClosedusage (WFDEV004) - Finds usage of
Form.OnClosing,Form.OnClosed, and theClosing/Closedevents. In .NET 10, these are obsolete (WFDEV004). UseOnFormClosing/OnFormClosedandFormClosing/FormClosedinstead.
- Find obsolete
- OpenRewrite.Recipes.Net10.FindSystemDrawingExceptionChange
- Find
catch (OutOfMemoryException)that may needExternalException - In .NET 10, System.Drawing GDI+ errors now throw
ExternalExceptioninstead ofOutOfMemoryException. This recipe finds catch blocks that catchOutOfMemoryExceptionwhich may need to also catchExternalException.
- Find
- OpenRewrite.Recipes.Net10.FindWinFormsObsoleteApis
- Find obsolete Windows Forms APIs (WFDEV004/005/006)
- Finds usages of Windows Forms APIs that are obsolete in .NET 10, including
Form.OnClosing/OnClosed(WFDEV004),Clipboard.GetData(WFDEV005), and legacy controls likeContextMenu,DataGrid,MainMenu(WFDEV006).
- OpenRewrite.Recipes.Net10.FormOnClosingRename
- Rename
Form.OnClosing/OnClosedtoOnFormClosing/OnFormClosed(WFDEV004) - Renames
Form.OnClosingtoOnFormClosingandForm.OnClosedtoOnFormClosedfor .NET 10 compatibility. Parameter type changes (CancelEventArgs→FormClosingEventArgs,EventArgs→FormClosedEventArgs) must be updated manually.
- Rename
- OpenRewrite.Recipes.Net10.InsertAdjacentElementOrientParameterRename
- Rename
orientparameter toorientationinHtmlElement.InsertAdjacentElement - The
orientparameter ofHtmlElement.InsertAdjacentElementwas renamed toorientationin .NET 10. This recipe updates named arguments in method calls to use the new parameter name.
- Rename
wsee
4 recipes
- com.oracle.weblogic.rewrite.WebLogicWseeClientHandlerChainXmlNamespace1412
- Migrate xmlns entries in
weblogic-wsee-clientHandlerChain.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic WSEE Client Handler Chains schema files to WebLogic 14.1.2
- Tags: wsee-clientHandlerChain
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWseeClientHandlerChainXmlNamespace1511
- Migrate xmlns entries in
weblogic-wsee-clientHandlerChain.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-wsee-clientHandlerChain.xmlfiles to WebLogic 15.1.1 - Tags: wsee-clientHandlerChain
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWseeStandaloneClientXmlNamespace1412
- Migrate xmlns entries in
weblogic-wsee-standaloneclient.xmlfiles to WebLogic 14.1.2 - Migrate xmlns entries in WebLogic WSEE Standalone Client schema files to WebLogic 14.1.2
- Tags: wsee-standaloneclient
- Migrate xmlns entries in
- com.oracle.weblogic.rewrite.WebLogicWseeStandaloneClientXmlNamespace1511
- Migrate xmlns entries in
weblogic-wsee-standaloneclient.xmlfiles to WebLogic 15.1.1 - This recipe will update the
xmlnsentries inweblogic-wsee-standaloneclient.xmlfiles to WebLogic 15.1.1 - Tags: wsee-standaloneclient
- Migrate xmlns entries in
xhtml
1 recipe
- com.oracle.weblogic.rewrite.jakarta.JakartaFaces3Xhtml
- Faces XHTML migration for Jakarta EE 9
- Find and replace legacy JSF namespaces and javax references with Jakarta Faces values in XHTML files.
xjb
1 recipe
- com.oracle.weblogic.rewrite.jakarta.JavaxBindingsSchemaXjbsToJakarta9BindingsSchemaXjbs
- Migrate xmlns entries in
*.xjbfiles. - Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation.
- Migrate xmlns entries in
xml
3 recipes
- OpenRewrite.Recipes.Net10.FindXsltSettingsEnableScriptObsolete
- Find obsolete
XsltSettings.EnableScript(SYSLIB0062) - Finds usages of
XsltSettings.EnableScriptwhich is obsolete in .NET 10.
- Find obsolete
- org.openrewrite.python.migrate.ReplaceElementGetchildren
- Replace
Element.getchildren()withlist(element) - Replace
getchildren()withlist(element)on XML Element objects. Deprecated in Python 3.9.
- Replace
- org.openrewrite.python.migrate.ReplaceElementGetiterator
- Replace
Element.getiterator()withElement.iter() - Replace
getiterator()withiter()on XML Element objects. The getiterator() method was deprecated in Python 3.9.
- Replace
xmlunit
1 recipe
- org.openrewrite.java.testing.junit5.UseXMLUnitLegacy
- Use XMLUnit Legacy for JUnit 5
- Migrates XMLUnit 1.x to XMLUnit legacy 2.x.
xunit
19 recipes
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.AsyncLifetimeToBeforeAfterTest
- Find
IAsyncLifetimeneeding TUnit migration - Find classes implementing
IAsyncLifetimethat should use[Before(Test)]and[After(Test)]for TUnit.
- Find
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.ChangeXUnitUsings
- Change xUnit using directives to TUnit
- Replace
using Xunit;withusing TUnit.Core;andusing TUnit.Assertions;, and removeusing Xunit.Abstractions;andusing Xunit.Sdk;.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.ClassFixtureToClassDataSource
- Find
IClassFixture<T>needing TUnit migration - Find classes implementing
IClassFixture<T>that should use[ClassDataSource<T>]for TUnit.
- Find
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.CollectionToNotInParallel
- Replace
[Collection]with[NotInParallel] - Replace the xUnit
[Collection("name")]attribute with the TUnit[NotInParallel("name")]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.ConstructorToBeforeTest
- Find test constructors needing
[Before(Test)] - Find constructors in test classes that should be converted to
[Before(Test)]methods for TUnit.
- Find test constructors needing
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.DisposableToAfterTest
- Replace
IDisposablewith[After(Test)] - Remove
IDisposablefrom the base type list and add[After(Test)]to theDispose()method.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.FactSkipToSkipAttribute
- Extract
Skipinto[Skip]attribute - Extract the
Skipargument from[Fact(Skip = "...")]or[Theory(Skip = "...")]into a separate TUnit[Skip("...")]attribute.
- Extract
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.FactTimeoutToTimeoutAttribute
- Extract
Timeoutinto[Timeout]attribute - Extract the
Timeoutargument from[Fact(Timeout = ...)]or[Theory(Timeout = ...)]into a separate TUnit[Timeout(...)]attribute.
- Extract
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.FactToTest
- Replace
[Fact]with[Test] - Replace the xUnit
[Fact]attribute with the TUnit[Test]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.InlineDataToArguments
- Replace
[InlineData]with[Arguments] - Replace the xUnit
[InlineData]attribute with the TUnit[Arguments]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MemberDataToMethodDataSource
- Replace
[MemberData]with[MethodDataSource] - Replace the xUnit
[MemberData]attribute with the TUnit[MethodDataSource]attribute. Fields and properties referenced by MemberData are converted to methods.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateFromXUnit
- Migrate from xUnit to TUnit
- Migrate xUnit test attributes, assertions, and lifecycle patterns to their TUnit equivalents.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateFromXUnitAttributes
- Migrate xUnit attributes to TUnit
- Replace xUnit test attributes ([Fact], [Theory], [InlineData], etc.) with their TUnit equivalents.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateXUnitAssertions
- Migrate xUnit assertions to TUnit
- Replace xUnit
Assert.*calls with TUnit's fluentawait Assert.That(...).Is*()assertions. Note: test methods may need to be changed toasync Taskseparately.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.MigrateXUnitDependencies
- Migrate xUnit NuGet dependencies to TUnit
- Remove xUnit NuGet package references, add TUnit, and upgrade the target framework to at least .NET 9.
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TestOutputHelperToTestContext
- Find
ITestOutputHelperneeding TUnit migration - Find usages of xUnit's
ITestOutputHelperthat should be replaced with TUnit'sTestContext.
- Find
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TheoryToTest
- Replace
[Theory]with[Test] - Replace the xUnit
[Theory]attribute with the TUnit[Test]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TraitCategoryToCategory
- Replace
[Trait("Category", ...)]with[Category] - Replace xUnit
[Trait("Category", "X")]with TUnit's dedicated[Category("X")]attribute.
- Replace
- OpenRewrite.Recipes.TUnit.Migration.FromXUnit.TraitToProperty
- Replace
[Trait]with[Property] - Replace the xUnit
[Trait]attribute with the TUnit[Property]attribute.
- Replace
zipkin
2 recipes
- org.openrewrite.java.spring.opentelemetry.MigrateBraveToOpenTelemetry
- Migrate Brave API to OpenTelemetry API
- Migrate Java code using Brave (Zipkin) tracing API to OpenTelemetry API. This recipe handles the migration of Brave Tracer, Span, and related classes to OpenTelemetry equivalents.
- org.openrewrite.java.spring.opentelemetry.MigrateFromZipkinToOpenTelemetry
- Migrate from Zipkin to OpenTelemetry OTLP
- Migrate from Zipkin tracing to OpenTelemetry OTLP. This recipe replaces Zipkin dependencies with OpenTelemetry OTLP exporter and updates the related configuration properties.