Compare commits
5 Commits
f930ea68f6
...
22244bd21a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22244bd21a | ||
|
|
b90d656e24 | ||
|
|
1c9f4b8fcc | ||
|
|
ad1ace8910 | ||
|
|
28e4005378 |
@ -10,7 +10,7 @@ repos:
|
||||
hooks:
|
||||
- id: rust-fmt
|
||||
name: Rust formatting (cargo +nightly fmt)
|
||||
entry: bash -c 'cargo +nightly fmt --all -- --check'
|
||||
entry: bash -c 'if [ -f platform/Cargo.toml ]; then cd platform && cargo +nightly fmt --all -- --check; fi'
|
||||
language: system
|
||||
types: [rust]
|
||||
pass_filenames: false
|
||||
@ -18,26 +18,30 @@ repos:
|
||||
|
||||
- id: rust-clippy
|
||||
name: Rust linting (cargo clippy)
|
||||
entry: bash -c 'cargo clippy --all-targets -- -D warnings'
|
||||
entry: bash -c 'if [ -f platform/Cargo.toml ]; then cd platform && cargo clippy --all-targets -- -D warnings; 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: 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: cargo-deny
|
||||
name: Cargo deny (licenses & advisories)
|
||||
entry: bash -c 'cargo deny check licenses advisories'
|
||||
language: system
|
||||
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]
|
||||
|
||||
# ============================================================================
|
||||
# Nushell Hooks (optional - enable if using Nushell)
|
||||
@ -89,27 +93,8 @@ repos:
|
||||
# ============================================================================
|
||||
# Markdown Hooks
|
||||
# ============================================================================
|
||||
- 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]
|
||||
# NOTE: Markdown linting moved to pre-commit phase (too slow for pre-push)
|
||||
# See provisioning/core/.pre-commit-config.yaml for active markdown validation
|
||||
|
||||
# ============================================================================
|
||||
# General Pre-commit Hooks
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user