diff --git a/pre-commit-config.yaml b/.pre-commit-config.yaml similarity index 50% rename from pre-commit-config.yaml rename to .pre-commit-config.yaml index 06573a7b..92d6e662 100644 --- a/pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,19 +3,33 @@ repos: rev: v4.5.0 hooks: - id: trailing-whitespace + files: \.kt$ - id: end-of-file-fixer + files: \.kt$ - id: check-yaml - repo: local - hooks: + hooks: + - id: formatKotlin + name: formatKotlin + entry: sh -c './gradlew formatKotlin' + language: system + types: [kotlin] + files: \.kt$ + - id: ktlint name: ktlint - entry: ./gradlew lintKotlin + entry: sh -c './gradlew lintKotlin' language: system types: [kotlin] + files: \.kt$ - id: detekt name: detekt - entry: ./gradlew detekt + entry: sh -c './gradlew detekt' language: system types: [kotlin] + files: \.kt$ + + +