aboutsummaryrefslogtreecommitdiff
path: root/hooks/settings.json
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/settings.json')
-rw-r--r--hooks/settings.json19
1 files changed, 19 insertions, 0 deletions
diff --git a/hooks/settings.json b/hooks/settings.json
new file mode 100644
index 0000000..50fdf09
--- /dev/null
+++ b/hooks/settings.json
@@ -0,0 +1,19 @@
+{
+ "hooks": {
+ "PostEditTool": [
+ {
+ "matcher": "**/*.py",
+ "command": "ruff format $FILE && ruff check --fix $FILE"
+ },
+ {
+ "matcher": "**/*.tf",
+ "command": "terraform fmt $FILE"
+ }
+ ],
+ "PreCommit": [
+ {
+ "command": "! grep -rn --include='*.py' --include='*.ts' --include='*.tsx' --include='*.tf' --include='*.yml' --include='*.yaml' -E '(AKIA[0-9A-Z]{16}|sk-[a-zA-Z0-9]{20,}|password\\s*=\\s*[\"'\\'']{1}[^\"'\\'']+[\"'\\'']{1})' . --exclude-dir=node_modules --exclude-dir=.git --exclude-dir=gathered"
+ }
+ ]
+ }
+}