Pinterest + ktlint = ❤

Pinterest Engineering
Pinterest Engineering Blog
2 min readMay 10, 2019

Sha Sha Chu | Android Core Experience

It’s been nearly a year since Pinterest’s Android codebase became Kotlin-first, and about two years since we adopted ktlint for Kotlin linting and formatting. Today, we’re sharing that Pinterest has officially taken ownership over the project.

Initially, we chose ktlint because of its simplicity, active community, extensibility, and extremely responsive owner. It also integrated easily with our existing Phabricator-based workflow, and, after adding about 65 lines of PHP to our Arcanist library, we were able to apply linting and formatting to our Kotlin files on a per-diff basis.

When Stanley Shyiko (the developer of ktlint) put a call out a few months ago looking for new ownership for the project, we were immediately interested. Not only was it a tool we use every single day at Pinterest, but it would be a tangible way for us to give back to the Kotlin community. After a few meetings with Stanley, it was clear that it was a great fit, and we were excited to move forward as owner.

In the short term, nothing is going to change about the way the project is run and maintained. We still welcome and encourage outside contributions to the project in the form of Issues and Pull Requests. In the medium-to-long term, we plan to follow Stanley’s proposed roadmap by implementing a way to globally disable rules (ktlint’s most-requested feature), integrating an official Gradle plugin, and updating some of the APIs in ktlint-core to enable cleaner Rule writing. If any of these projects seems interesting to you, please reach out or go ahead and open a Pull Request. Finally, if you or your company uses ktlint, please open a Pull Request to add yourself to the Adopters list.

We’re committed to continuing the great work Stanley started, and collaborating with other developers in the growing Kotlin community.

Thank you to Garrett Moon and Jon Parise for their assistance in bringing ktlint to Pinterest, as well as Kevin Bierhoff, Beth Cutler and James Lau at Google for their technical input.

--

--