This commit streamlines the local developer workflow by enforcing automated quality checks pre-commit and speeding up test execution when development tools are present in the environment $PATH. - Add `.githooks/pre-commit` hook to automatically run the verification suite via `scripts/test` before committing. - Update `scripts/test` to check for locally available commands (`luacheck`, `ruff`, `pyright`) in PATH before falling back to `nix-shell`. - Add `luaPackages.luacheck` to developer packages in `home/dev.nix`. - Routine lockfile input revisions (`flake.lock`) update for: DankMaterialShell, dankcalendar, and home-manager.
13 lines
432 B
Bash
Executable File
13 lines
432 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# .githooks/pre-commit - Git pre-commit hook running automated quality checks
|
|
set -euo pipefail
|
|
|
|
# Ensure NixOS user profile binaries are in PATH
|
|
export PATH="/etc/profiles/per-user/${USER:-kiskaadee}/bin:$HOME/.nix-profile/bin:$PATH"
|
|
|
|
REPO_ROOT="$(git rev-parse --show-toplevel)"
|
|
cd "$REPO_ROOT"
|
|
|
|
echo "🚀 [pre-commit] Running automated verification & static analysis suite..."
|
|
exec "$REPO_ROOT/scripts/test"
|