Skip to content

Commit 0225754

Browse files
authored
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
1 parent a2d2016 commit 0225754

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.pre-commit-hooks.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
entry: hooks/terraform-fmt.sh
77
language: script
88
files: \.tf$
9-
exclude: \.+.terraform\/.*$
9+
exclude: \.terraform\/.*$
1010
require_serial: true
1111

1212
- id: terraform-validate
@@ -15,7 +15,7 @@
1515
entry: hooks/terraform-validate.sh
1616
language: script
1717
files: \.tf$
18-
exclude: \.+.terraform\/.*$
18+
exclude: \.terraform\/.*$
1919
require_serial: true
2020

2121
- id: packer-validate
@@ -32,7 +32,7 @@
3232
entry: hooks/tflint.sh
3333
language: script
3434
files: \.tf$
35-
exclude: \.+.terraform\/.*$
35+
exclude: \.terraform\/.*$
3636

3737
- id: terragrunt-hclfmt
3838
name: Terragrunt hclfmt
@@ -42,8 +42,8 @@
4242
files: \.hcl$
4343
exclude: >
4444
(?x)^(
45-
.+\.terraform\/.*$|
46-
.+\.terragrunt-cache\/.*$|
45+
\.terraform\/.*|
46+
\.terragrunt-cache\/.*|
4747
)$
4848
4949
- id: shellcheck

0 commit comments

Comments
 (0)