From 79efaeab40be7f37d8bc99cae78b4287f449e84e Mon Sep 17 00:00:00 2001 From: Niel Markwick Date: Thu, 27 Jun 2024 18:40:59 +0200 Subject: [PATCH] chore: improve markdown-link-checker speed (#329) ignore CHANGELOG.md file and links to console.cloud.google.com --- markdown-link-checker.json | 16 ++++++++++++++++ package.json | 2 +- terraform/gke/README.md | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 markdown-link-checker.json diff --git a/markdown-link-checker.json b/markdown-link-checker.json new file mode 100644 index 00000000..1f1e5065 --- /dev/null +++ b/markdown-link-checker.json @@ -0,0 +1,16 @@ +{ + "ignorePatterns": [ + { + "pattern": "^https://console.cloud.google.com/" + }, + { + "pattern": "^https://example.org" + } + ], + "replacementPatterns": [ + { + "pattern": "^([./].*)/(#.*)?$", + "replacement": "$1/__LOCAL_URL_MUST_END_IN_FILENAME_NOT_RAW_PATH__$2" + } + ] +} diff --git a/package.json b/package.json index 68a2fc48..c75b8186 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "eslint-fix": "eslint --fix .", "format": "prettier --write .", "install-all": "npm install --save", - "markdown-link-check": "find . -name '*.md' -not \\( -path './node_modules/*' -o -path '*/.terraform/*' -prune \\) -print0 | xargs --null -n1 markdown-link-check --quiet", + "markdown-link-check": "find . -name '*.md' -not \\( -path './node_modules/*' -o -path '*/.terraform/*' -o -path './CHANGELOG.md' -prune \\) -print0 | xargs --null markdown-link-check --config markdown-link-checker.json --quiet", "mdlint": "markdownlint '**/*.md' --config .mdl.json --ignore '**/node_modules/**' --ignore 'code-of-conduct.md' --ignore 'CHANGELOG.md'", "poller-job": "node -e \"require('./src/poller/index').main()\"", "prepare": "{ git rev-parse --is-inside-work-tree >/dev/null 2>/dev/null && test \"$NODE_ENV\" != production -a \"$CI\" != true && husky ; } || true", diff --git a/terraform/gke/README.md b/terraform/gke/README.md index 9492ee4f..338cad7a 100644 --- a/terraform/gke/README.md +++ b/terraform/gke/README.md @@ -700,7 +700,7 @@ following the instructions above. [architecture-gke]: ../../resources/architecture-gke.png [autoscaler-poller]: ../../src/poller/README.md -[autoscaler-config-params]: ../../src/poller/#configuration-parameters +[autoscaler-config-params]: ../../src/poller/README.md#configuration-parameters [cron-frequent]: ../../kubernetes/decoupled/autoscaler-pkg/poller/poller.yaml [cron-hourly]: ../../kubernetes/decoupled/autoscaler-pkg/poller/poller-hourly.yaml [margins]: ../../src/poller/README.md#margins