From be3ccd1e3faf12c03939bb1c3f972092b187385e Mon Sep 17 00:00:00 2001 From: aidenvaines-cgi Date: Tue, 10 Mar 2026 12:24:34 +0000 Subject: [PATCH] CCM-14307 Fixing Hook path for TF Lint --- docs/package.json | 21 ++++++++------------- scripts/config/pre-commit.yaml | 10 ++++++++-- scripts/terraform/terraform.lib.sh | 2 +- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/docs/package.json b/docs/package.json index 785304f..a7e0b32 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,20 +1,15 @@ { - "name": "nhs-notify", - "version": "1.0.0", + "author": "", + "dependencies": {}, "description": "", + "devDependencies": {}, + "engines": {}, + "keywords": [], + "license": "ISC", + "name": "nhs-notify", "private": true, - "engines": { - }, - "scripts": { "debug": "JEKYLL_ENV=development BUNDLE_GEMFILE=Gemfile bundle exec jekyll serve --config _config.yml,_config.dev.yml --limit_posts 100 --trace --livereload" - - }, - "keywords": [], - "author": "", - "license": "ISC", - "devDependencies": { }, - "dependencies": { - } + "version": "1.0.0" } diff --git a/scripts/config/pre-commit.yaml b/scripts/config/pre-commit.yaml index 9c5e690..f966702 100644 --- a/scripts/config/pre-commit.yaml +++ b/scripts/config/pre-commit.yaml @@ -13,8 +13,14 @@ repos: - id: mixed-line-ending - id: pretty-format-json args: ['--autofix'] - exclude: '(^|/)package(-lock)?\.json$' - # - id: ... + exclude: | + (?x)^( + .*/?package-lock\.json | + \.vscode/.*\.json | + \.devcontainer/.*\.json | + docs/\.vscode/.*\.json | + docs/adr/assets/ADR-003/.*\.json + )$ - repo: local hooks: - id: sort-dictionary diff --git a/scripts/terraform/terraform.lib.sh b/scripts/terraform/terraform.lib.sh index 1f0aeb4..8a488bf 100644 --- a/scripts/terraform/terraform.lib.sh +++ b/scripts/terraform/terraform.lib.sh @@ -53,7 +53,7 @@ function terraform-destroy() { # dir=[path to a directory where the command will be executed, relative to the project's top-level directory, default is '.'] # opts=[options to pass to the Terraform fmt command, default is '-recursive'] function terraform-fmt() { - for d in "${PWD}infrastructure/"*; do + for d in "${PWD}/infrastructure/"*; do if [ -d "$d" ]; then terraform fmt --recursive "${d}" fi