pinterest/ktlint

Created Jul 1, 2022 · View the pinterest/ktlint repository page

An anti-bikeshedding Kotlin linter with built-in formatter

Want this for your repo?

Render a free sample of any GitHub repo in seconds.

Visualize your own →

Contributors

123

Lines of Code

4,746

From

Jul 27, 2016

To

Jun 30, 2022

About pinterest/ktlint

ktlint is a Kotlin linter inspired by opinionated formatters like standard for JavaScript and gofmt for Go. It enforces a consistent code style without requiring configuration, making it an anti-bikeshedding tool for Kotlin projects. The tool comes with built-in rule sets and a formatter that can automatically fix many style issues, supporting both .kt and .kts file extensions.

The project provides multiple output formats including plain text, JSON, HTML, and checkstyle reports, and can be installed via various package managers or used as an executable jar. It supports .editorconfig files for optional customization and integrates with popular build tools through Maven and Gradle plugins. Beyond its core functionality, ktlint allows developers to extend it with custom rule sets and reporters to suit specific project needs.

Originally created by Stanley Shyiko and later maintained by Pinterest, the project is now independent and licensed under the MIT license. It's designed for developers and teams looking to establish consistent Kotlin code formatting standards with minimal setup overhead.

Share this video