https://github.com/openrewrite/rewrite
The OpenRewrite project is a mass source code refactoring ecosystem. Reduce 1000s of hours of static code analysis fixes to minutes. Turn a four-month migration project into four hours of work. Patch security vulnerabilities across 100s of repositories at once. OpenRewrite automates code refactoring and remediation tasks for you, enabling developers to deliver more business value.
Refactoring at scale with Moderne
OpenRewrite’s refactoring engine and recipes will always be open source. Build tool plugins like OpenRewrite Gradle Plugin and OpenRewrite Maven Plugin help you run these recipes on one repository at a time. Moderne is a complementary product that executes OpenRewrite recipes at scale on hundreds of millions of lines of code and enables mass-committing of results. Moderne freely runs a public service for the benefit of thousands of open source projects.
To help orient you to OpenRewrite, let’s walk through configuring a project to use the Maven or Gradle OpenRewrite plugin. Then let’s walk through running various types of recipes on said project and talk through the results.
In this guide, you will:
- Clone a sample project
- Add the rewrite-maven-plugin or rewrite-gradle-plugin to your project
- Activate a recipe so it can be run
- Run a simple refactoring recipe
- Run a recipe with YAML configuration
- Add and run an externally created recipe
Prerequisites
This quickstart guide assumes that you:
- Are somewhat familiar with Java
- Have worked with a Maven or a Gradle project before
- Know how to run commands in the command line
- Can run basic Git commands
What do you think?
Show comments / Leave a comment