pre-commit-opentofu/hooks
Michael Rosenfeld caab3b8701
fix(hooks): make env var regex portable
Adjust the regex used to detect ${ENV_VAR} patterns in
hooks/_common.sh to avoid Bash-incompatible constructs and to be
compatible with macOS/BSD regex behavior.

- Remove unnecessary leading/trailing '.*' since =~ matches substrings.
- Allow lowercase letters in subsequent identifier characters
  ([A-Za-z0-9_]) so variable names with lowercase chars are detected.
- Keep first-char restriction to uppercase or underscore to match
  existing extraction logic.

Signed-off-by: Michael Rosenfeld <mrosenfe@sheetz.com>
2026-06-12 15:26:10 -04:00
..
__init__.py feat: rename pre-commit-terraform to pre-commit-opentofu, pt VII 2024-01-17 01:02:15 +01:00
_common.sh fix(hooks): make env var regex portable 2026-06-12 15:26:10 -04:00
infracost_breakdown.sh fix: make infracost_breakdown.sh compatible with bash 3.2 (macOS) 2025-06-04 10:26:05 +02:00
terragrunt_fmt.sh fix: replace deprecated hclfmt with hcl format command 2025-10-09 17:21:49 +07:00
terragrunt_validate.sh feat: TFLint: Add --hook-config=--delegate-chdir to use tflint -chdir (#512) 2023-05-08 18:32:06 +03:00
terragrunt_validate_inputs.sh feat: support .tofu file extension and update hooks/tools 2026-05-24 22:06:26 -04:00
terrascan.sh feat: rename pre-commit-terraform to pre-commit-opentofu, pt III 2024-01-17 00:44:43 +01:00
tfupdate.sh feat: TFLint: Add --hook-config=--delegate-chdir to use tflint -chdir (#512) 2023-05-08 18:32:06 +03:00
tofu_checkov.sh feat: rename pre-commit-terraform to pre-commit-opentofu, pt VI 2024-01-17 00:56:38 +01:00
tofu_docs.sh fix: initialize config_file_no_color variable 2026-06-01 22:39:41 +01:00
tofu_docs_replace.py refactor: improve directory handling and tofu validate logic 2026-06-01 22:39:41 +01:00
tofu_fmt.sh feat: rename pre-commit-terraform to pre-commit-opentofu, pt VI 2024-01-17 00:56:38 +01:00
tofu_providers_lock.sh fix: docs 2024-01-21 21:19:16 +01:00
tofu_tflint.sh feat: rename pre-commit-terraform to pre-commit-opentofu, pt VI 2024-01-17 00:56:38 +01:00
tofu_tfsec.sh fix: docs 2024-01-21 21:19:16 +01:00
tofu_trivy.sh feat: rename pre-commit-terraform to pre-commit-opentofu, pt VI 2024-01-17 00:56:38 +01:00
tofu_validate.sh refactor: improve directory handling and tofu validate logic 2026-06-01 22:39:41 +01:00
tofu_wrapper_module_for_each.sh fix: expand file extension patterns for tofu hooks 2026-05-24 22:06:26 -04:00