Skip to content

Commit a6faf75

Browse files
committed
Fix all Docker hooks syntax and add pass_filenames for validate
1 parent 881ff44 commit a6faf75

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

.pre-commit-hooks.yaml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@
197197
entry: ghcr.io/actuarysailor/pre-commit-terraform-tools:latest
198198
language: docker_image
199199
args: [terraform, validate]
200+
pass_filenames: false
200201
files: \.(tf|tofu|tfvars|terraform\.lock\.hcl)$
201202
exclude: \.terraform/.*$
202203

@@ -215,20 +216,18 @@
215216
description: >-
216217
Inserts input and output documentation into README.md using Docker.
217218
require_serial: true
218-
entry: terraform-docs
219+
entry: ghcr.io/actuarysailor/pre-commit-terraform-tools:latest
219220
language: docker_image
220-
docker_image: ghcr.io/actuarysailor/pre-commit-terraform-tools:latest
221-
args: [markdown, table, --output-file, README.md, .]
221+
args: [terraform-docs, markdown, table, --output-file, README.md, .]
222222
files: \.(tf|tofu|terraform\.lock\.hcl)$
223223
exclude: \.terraform/.*$
224224

225225
- id: terraform_checkov_docker
226226
name: Checkov (Docker)
227227
description: Runs checkov on Terraform templates using Docker.
228-
entry: checkov
228+
entry: ghcr.io/actuarysailor/pre-commit-terraform-tools:latest
229229
language: docker_image
230-
docker_image: ghcr.io/actuarysailor/pre-commit-terraform-tools:latest
231-
args: [-d, .]
230+
args: [checkov, -d, .]
232231
always_run: false
233232
files: \.(tf|tofu)$
234233
exclude: \.terraform/.*$
@@ -239,20 +238,18 @@
239238
description: >-
240239
Static analysis of Terraform templates to spot potential security issues using Docker.
241240
require_serial: true
242-
entry: trivy
241+
entry: ghcr.io/actuarysailor/pre-commit-terraform-tools:latest
243242
language: docker_image
244-
docker_image: ghcr.io/actuarysailor/pre-commit-terraform-tools:latest
245-
args: [config, .]
243+
args: [trivy, config, .]
246244
files: \.(tf|tofu|tfvars)$
247245
exclude: \.terraform/.*$
248246

249247
- id: infracost_breakdown_docker
250248
name: Infracost breakdown (Docker)
251249
description: Check terraform infrastructure cost using Docker.
252-
entry: infracost
250+
entry: ghcr.io/actuarysailor/pre-commit-terraform-tools:latest
253251
language: docker_image
254-
docker_image: ghcr.io/actuarysailor/pre-commit-terraform-tools:latest
255-
args: [breakdown, --path, .]
252+
args: [infracost, breakdown, --path, .]
256253
require_serial: true
257254
files: \.(tf|tofu|tfvars|hcl)$
258255
exclude: \.terraform/.*$

0 commit comments

Comments
 (0)