Skip to content

A code refactoring tool for java created with jgit and spoon for small diffs.

License

Notifications You must be signed in to change notification settings

MartinWitt/laughing-train

Repository files navigation

Laughing-Train

Project Map
Laughing-Train is a code refactoring tool using Spoon and static analyzers to refactor Java code. This includes the analysis of the code, the refactoring of the code and the generation of pull requests on GitHub. We analyze projects with qodana, a static code analyzer from JetBrains, and use the results to refactor the code. The refactoring is done with Spoon, a Java parser and transformer. The results are then pushed to GitHub as pull requests. For GitHub integration, we use the GitHub API and the GitHub CLI. The website is built with react and the backend is written with Quarkus.

Features:

  • Code analysis with Qodana(JetBrains IntelliJ headless)
  • Minimal Diffs with Spoon
  • Git/GitHub integration
  • easy deployment extensible with new analyzers

Examples:

GraphQL

Use http://www.keksdose.xyz:8080/graphql/to get mining results by GraphQL. See http://www.keksdose.xyz:8080/graphql/schema.graphql for the schema. The schema is not final and can change anytime.

FAQ:

Why would you ever write something already solved?

TL;DR; This gitProject is currently a nice, refreshing side gitProject while writing my master thesis.

I contribute to spoon on a regular schedule, and writing code for spoon helped my expanding my coding skills. In Spoon exists multiple bad smell, which are not hard to fix, but someone has to do it. If you have a Java parser at hand, it was a straightforward idea by me to fix bad smells this way. The biggest problem in spoon is/was the mix of JUnit 4 and JUnit 5. Currently, laughing-train can convert them automatically and speeds the migration process up by magnitudes.

Why use Qodana?

I use vscode as IDE, but I'm impressed by the tooling JetBrains provides. Qodana seems way ahead of the competition and is an impressive tool to use. There exists abstraction for further analyzers, but I'm uncertain if I will ever implement them.

Why not help an existing tool?

Existing tools have either pretty long release schedules, are not using spoon, or I see no value in the tool. Here I can merge, break and change things as I like without too much hassle.

Can I use your tool for X?

Sure go ahead. If it helps, it's perfect. You are welcome to write an issue about it.

More Questions?

Get in contact :)