OpenRewrite is an automated refactoring framework that helps developers modernise applications, migrate frameworks and maintain consistent source code. It uses reusable transformation rules, known as recipes, to make systematic changes across a codebase.
Unlike conventional text replacement tools, OpenRewrite uses a structured representation of source code that retains formatting and semantic information. This allows transformations to account for program structure and types while minimising unrelated changes to the original files.
Developers can apply existing recipes or create their own to automate repetitive maintenance tasks. Common uses include updating framework APIs, improving coding conventions and modifying dependency configurations.
This is free and open source software.
Key Features
- Automates source code refactoring using reusable, configurable transformation recipes.
- Uses Lossless Semantic Trees to retain formatting, comments and source code structure during transformations.
- Provides type-aware analysis and transformations for Java source code.
- Supports Kotlin and Groovy through established language modules.
- Processes structured configuration formats including XML, YAML, JSON, TOML, HCL and properties files.
- Offers recipes for migrating applications between framework and library APIs.
- Supports automated updates to dependencies and build configurations.
- Provides code transformations for improving style consistency and replacing deprecated APIs.
- Allows multiple recipes to be combined into larger refactoring operations.
- Supports declarative recipes defined using YAML.
- Provides APIs for developing custom transformations and analysis rules.
- Includes Maven and Gradle plugins for running recipes within existing development workflows.
- Preserves unrelated source formatting when applying supported structural transformations.
- Supports repeatable execution of transformations for maintaining consistent code across projects.
Website: github.com/openrewrite/rewrite
Support:
Developer: Moderne and OpenRewrite contributors
License: Apache License 2.0 (core framework)
Forbidden APIs is written in Java. Learn Java with our recommended free books and free tutorials.
Related Software
| Java Linter Tools | |
|---|---|
| SpotBugs | Find bugs in Java code |
| PMD | Extensible cross-language static code analyzer |
| Error Prone | Catch common Java mistakes |
| NullAway | Eliminate NPEs in Java code |
| Infer | Static analysis tool for Java, C++, Objective-C, and C |
| Checkstyle | Write Java code that adheres to a coding standard |
| Checker Framework | Pluggable type-checking for Java |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.