To check if the code is properly formatted, run:
./gradlew ktlintCheck
To automatically fix any formatting issues, run:
./gradlew ktlintFormat
If using IntelliJ IDEA or Android Studio, install the Ktlint plugin
and configure the IDE to format Kotlin source files using ktlint
by setting the mode to Distract Free or
Manual in Tools -> KtLint -> Mode.