This commit is contained in:
Danilo Reyes
2025-11-02 01:47:25 -06:00
parent 48020b6f42
commit 010df31455
45 changed files with 8045 additions and 720 deletions

View File

@@ -20,23 +20,12 @@ cat > "$HOOKS_DIR/pre-commit" << 'EOF'
echo "🔍 Running pre-commit linting..."
echo ""
# Try to use nix run if available, otherwise use script directly
if command -v nix &> /dev/null && [ -f "flake.nix" ]; then
# Use nix run for consistent environment
if ! nix run .#lint; then
echo ""
echo "❌ Linting failed. Fix errors or use --no-verify to skip."
echo " Auto-fix: nix run .#lint-fix"
exit 1
fi
else
# Fallback to script
if ! ./scripts/lint.sh; then
echo ""
echo "❌ Linting failed. Fix errors or use --no-verify to skip."
echo " Auto-fix: ./scripts/lint.sh --fix"
exit 1
fi
# Use nix flake linting for consistency
if ! nix run .#lint; then
echo ""
echo "❌ Linting failed. Fix errors or use --no-verify to skip."
echo " Auto-fix: nix run .#lint-fix"
exit 1
fi
echo ""