These guidelines apply to all Kotlin code we write, regardless of target platform. Android-specific conventions do not belong in this document.
We follow the official Kotlin coding conventions.
All code is formatted with ktfmt using kotlinLangStyle and the editorconfig in the
mullvadvpn-app repository is a reference configuration. We'll typically use additional
linters such as detekt, but that can differ on a project basis.
Also see the main page for general file format standards to follow.
All repositories containing Kotlin should have a CI pipeline that fails on compilation errors, formatter diffs, detekt findings, and test failures before code is merged to the main branch.