Files
lg-smtv-mcp/.githooks/pre-commit
T
kiskaadee 98ffc65cb1 build(nix): deduplicate runtime/test deps and add pre-commit check hook
- flake.nix: extract shared runtimeDeps and testDeps lists for packages.default (with pytestCheckHook) and devShells.default, and configure git core.hooksPath in shellHook
- .githooks/pre-commit: run ruff check, pyright, pytest, and nix flake check before each commit
2026-11-15 12:11:53 -05:00

13 lines
282 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 .
pyright
pytest
else
nix develop --command bash -c "ruff check . && pyright && pytest"
fi
nix flake check