← Retour au blog
tech 5 May 2026

Formatting a 25M-line codebase overnight: the rubyfmt story

Discover how Stripe managed to reformat a massive 25 million line codebase overnight with rubyfmt, an innovative tool. An engineering feat that transformed their productivity.

Article inspired by the original source
Formatting a 25M-line codebase overnight ↗ stripe.dev

A Monumental Challenge

When Stripe decided to reformat their entire 25 million line Ruby codebase overnight, it seemed like a Herculean task. However, with effective tools and a well-thought-out strategy, this challenge was successfully met. But why undertake such an endeavor? Simply to improve code consistency and facilitate long-term maintenance.

Why Formatting is Crucial

Code formatting is not just about aesthetics. A well-formatted codebase is essential for readability, maintainability, and development team efficiency. By standardizing code style, Stripe was able to reduce friction during code reviews and accelerate the development cycle.

Rubyfmt: The Key Tool

Rubyfmt was the tool that enabled Stripe to achieve this feat. Designed to be fast and reliable, Rubyfmt was able to process millions of lines of code without compromising quality. The tool was developed in-house, optimized for Stripe's code specifics, and then deployed across the entire codebase.

Preparation Before Execution

Before launching the formatting operation, meticulous preparation was needed. The team first tested on smaller code segments to ensure Rubyfmt worked as expected. They also set up backups and contingency plans in case of issues.

Execution and Results

Execution was planned during a low-activity period to minimize impact on developers. In just a few hours, the entire 25 million lines were reformatted, and the results were spectacular. Not only was the code more readable, but teams noticed a significant reduction in errors during continuous integrations.

Lessons Learned and the Future

This project taught Stripe several valuable lessons in terms of automation and large-scale code management. The success of this operation also inspired other similar initiatives within the company, reinforcing the importance of automation in modern development processes.

Let's discuss your project in 15 minutes.

codebase rubyfmt automation Stripe developer productivity
Deepthix newsletter · 100% AI · every Monday 8am

An AI agent reads tech for you.

Our AI agent scans ~200 sources per week and ships the best articles to your inbox Monday 8am. Free. One click to unsubscribe.

Visit the newsletter page →

Want to automate your operations?

Let's talk about your project in 15 minutes.

Book a call