Compare commits

..

No commits in common. "22244bd21a1952dc7978f06ad0e353d96de8d2d6" and "f930ea68f62ae252a2660fdfef4833010d8336ad" have entirely different histories.

2 changed files with 37 additions and 22 deletions

View File

@ -10,7 +10,7 @@ repos:
hooks:
- id: rust-fmt
name: Rust formatting (cargo +nightly fmt)
entry: bash -c 'if [ -f platform/Cargo.toml ]; then cd platform && cargo +nightly fmt --all -- --check; fi'
entry: bash -c 'cargo +nightly fmt --all -- --check'
language: system
types: [rust]
pass_filenames: false
@ -18,30 +18,26 @@ repos:
- id: rust-clippy
name: Rust linting (cargo clippy)
entry: bash -c 'if [ -f platform/Cargo.toml ]; then cd platform && cargo clippy --all-targets -- -D warnings; fi'
entry: bash -c 'cargo clippy --all-targets -- -D warnings'
language: system
types: [rust]
pass_filenames: false
stages: [pre-push]
# NOTE: Disabled - cargo test blocks git push. Tests should run in CI/CD.
# - id: rust-test
# name: Rust tests
# entry: bash -c 'if [ -f platform/Cargo.toml ]; then cd platform && cargo test --workspace; fi'
# language: system
# types: [rust]
# pass_filenames: false
# stages: [pre-push]
- id: rust-test
name: Rust tests
entry: bash -c 'cargo test --workspace'
language: system
types: [rust]
pass_filenames: false
stages: [pre-push]
# NOTE: cargo-deny config needs migration to latest version
# See: https://github.com/EmbarkStudios/cargo-deny/pull/611
# Disabled until deny.toml is updated to current format
# - id: cargo-deny
# name: Cargo deny (licenses & advisories)
# entry: bash -c 'if [ -f Cargo.toml ]; then cargo deny check; elif [ -f platform/Cargo.toml ]; then cd platform && cargo deny check; fi'
# language: system
# pass_filenames: false
# stages: [pre-push]
- id: cargo-deny
name: Cargo deny (licenses & advisories)
entry: bash -c 'cargo deny check licenses advisories'
language: system
pass_filenames: false
stages: [pre-push]
# ============================================================================
# Nushell Hooks (optional - enable if using Nushell)
@ -93,8 +89,27 @@ repos:
# ============================================================================
# Markdown Hooks
# ============================================================================
# NOTE: Markdown linting moved to pre-commit phase (too slow for pre-push)
# See provisioning/core/.pre-commit-config.yaml for active markdown validation
- repo: local
hooks:
- id: markdownlint
name: Markdown linting (markdownlint-cli2)
entry: markdownlint-cli2 --config .markdownlint-cli2.jsonc docs/
language: system
types: [markdown]
pass_filenames: false
stages: [pre-commit]
# NOTE: Malformed closing fences check disabled
# All 4,043 instances were fixed in 2025-01-09
# Markdownlint doesn't catch this natively (see config comments)
# Requires Python for proper state tracking, which is not desired
# - id: check-markdown-fences
# name: Check malformed code fences
# entry: .githooks/check-markdown-fences.sh
# language: system
# types: [markdown]
# pass_filenames: true
# stages: [commit]
# ============================================================================
# General Pre-commit Hooks