software engineering11 min read

Formatting an entire 25 million line codebase overnight: the rubyfmt story

AI Summary

Stripe adopted rubyfmt to format its massive Ruby codebase, eliminating style debates and speeding up development workflows. Starting as an open-source project in 2018, rubyfmt required overcoming severe performance bottlenecks by compiling C and Rust around the Ruby VM, later migrating to Prism for native parsing.

Key Takeaways

  • rubyfmt was built to be a zero-configuration, fast autoformatter modeled after Go's gofmt.
  • Early versions used Ruby and ripper, but performance issues led to a rewrite using Rust and libruby.
  • Stripe successfully formatted tens of millions of lines of Ruby code by executing a coordinated weekend rollout.

Why it matters

Eliminating manual code formatting debates and slow linters significantly boosts developer productivity, especially for engineers transitioning from languages with zero-config formatters like Go or Python.

# ruby# rust# code formatting# developer productivity

Conversation 0

Be the first to share your perspective.