ktfmt
diktat
Our great sponsors
ktfmt | diktat | |
---|---|---|
9 | 5 | |
816 | 502 | |
3.7% | 2.4% | |
8.4 | 8.9 | |
1 day ago | 4 days ago | |
Kotlin | Kotlin | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ktfmt
-
Pre-push Hooks
The script below will run ktfmt over a Kotlin codebase and fail the push if any of the files are not well-formatted. It does also use a custom Gradle plugin we built around ktfmt, which accepts a --run-over change set. This script will leave the fixed formatting changes in the tree, awaiting the developer to intervene, commit, and try again.
- Ktfmt – The Kotlin Code Formatter
-
Google's Kotlin Style Guide vs Kotlin Official Code Style
My team uses ktfmt. It is more aggressive and opinionated about formatting than ktlint, which we view as a good thing.
-
What are the good code formatters for Kotlin?
I can recommend ktfmt. It is based on the fast Google Java Formatter and produces deterministic formatting. Plugins for Maven, Gradle and IntelliJ are available.
-
A friend took a look at my code and asked if I needed mental help. Is he right? What are your thoughts?
The only sane formatting tool for Kotlin is ktfmt. https://github.com/facebook/ktfmt
- From zero to 10M lines of Kotlin
-
A few Kotlin questions from a Rustacean
Others have covered most of your questions, but since you asked about linters: if you want a highly opinionated formatter in the spirit of gofmt or google-java-format, you can check out ktfmt.
-
Diktat 1.0.0 released
Facebook's ktfmt (https://github.com/facebookincubator/ktfmt) does that.
diktat
- Diktat linter 1.2.0 released: like share and subscribe ☺️
-
Diktat 1.0.0 released
We are happy to announce that after a year of development, communication and collaboration with awesome ktlint and kotlin community, our small group of enthusiasts has finally stabilized our code analyzer, called Diktat.
- Looking for some project based tutorial
-
can't use kotlinx.serialization with maven
It's true that kotlin support in gradle is much better, but I have successfully used serialization with maven (pom.xml just in case, not really relevant here, because we use yaml instead of json and no java sources). Didn't use javafx or jlink, though. Maven usually needs more configuration and it looks more verbose because of xml.
What are some alternatives?
KotlinLanguageServer - Kotlin code completion, diagnostics and more for any editor/IDE using the Language Server Protocol
ktlint-gradle - A ktlint gradle plugin
Anki-Android - AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
BrBa-Compose - 🧪 ☠︎ Jetpack Compose - Breaking Bad
javalin.github.io - Javalin website source code
AutoBindings - Set of annotations that aims to make your Android development experience easier along with lint checks.
editorconfig-vim - EditorConfig plugin for Vim
Posts-MVVM-DaggerHilt-Dynamic-Feature-RxJava3-Flow-Sample - Posts Api sample with Kotlin RxJava3/Coroutines Flow, Clean Architecture, Offline first/last with Room + Retrofit2, Dagger Hilt, Dynamic Feature Modules, Static Code Analysis, Gradle DSL, MockK+ MockWebServer with Test Driven Development including Api and Database tests
kotlinter-gradle - Painless, fast ktlint plugin for Gradle
awesome-jetpack-compose-learning-resources - 👓 A continuously updated list of learning Jetpack Compose for Android apps.
galoisenne - 🕸️ Graphs, finite fields and discrete dynamical systems in Kotlin
compose-rules - Static checks to aid with a healthy adoption of Compose