Is <pre-commit> framework support planned for dete...
# detekt
k
Is pre-commit framework support planned for detekt? Of course I could write a local script and link via
repo: 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.
FTR my current
.pre-commit-config.yaml
Copy code
# 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
g
Nope that’s not on the roadmpa
👍 1