From 55e41cc2cf959d5da4f830038b17d56a374f66f1 Mon Sep 17 00:00:00 2001 From: Travis Johnson Date: Wed, 18 Sep 2024 14:57:55 -0500 Subject: [PATCH 1/2] Fix exclude regular expressions the current expressions look like a typo? They require one or more literal '.'s, followed by one of any symbol, then "terraform". I reasoned that the `.+` at the start was entirely superfluous and just check for the `.terraform/` --- .pre-commit-hooks.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 76e78365..21437683 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -6,7 +6,7 @@ entry: hooks/terraform-fmt.sh language: script files: \.tf$ - exclude: \.+.terraform\/.*$ + exclude: \.terraform\/.*$ require_serial: true - id: terraform-validate @@ -15,7 +15,7 @@ entry: hooks/terraform-validate.sh language: script files: \.tf$ - exclude: \.+.terraform\/.*$ + exclude: \.terraform\/.*$ require_serial: true - id: packer-validate @@ -32,7 +32,7 @@ entry: hooks/tflint.sh language: script files: \.tf$ - exclude: \.+.terraform\/.*$ + exclude: \.terraform\/.*$ - id: terragrunt-hclfmt name: Terragrunt hclfmt @@ -42,8 +42,8 @@ files: \.hcl$ exclude: > (?x)^( - .+\.terraform\/.*$| - .+\.terragrunt-cache\/.*$| + \.terraform\/.*$| + \.terragrunt-cache\/.*$| )$ - id: shellcheck From ea8fcf1d6bbe917933e4898f8d78b5f6850af099 Mon Sep 17 00:00:00 2001 From: Travis Johnson Date: Wed, 18 Sep 2024 16:25:52 -0400 Subject: [PATCH 2/2] delete extra $'s --- .pre-commit-hooks.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 21437683..e7af877d 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -42,8 +42,8 @@ files: \.hcl$ exclude: > (?x)^( - \.terraform\/.*$| - \.terragrunt-cache\/.*$| + \.terraform\/.*| + \.terragrunt-cache\/.*| )$ - id: shellcheck