repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
      - id: no-commit-to-branch # prevent direct commits to main branch
      - id: check-yaml
        args: ['--unsafe']
      - id: check-toml
      - id: end-of-file-fixer
      - id: trailing-whitespace

  - repo: https://github.com/codespell-project/codespell
    rev: v2.4.1
    hooks:
      - id: codespell
        additional_dependencies:
          - tomli
        exclude: '^uv\.lock$'

  - repo: https://github.com/DavidAnson/markdownlint-cli2
    rev: v0.18.1
    hooks:
      - id: markdownlint-cli2

  - repo: https://github.com/google/yamlfmt
    rev: v0.21.0
    hooks:
      - id: yamlfmt

  - repo: https://github.com/zizmorcore/zizmor-pre-commit
    rev: v1.23.1
    hooks:
      - id: zizmor

  - repo: local
    hooks:
      - id: lint
        name: Lint
        entry: make lint-python
        types: [python]
        language: system
        pass_filenames: false
      - id: lint rust
        name: Lint Rust
        entry: make lint-rust
        types: [rust]
        language: system
        pass_filenames: false
      - id: typecheck
        name: Typecheck
        entry: uv run pyright pydantic
        types: [python]
        language: system
        pass_filenames: false
