Large-Scale Automated Source Code Refactoring with OpenRewrite

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • rewrite

    Automated mass refactoring of source code.

  • spring-cloud-dataflow

    A microservices-based Streaming and Batch data processing in Cloud Foundry and Kubernetes

  • It's also incredibly tedious when you do set about modernizing it. Fixing these things is more possible than you would initially think. Sometimes, we can get an app _almost_ all the way there, with just a little left to do: https://github.com/spring-cloud/spring-cloud-dataflow/pull/4...

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • gradle-lint-plugin

    A pluggable and configurable linter tool for identifying and reporting on patterns of misuse or deprecations in Gradle scripts.

  • Semgrep’s focus is on static analysis/search and is based on rules that developers need to write in a new DSL. Autofix is experimental and is one pattern replaced with another. https://semgrep.dev/docs/experiments/overview/

    OpenRewrite originated to do transformations of code, specifically to remove a Netflix proprietary logging library and replace it with in SLF4J. The predecessor of OpenRewrite was Gradle Lint (https://github.com/nebula-plugins/gradle-lint-plugin), commonly used to update Gradle build configuration. OpenRewrite added search after transformation and search can be very flexible (search for all usages of a particular package/any method, not just a specific method invocation). Instead of being DSL based, OpenRewrite provides a set of building blocks called recipes that can be combined together to create more powerful recipes. When building blocks are not enough, you can write a custom recipe in the same language as what you are managing. Java for Java and TypeScript for JavaScript/TypeScript (coming soon).

    For example, you can see JUnit 4 to 5 migration recipe contains a set of pre-built and custom recipes.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts