Skip to content

Kotlin Coding Style

Elias Keis edited this page Dec 1, 2019 · 1 revision

Rules

See https://ktlint.github.io/#rules. Based on the official Kotlin coding conventions and the Android Kotlin style guide.

But: we ignore the rule that a file should contain only a single class/object with a name that matches the file name.

ktlint usage

  • To run the check: mvn antrun:run@ktlint (or mvn validate)
  • To auto-fix most of the issues: mvn antrun:run@ktlint-format
Clone this wiki locally