From 0225754079df7cc99525ead1decb5a8e92ecb158 Mon Sep 17 00:00:00 2001 From: Travis Johnson Date: Mon, 16 Dec 2024 06:01:11 -0500 Subject: [PATCH] Fix exclude regular expressions (#117) * 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/` * delete extra $'s --- .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..e7af877d 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