repos:
  # File structure and format validators
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
      - id: trailing-whitespace
        name: trailing-whitespace
        exclude: ^\.venv/
      - id: end-of-file-fixer
        name: end-of-file-fixer
        exclude: ^\.venv/
      - id: check-yaml
        name: check-yaml
        exclude: ^\.venv/
      - id: check-toml
        name: check-toml
        exclude: ^\.venv/
      - id: check-added-large-files
        name: check-added-large-files
        exclude: ^\.venv/
  - repo: https://github.com/astral-sh/uv-pre-commit
    rev: 0.8.14
    hooks:
      - id: uv-lock
        files: ^pyproject\.toml$
  # Security checks
  - repo: https://github.com/gitleaks/gitleaks
    rev: v8.28.0
    hooks:
      - id: gitleaks
        exclude: uv\.lock|pyproject\.toml|tests/.*|docs/.*|.*\.md
  # Security checks
  - repo: https://github.com/PyCQA/bandit
    rev: 1.8.6
    hooks:
      - id: bandit
        args: ["-c", "pyproject.toml", "-r", "-ll"]
        files: ^crackerjack/.*\.py$
        stages: ["pre-push", "manual"]
  # Code formatting and quality
  - repo: https://github.com/codespell-project/codespell
    rev: v2.4.1
    hooks:
      - id: codespell
        exclude: ^\.venv/
        additional_dependencies: ["tomli"]
  # Code formatting and quality
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.12.11
    hooks:
      - id: ruff-check
        exclude: ^\.venv/
      - id: ruff-format
        exclude: ^\.venv/
  # Code formatting and quality
  - repo: https://github.com/executablebooks/mdformat
    rev: 0.7.22
    hooks:
      - id: mdformat
        exclude: ^\.venv/
        additional_dependencies: ["mdformat-ruff"]
  - repo: https://github.com/jendrikseipp/vulture
    rev: v2.14
    hooks:
      - id: vulture
        files: ^crackerjack/.*\.py$
        stages: ["pre-push", "manual"]
  - repo: https://github.com/fredrikaverpil/creosote
    rev: v4.1.0
    hooks:
      - id: creosote
        exclude: ^\.venv/
        stages: ["pre-push", "manual"]
  - repo: https://github.com/rohaquinlop/complexipy-pre-commit
    rev: v3.3.0
    hooks:
      - id: complexipy
        args: ["-d", "low"]
        files: ^crackerjack/.*\.py$
        exclude: ^(\.venv/|tests/)
        stages: ["pre-push", "manual"]
  - repo: https://github.com/dosisod/refurb
    rev: v2.1.0
    hooks:
      - id: refurb
        args: ["--ignore", "FURB184", "--ignore", "FURB120"]
        files: ^crackerjack/.*\.py$
        exclude: ^tests/.*\.py$
        stages: ["pre-push", "manual"]
  - repo: https://github.com/RobertCraigie/pyright-python
    rev: v1.1.404
    hooks:
      - id: pyright
        files: ^crackerjack/.*\.py$
        exclude: ^crackerjack/(mcp|plugins)/.*\.py$|crackerjack/code_cleaner\.py$
        stages: ["pre-push", "manual"]
