| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
 |  | |||
📚 Learning and exploring OpenRewrite.
Large-scale automated source code refactoring
OpenRewrite is an open source ecosystem for automated source code refactoring. It is backed by a commercial company Moderne. OpenRewrite supports Java, Kotlin and Groovy. While the main selling point of OpenRewrite is refactoring I'm personally interested in the core engine with regard to static code analysis.
In this project I want to explore the core components of OpenRewrite and I hope to be able to run them against some example Java code. Here is the design of my exploration:
This design is a bit different from how OpenRewrite is typically used. OpenRewrite is usually plugged directly into the "host" build system of the program-under-analysis. For example, a typical usage of OpenRewrite is to add the OpenRewrite Gradle plugin in the plugins block of the project's build.gradle file. OpenRewrite also has a way to splice into the Gradle machinery of the program-under-analysis without making any source code changes to the project. I personally don't want to execute a foreign project's Gradle build. That's a form of "eval" (a front door for malicious code).
Is a non-eval approach even possible with OpenRewrite? It looks like it was officially documented for some time but was removed in the docs.
NOTE:
This was developed on macOS and for my own personal use.
Follow these instructions to build and run the OpenRewrite-powered static analysis.
./gradlew :static-analysis:installDist./static-analysis/build/install/static-analysis/bin/static-analysis| Back | FazBrowse Home | New Git URL |