geode-client 0.1.1-alpha.20

Rust client library for Geode graph database with full GQL support
Documentation
# Pre-commit configuration for Geode Rust Client
# https://pre-commit.com/
#
# Install: pip install pre-commit && pre-commit install
# Run manually: pre-commit run --all-files
# Update hooks: pre-commit autoupdate

default_stages: [pre-commit]
fail_fast: false

repos:
  # =============================================================================
  # Standard pre-commit hooks (best practices)
  # =============================================================================
- repo: https://github.com/pre-commit/pre-commit-hooks
  rev: v5.0.0
  hooks:
      # Formatting
  - id: trailing-whitespace
    args: [--markdown-linebreak-ext=md]
    exclude: ^(target/|fuzz/corpus/)
  - id: end-of-file-fixer
    exclude: ^(target/|fuzz/corpus/|.*\.bin$|.*\.der$|.*\.pem$)
  - id: mixed-line-ending
    args: [--fix=lf]
    exclude: ^(target/)

      # Syntax validation
  - id: check-yaml
    args: [--unsafe]      # Allow custom tags
  - id: check-json
    exclude: ^(target/)
  - id: check-toml

      # Security
  - id: detect-private-key
    exclude: ^(certs/|test.*certs/|.*test.*\.pem$)
  - id: check-added-large-files
    args: [--maxkb=1024]
    exclude: ^(target/)

      # Git hygiene
  - id: check-merge-conflict
  - id: check-case-conflict
  - id: check-symlinks
  - id: destroyed-symlinks

      # Code quality
  - id: check-executables-have-shebangs
    exclude: ^(target/)
  - id: check-shebang-scripts-are-executable

  # =============================================================================
  # Shell script linting
  # =============================================================================
- repo: https://github.com/shellcheck-py/shellcheck-py
  rev: v0.10.0.1
  hooks:
  - id: shellcheck
    args: [--severity=warning]

  # =============================================================================
  # Markdown linting
  # =============================================================================
- repo: https://github.com/igorshubovych/markdownlint-cli
  rev: v0.43.0
  hooks:
  - id: markdownlint
    args: [--fix, --disable, MD013, MD033, MD041, MD024, --]
    exclude: ^(CHANGELOG\.md)

  # =============================================================================
  # YAML formatting
  # =============================================================================
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
  rev: v2.14.0
  hooks:
  - id: pretty-format-yaml
    args: [--autofix, --indent, '2']
    exclude: ^(\.gitlab-ci\.yml|docker-compose.*\.yml)

  # =============================================================================
  # Dockerfile linting
  # =============================================================================
- repo: https://github.com/hadolint/hadolint
  rev: v2.12.0
  hooks:
  - id: hadolint-docker
    args: [--ignore, DL3008, --ignore, DL3013, --ignore, DL3015, --ignore, DL3018]

  # =============================================================================
  # Commit message validation (Conventional Commits)
  # =============================================================================
- repo: https://github.com/commitizen-tools/commitizen
  rev: v4.1.0
  hooks:
  - id: commitizen
    stages: [commit-msg]

  # =============================================================================
  # Local/Custom hooks for Rust
  # =============================================================================
- repo: local
  hooks:
      # Rust formatting check
  - id: cargo-fmt
    name: cargo fmt (check)
    entry: cargo fmt -- --check
    language: system
    files: \.rs$
    exclude: ^(target/)
    pass_filenames: false

      # Rust linting with clippy
  - id: cargo-clippy
    name: cargo clippy
    entry: cargo clippy --all-targets --all-features -- -D warnings
    language: system
    files: \.(rs|toml)$
    exclude: ^(target/)
    pass_filenames: false
    stages: [pre-commit]

      # Rust build check (compilation)
  - id: cargo-check
    name: cargo check
    entry: cargo check --all-targets --all-features
    language: system
    files: \.(rs|toml)$
    exclude: ^(target/)
    pass_filenames: false
    stages: [pre-commit]

      # Unit tests (on pre-push only - may be slow)
  - id: cargo-test
    name: cargo test
    entry: cargo test --lib
    language: system
    files: \.(rs|toml)$
    exclude: ^(target/)
    pass_filenames: false
    stages: [pre-push]

      # Property-based tests (on pre-push only)
  - id: cargo-test-proptest
    name: cargo test proptest
    entry: cargo test --test proptest
    language: system
    files: \.(rs|toml)$
    exclude: ^(target/)
    pass_filenames: false
    stages: [pre-push]

      # Check for TODO/FIXME in committed code (warning only)
  - id: check-todos
    name: check for TODOs/FIXMEs
    entry: bash
    args:
    - -c
    - |
      git diff --cached --name-only | xargs grep -l -E "(TODO|FIXME|XXX|HACK)" 2>/dev/null && echo "Warning: Found TODO/FIXME markers in staged files" && exit 0 || exit 0
    language: system
    pass_filenames: false
    verbose: true

# =============================================================================
# CI configuration
# =============================================================================
ci:
  autofix_prs: true
  autofix_commit_msg: |
    [pre-commit.ci] auto fixes from pre-commit hooks

    For more info see https://pre-commit.ci
  autoupdate_branch: ''
  autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
  autoupdate_schedule: weekly
  skip: [cargo-fmt, cargo-clippy, cargo-check, cargo-test, cargo-test-proptest]
  submodules: false