Loading
svg
Open

OpenRewrite – Automated Mass Refactoring Of Source Code

January 14, 20242 min read

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:

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

How do you vote?

0 People voted this article. 0 Upvotes - 0 Downvotes.
svg

What do you think?

Show comments / Leave a comment

Leave a reply

svg