From a2a8dc4489f82dd2e3857d37a9ce880fc70fbf9d Mon Sep 17 00:00:00 2001 From: Quentin Hibon Date: Thu, 14 Jan 2021 18:54:25 +0100 Subject: [PATCH] Mention git pre-commit hook in GUIDELINES.md --- docs/GUIDELINES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/GUIDELINES.md b/docs/GUIDELINES.md index 0658f4147..c24b375cb 100644 --- a/docs/GUIDELINES.md +++ b/docs/GUIDELINES.md @@ -49,7 +49,7 @@ Further resources: ## Code Style -For Kotlin, we follow [ktlint](https://ktlint.github.io/) style with default settings. This code style is enforced by our automated build pipeline. To make sure that IntelliJ and Android Studio are configured according to ktlint, run `./gradlew ktlintApplyToIdea`. To check that all code is properly formatted, run `./gradlew ktlintCheck`. See more details in [ktlint-gradle](https://github.com/jlleitschuh/ktlint-gradle). +For Kotlin, we follow [ktlint](https://ktlint.github.io/) style with default settings. This code style is enforced by our automated build pipeline. To make sure that IntelliJ and Android Studio are configured according to ktlint, run `./gradlew ktlintApplyToIdea`. To check that all code is properly formatted, run `./gradlew ktlintCheck`. You can install a Git pre-commit hook to ensure that the code is properly formatted when you commit using `./gradlew addKtlintFormatGitPreCommitHook`. See more details in [ktlint-gradle](https://github.com/jlleitschuh/ktlint-gradle). For legacy Java code, we don't have strict guidelines. Please follow a code style similar to the file you are modifying. Note that new classes should be written in Kotlin. Pull requests converting existing Java code to Kotlin are also welcome.