oxcache 0.2.0

A high-performance multi-level cache library for Rust with L1 (memory) and L2 (Redis) caching.
# Pre-commit hooks for Oxcache 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: v5.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']
      - id: mixed-line-ending
        args: ['--fix=lf']

  # 2. Detect secrets
  - repo: https://github.com/Yelp/detect-secrets
    rev: v1.5.0
    hooks:
      - id: detect-secrets
        args: [--exclude-files, tests/, --exclude-files, docs/, --exclude-files, src/utils/redaction.rs, --exclude-files, src/utils/security_log.rs, --exclude-files, src/database/connection_string.rs]
        exclude: '^Cargo\.lock$'

  # 3. Rust formatting and checks
  - repo: local
    hooks:
      - id: cargo-fmt
        name: Format Rust code
        description: Check Rust formatting with rustfmt
        entry: rustfmt --check
        language: system
        types: [rust]
        pass_filenames: false
        stages: [pre-push]

      - id: cargo-check
        name: cargo check
        entry: cargo check --lib
        language: system
        types: [rust]
        pass_filenames: false
        stages: [pre-push]

      - id: cargo-clippy
        name: cargo clippy
        entry: cargo clippy --lib
        language: system
        types: [rust]
        pass_filenames: false
        args: ['--', '-D', 'warnings']
        stages: [pre-push]

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