From aeca97e23b228bb5b3e65abb9692d8bd4ebb2f67 Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Sat, 2 Aug 2025 10:22:49 -0500 Subject: [PATCH 1/2] docs: add information about spotless for code formatting Clarify that spotless is used for automated code formatting and provide commands for applying formatting and installing a pre-push Git hook. Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com> --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e541e596bf..810a132bbe 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,6 +14,8 @@ Thank you for your interest in contributing to Meshtastic-Android! We welcome co - Follow the [Kotlin Coding Conventions](https://kotlinlang.org/docs/coding-conventions.html) for Kotlin code. - Use Android Studio's default formatting settings. +- We use [spotless](https://github.com/diffplug/spotless) for automated code formatting. You can run `./gradlew spotlessApply` to format your code automatically. + - You can also run `./gradlew spotlessInstallGitPrePushHook` to install a pre-push Git hook that will run a `spotlessCheck`. - Write clear, descriptive variable and function names. - Add comments where necessary, especially for complex logic. - Keep methods and classes focused and concise. From 86e2124909904203dae1938a75fc41dfde602f48 Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Sat, 2 Aug 2025 10:37:34 -0500 Subject: [PATCH 2/2] docs: update Spotless Git hook command The command to install the Spotless Git pre-push hook was updated to include `--no-configuration-cache` to ensure it runs correctly. Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 810a132bbe..e3efd03777 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ Thank you for your interest in contributing to Meshtastic-Android! We welcome co - Follow the [Kotlin Coding Conventions](https://kotlinlang.org/docs/coding-conventions.html) for Kotlin code. - Use Android Studio's default formatting settings. - We use [spotless](https://github.com/diffplug/spotless) for automated code formatting. You can run `./gradlew spotlessApply` to format your code automatically. - - You can also run `./gradlew spotlessInstallGitPrePushHook` to install a pre-push Git hook that will run a `spotlessCheck`. + - You can also run `./gradlew spotlessInstallGitPrePushHook --no-configuration-cache` to install a pre-push Git hook that will run a `spotlessCheck`. - Write clear, descriptive variable and function names. - Add comments where necessary, especially for complex logic. - Keep methods and classes focused and concise.