From 3521b846fc9bd63d388f29f8fbda18ca4be50c6a Mon Sep 17 00:00:00 2001 From: Albin Date: Mon, 15 Jun 2026 16:21:32 +0200 Subject: [PATCH 1/3] Bootstrap kotlin coding guidelines --- kotlin.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 kotlin.md diff --git a/kotlin.md b/kotlin.md new file mode 100644 index 0000000..df9db3d --- /dev/null +++ b/kotlin.md @@ -0,0 +1,28 @@ +# Kotlin coding guidelines + +These guidelines apply to all Kotlin code we write, regardless of target platform. +Android-specific conventions do not belong in this document. + +## Coding guidelines + +We follow the official [Kotlin coding conventions]. + +## Linting and formatting + +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. + +## CI + +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. + +[Kotlin coding conventions]: https://kotlinlang.org/docs/coding-conventions.html +[ktfmt]: https://github.com/facebook/ktfmt +[detekt]: https://detekt.dev/ +[mullvadvpn-app repository]: https://github.com/mullvad/mullvadvpn-app +[editorconfig]: https://github.com/mullvad/mullvadvpn-app/blob/main/android/.editorconfig +[main page]: ./README.md From 421e9e659486e046a176bde524d26c8a9bca3e3d Mon Sep 17 00:00:00 2001 From: Albin Date: Tue, 16 Jun 2026 11:22:35 +0200 Subject: [PATCH 2/3] Add kotlin link in readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b72b387..23505a2 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,7 @@ variable name. * [Rust](rust.md) * [Bash](bash.md) +* [Kotlin](kotlin.md) ## Git From 776f3013ce3caa23749526f4ce138b7ec3789d2b Mon Sep 17 00:00:00 2001 From: Albin Date: Tue, 16 Jun 2026 11:23:04 +0200 Subject: [PATCH 3/3] Add missing swift link in the readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 23505a2..a2942f4 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,7 @@ variable name. * [Rust](rust.md) * [Bash](bash.md) * [Kotlin](kotlin.md) +* [Swift](swift.md) ## Git