From 7a242d6fefd4151637bbaa9252df46c46c3ed51b Mon Sep 17 00:00:00 2001 From: Ross Buggins Date: Mon, 1 Jul 2024 09:40:21 +0100 Subject: [PATCH] Use env vars for pre commid entries. --- .tool-versions | 1 + scripts/config/pre-commit.yaml | 12 ++++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.tool-versions b/.tool-versions index 32db55a4..025dc0cc 100644 --- a/.tool-versions +++ b/.tool-versions @@ -2,6 +2,7 @@ terraform 1.7.0 pre-commit 3.6.0 +gitleaks 8.15.3 # ============================================================================== # The section below is reserved for Docker image versions. diff --git a/scripts/config/pre-commit.yaml b/scripts/config/pre-commit.yaml index 37ca6375..949cea26 100644 --- a/scripts/config/pre-commit.yaml +++ b/scripts/config/pre-commit.yaml @@ -3,32 +3,28 @@ repos: hooks: - id: scan-secrets name: Scan secrets - entry: ./scripts/githooks/scan-secrets.sh - args: ["check=staged-changes"] + entry: /bin/env check=whole-history ./scripts/githooks/scan-secrets.sh language: script pass_filenames: false - repo: local hooks: - id: check-file-format name: Check file format - entry: ./scripts/githooks/check-file-format.sh - args: ["check=staged-changes"] + entry: /bin/env check=staged-changes ./scripts/githooks/check-file-format.sh language: script pass_filenames: false - repo: local hooks: - id: check-markdown-format name: Check Markdown format - entry: ./scripts/githooks/check-markdown-format.sh - args: ["check=staged-changes"] + entry: /bin/env check=staged-changes ./scripts/githooks/check-markdown-format.sh language: script pass_filenames: false - repo: local hooks: - id: check-english-usage name: Check English usage - entry: ./scripts/githooks/check-english-usage.sh - args: ["check=staged-changes"] + entry: /bin/env check=staged-changes ./scripts/githooks/check-english-usage.sh language: script pass_filenames: false - repo: local