- .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
12 lines
314 B
Bash
Executable File
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
|