kotlinter-gradle
ktfmt
Our great sponsors
kotlinter-gradle | ktfmt | |
---|---|---|
2 | 9 | |
560 | 813 | |
- | 3.3% | |
7.0 | 6.9 | |
12 days ago | 11 days ago | |
Kotlin | Kotlin | |
Apache License 2.0 | Apache License 2.0 |
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.
kotlinter-gradle
-
Google's Kotlin Style Guide vs Kotlin Official Code Style
I'm using the kotlinter plugin which is a zero-configuration above the excellent ktlint engine.
-
Ktlint automation for a team
https://github.com/jeremymailen/kotlinter-gradle Follow the instructions, someone will have to make tasks to add it to all of your existing Kotlin repos.
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.
What are some alternatives?
ktlint-gradle - A ktlint gradle plugin
diktat - Strict coding standard for Kotlin and a custom set of rules for detecting code smells, code style issues and bugs
KotlinLanguageServer - Kotlin code completion, diagnostics and more for any editor/IDE using the Language Server Protocol
Anki-Android - AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
javalin.github.io - Javalin website source code
editorconfig-vim - EditorConfig plugin for Vim
galoisenne - 🕸️ Graphs, finite fields and discrete dynamical systems in Kotlin
ktor - Framework for quickly creating connected applications in Kotlin with minimal effort
TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.