repos:
  # Rust formatting and linting
  - repo: https://github.com/doublify/pre-commit-rust
    rev: v1.0
    hooks:
      - id: fmt
        name: Rust fmt
        description: Format Rust code with cargo fmt
      - id: clippy
        name: Rust clippy
        description: Lint Rust code with cargo clippy
        args: ['--all-targets', '--all-features', '--', '-D', 'warnings']

  # Python formatting and linting with ruff
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.8.4
    hooks:
      - id: ruff
        name: Ruff linter
        description: Run ruff linter
        args: [--fix]
      - id: ruff-format
        name: Ruff formatter
        description: Run ruff formatter

  # Check for common issues
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: check-yaml
      - id: check-toml
      - id: check-added-large-files
        args: ['--maxkb=1000']
      - id: check-merge-conflict
