Files
lg-smtv-mcp/.githooks/pre-commit
T
kiskaadee a5d69eb37d ci(lint): enforce ruff format --check in pre-commit hook and flake check
- .githooks/pre-commit: add ruff format --check . alongside ruff check, pyright, and pytest
- flake.nix: add ruff format --check . to packages.default preCheck
- AGENTS.md: update Section 5 verification rules to include ruff format --check
2026-11-15 12:43:57 -05:00

12 lines
314 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
if command -v ruff >/dev/null 2>&1 && command -v pyright >/dev/null 2>&1 && command -v pytest >/dev/null 2>&1; then
ruff check .
ruff format --check .
pyright
pytest
else
nix develop --command bash -c "ruff check . && ruff format --check . && pyright && pytest"
fi