pinterest / ktlint

An anti-bikeshedding Kotlin linter with built-in formatter
https://pinterest.github.io/ktlint/
MIT License
6.19k stars 505 forks source link

Outdated doc in FAQ : Can I use KtLint to directly format the code I'm generating with KotlinPoet? #2594

Closed eboudrant closed 6 months ago

eboudrant commented 7 months ago

On this doc regarding question : Can I use KtLint to directly format the code I'm generating with KotlinPoet? https://pinterest.github.io/ktlint/latest/faq/#can-i-use-ktlint-to-directly-format-the-code-im-generating-with-kotlinpoet

It's mentioned to include com.pinterest.ktlint:ktlint-core dependency but it does not exists. Might be good to update the documentation.

Yes, it is possible to use KtLint to directly format the code generated with KotlinPoet. To do so, you must include the dependencies com.pinterest.ktlint:ktlint-core and com.pinterest.ktlint:ktlint-ruleset-standard in your Gradle/Maven project.