From 3bf382a6b99ffdd989e7cb72fdbd815be3a61a0f Mon Sep 17 00:00:00 2001 From: Damontecres Date: Tue, 23 Sep 2025 18:01:56 -0400 Subject: [PATCH] Add pre-commit --- .pre-commit-config.yaml | 20 +++++++++++++++++++ ...alizer.kt => UserPreferencesSerializer.kt} | 0 .../damontecres/dolphin/ui/theme/Theme.kt | 4 +--- build.gradle.kts | 2 +- 4 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 .pre-commit-config.yaml rename app/src/main/java/com/github/damontecres/dolphin/preferences/{UserPreferencesSeralizer.kt => UserPreferencesSerializer.kt} (100%) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..12ce8583 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,20 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: check-xml + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace +- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks + rev: v2.12.0 + hooks: + - id: pretty-format-kotlin + args: [ --autofix, --ktlint-version=1.7.1 ] +- repo: local + hooks: + - id: check-debug-enabled + name: Check debug enabled + entry: val DEBUG = true + language: pygrep + files: '.+\.kt' diff --git a/app/src/main/java/com/github/damontecres/dolphin/preferences/UserPreferencesSeralizer.kt b/app/src/main/java/com/github/damontecres/dolphin/preferences/UserPreferencesSerializer.kt similarity index 100% rename from app/src/main/java/com/github/damontecres/dolphin/preferences/UserPreferencesSeralizer.kt rename to app/src/main/java/com/github/damontecres/dolphin/preferences/UserPreferencesSerializer.kt diff --git a/app/src/main/java/com/github/damontecres/dolphin/ui/theme/Theme.kt b/app/src/main/java/com/github/damontecres/dolphin/ui/theme/Theme.kt index aa9c3e5c..40607acf 100644 --- a/app/src/main/java/com/github/damontecres/dolphin/ui/theme/Theme.kt +++ b/app/src/main/java/com/github/damontecres/dolphin/ui/theme/Theme.kt @@ -89,9 +89,7 @@ val unspecified_scheme = @Composable fun DolphinTheme( darkTheme: Boolean = isSystemInDarkTheme(), - content: - @Composable() - () -> Unit, + content: @Composable () -> Unit, ) { val colorScheme = when { diff --git a/build.gradle.kts b/build.gradle.kts index 9aa2a38e..f2004532 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,4 +7,4 @@ plugins { alias(libs.plugins.ksp) apply false alias(libs.plugins.kotlin.compose) apply false alias(libs.plugins.hilt) apply false -} \ No newline at end of file +}