chore: add suspicious_patterns to .scripts/pre-hook and not-suspicious filter (#525)

* chore: add suspicious_patterns to .scripts/pre-hook and not-suspicious filter

* rm: kill annoying checkpatterns job

* chore: cleanup

---------

Co-authored-by: RichardAH <richard.holland@starstone.co.nz>
This commit is contained in:
Niq Dudfield
2025-07-01 17:58:06 +07:00
committed by GitHub
parent a1d42b7380
commit 1233694b6c
4 changed files with 122 additions and 28 deletions

12
.githooks/pre-commit Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
# Pre-commit hook that runs the suspicious patterns check on staged files
# Get the repository's root directory
repo_root=$(git rev-parse --show-toplevel)
# Run the suspicious patterns script in pre-commit mode
"$repo_root/suspicious_patterns.sh" --pre-commit
# Exit with the same code as the script
exit $?