ktfmt is a program that pretty-prints (formats) Kotlin code, based on google-java-format.
ktfmt uses google-java-format’s underlying engine, and as such, many items on google-java-format’s FAQ apply to ktfmt as well. ktfmt ignores most existing formatting. It respects existing newlines in some places, but in general, its output is deterministic and is independent of the input code. ktfmt exposes no configuration options that govern formatting behavior.
This is free and open source software.
Website: github.com/Kotlin/ktfmt
Support:
Developer: Facebook
License: Apache License 2.0
ktfmt is written in Kotlin. Learn Kotlin with our recommended free books and free tutorials.
This article was contributed by a visitor who completed this form. Help the site by suggesting new open source software.
Related Software
| Kotlin Code Formatters | |
|---|---|
| ktlint | Kotlin linter with built-in formatter |
| Spotless | Keeps codebases pristine with automated formatting checks |
| ktfmt | Pretty-prints (formats) Kotlin code |
| ktlint-gradle | Runs ktlint from Gradle to enforce Kotlin style rules |
| Kotlinter Gradle | Plugin for linting and formatting |
| ktlint-gradle-plugin | Brings Kotlin linting and formatting checks into Gradle projects |
| ktfmt-gradle | Adds ktfmt formatting to Gradle builds with minimal fuss. |
| Kotlin Formatter | Formats Kotlin source with a simple, consistent command-line tool |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.