# Local git hooks for llmenv, managed by prek (https://github.com/j178/prek).
# Install after cloning:  prek install --hook-type pre-commit --hook-type pre-push
#
# fmt on commit (fast); clippy on push (fast on incremental builds).
# Tests and cargo-deny run in CI only (slow full rebuild).
repos:
  - repo: local
    hooks:
      - id: cargo-fmt
        name: cargo fmt --check
        entry: cargo fmt --check
        language: system
        pass_filenames: false
        stages: [pre-commit]
      - id: cargo-clippy
        name: cargo clippy
        entry: bash -c 'cargo clippy --all-features --tests --jobs "$(scripts/core_count.sh)" -- -D warnings'
        language: system
        pass_filenames: false
        stages: [pre-push]
