sdforge 0.3.1

Multi-protocol SDK framework with unified macro configuration
# Pre-commit hooks for SDForge Rust Project
# Install: pip install pre-commit && pre-commit install
# Docs: https://pre-commit.com/

repos:
  # 1. Basic file checks
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
      - id: trailing-whitespace
        args: [--markdown-linebreak-ext=md]
      - id: end-of-file-fixer
      - id: check-yaml
      - id: check-toml
      - id: check-added-large-files
        args: ['--maxkb=1000']
      - id: detect-private-key
      - id: check-merge-conflict
        args: ['--assume-in-merge']
      - id: no-commit-to-branch
        args: ['--branch', 'main', '--branch', 'master']

  # 2. Detect secrets (with baseline for known false positives)
  - repo: https://github.com/Yelp/detect-secrets
    rev: v1.5.0
    hooks:
      - id: detect-secrets
        args: [--baseline, .secrets.baseline]
        exclude: '^Cargo\.lock$'

  # 3. Rust formatting and checks
  - repo: local
    hooks:
      - id: cargo-fmt
        name: Format Rust code
        description: Run rustfmt on Rust files (workspace only)
        entry: cargo fmt -- --check
        language: system
        types: [rust]
        pass_filenames: false

      - id: cargo-check
        name: cargo check
        entry: cargo check --all-features --workspace
        language: system
        types: [rust]
        pass_filenames: false

      - id: cargo-clippy
        name: cargo clippy
        entry: cargo clippy --all-targets --all-features --workspace -- -D warnings
        language: system
        types: [rust]
        pass_filenames: false

ci:
  autoupdate_commit_msg: "chore: update pre-commit hooks"