chore: migrate pre-commit hooks to lefthook for improved performance and consistency

This commit is contained in:
GitHub Actions
2026-03-07 02:20:29 +00:00
parent 37471141e8
commit c665f62700
23 changed files with 414 additions and 270 deletions

View File

@@ -15,7 +15,7 @@ check_sarif() {
if [ ! -f "$sarif_file" ]; then
echo -e "${RED}❌ No SARIF file found: $sarif_file${NC}"
echo "Run CodeQL scan first: pre-commit run --hook-stage manual codeql-$lang-scan --all-files"
echo "Run CodeQL scan first: lefthook run pre-commit (which includes codeql-$lang-scan) or run `lefthook run codeql`"
FAILED=1
return 1
fi
@@ -96,7 +96,7 @@ check_sarif() {
fi
else
echo -e "${RED}❌ jq is required for semantic CodeQL severity evaluation (${lang})${NC}"
echo "Install jq and re-run: pre-commit run --hook-stage manual codeql-check-findings --all-files"
echo "Install jq and re-run: lefthook run pre-commit"
FAILED=1
fi
}
@@ -106,7 +106,7 @@ echo ""
if ! command -v jq &> /dev/null; then
echo -e "${RED}❌ jq is required for CodeQL finding checks${NC}"
echo "Install jq and re-run: pre-commit run --hook-stage manual codeql-check-findings --all-files"
echo "Install jq and re-run: lefthook run pre-commit"
exit 1
fi

View File

@@ -68,4 +68,4 @@ echo -e "${GREEN}✅ Extraction parity OK${NC} (compiled baseline=$BASELINE_COUN
echo -e "${GREEN}✅ CodeQL Go scan complete${NC}"
echo "Results saved to: codeql-results-go.sarif"
echo ""
echo "Run 'pre-commit run codeql-check-findings' to validate findings"
echo "Run 'lefthook run pre-commit' (or `lefthook run pre-commit` which includes codeql-check-findings) to validate findings"

View File

@@ -38,4 +38,4 @@ codeql database analyze codeql-db-js \
echo -e "${GREEN}✅ CodeQL JavaScript/TypeScript scan complete${NC}"
echo "Results saved to: codeql-results-js.sarif"
echo ""
echo "Run 'pre-commit run codeql-check-findings' to validate findings"
echo "Run 'lefthook run pre-commit' (or `lefthook run pre-commit` which includes codeql-check-findings) to validate findings"