Kim
02/24/2025, 3:48 AMrepo: local
as in the guides but would be nice to have some sensible default hooks support with .pre-commit-hooks.yaml
at the repo top level.Kim
02/24/2025, 3:50 AM.pre-commit-config.yaml
Kim
02/24/2025, 3:50 AM# See <https://pre-commit.com> for more information
# See <https://pre-commit.com/hooks.html> for more hooks
repos:
# <https://github.com/facebook/ktfmt/issues/255#issuecomment-1959086167>
- repo: <https://github.com/macisamuele/language-formatters-pre-commit-hooks>
rev: v2.14.0
hooks:
- id: pretty-format-kotlin
files: "^.*.(kts|kt)$"
name: Kotlin formatter
args: [ --ktfmt, --ktfmt-style=kotlinlang ]
# <https://github.com/swiftlang/swift-format/pull/712>
- repo: <https://github.com/swiftlang/swift-format>
rev: 601.0.0-prerelease-2025-02-12
hooks:
- id: swift-format
name: Swift formatter
# <https://detekt.dev/docs/gettingstarted/git-pre-commit-hook/>
- repo: local
hooks:
- id: detekt
name: Kotlin linter
description: Runs `detekt` on all .kt files.
language: script
entry: android/scripts/detekt.sh
files: \.kt
# <https://github.com/realm/SwiftLint?tab=readme-ov-file#git-pre-commit-hook>
- repo: <https://github.com/realm/SwiftLint>
rev: 0.58.2
hooks:
- id: swiftlint
name: Swift Linter
gammax
02/25/2025, 11:23 AM