codegenomeproject
Search
MarketplaceModules
PackagesCLIMCP
Sign in
  1. Marketplace
  2. Static analysis
  3. Code cleanup

Code cleanup

MSAL

Automatically clean up code, e.g. remove unnecessary parentheses, add missing braces and fix whitespace.

org.openrewrite.staticanalysis.CodeCleanup
mod run . --recipe=org.openrewrite.staticanalysis.CodeCleanup

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

Recipe
  1. Default comes last
  2. Remove empty blocks
  3. End files with a single newline
  4. for loop counters should use postfix operators
  5. Finalize private fields
  6. Method parameter padding
  7. No whitespace after
  8. No whitespace before
  9. Pad empty for loop components
  10. Typecast parenthesis padding
  11. Equals avoids null
  12. Explicit initialization
  13. Fall through
  14. Hide utility class constructor
  15. Fix missing braces
  16. Operator wrapping
  17. Remove unnecessary parentheses
  18. Replace calls to Thread.run() with Thread.start()
  19. Chain StringBuilder.append() calls
  20. Remove methods that only call super
  21. Replace StringBuilder#append with String
  22. Add imports for fully qualified references to types
  23. Simplify single-element annotation
  24. Order imports
  25. Remove unused labels
© Moderne, 2026
Recipe indexPrivacyTerms