From f6add206d13b377dbe099a28b04985c262cf44ba Mon Sep 17 00:00:00 2001 From: Sebastian Romero Date: Fri, 17 May 2024 09:50:41 +0200 Subject: [PATCH 1/2] Add config to ingore _unlisted folders --- scripts/validation/config/config-generic.yml | 5 ++++- scripts/validation/validate.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/validation/config/config-generic.yml b/scripts/validation/config/config-generic.yml index d7fa41e66e..44ab1cd52a 100644 --- a/scripts/validation/config/config-generic.yml +++ b/scripts/validation/config/config-generic.yml @@ -22,4 +22,7 @@ verbose: true debug: false # Defines rules for what links not to check. Usually relative links should not be checked. -brokenLinkExcludePatterns: [^./, ^../, ^#, ^chrome://, localhost , ^assets/, ^images/] \ No newline at end of file +brokenLinkExcludePatterns: [^./, ^../, ^#, ^chrome://, localhost , ^assets/, ^images/] + +# Define a list of foldernames that get ignored during folder name validation +folderNameIgnoreList: ["_unlisted"] \ No newline at end of file diff --git a/scripts/validation/validate.js b/scripts/validation/validate.js index cee5587ecc..b3e1df484c 100644 --- a/scripts/validation/validate.js +++ b/scripts/validation/validate.js @@ -57,7 +57,7 @@ if(configManager.options.checkBrokenLinks){ }; // Verify if articles contain discouraged foldernames (which translate into URLs) -validator.addValidation(allArticles, validateFolderName); +validator.addValidation(allArticles, validateFolderName, configManager.getConfig("generic").folderNameIgnoreList); // Verify that all files in the assets folder are referenced validator.addValidation(allArticles, validateReferencedAssets); From 65b62406137ddd7432af62db4ea936d47e450713 Mon Sep 17 00:00:00 2001 From: Matteo Marsala Date: Fri, 17 May 2024 10:37:01 +0200 Subject: [PATCH 2/2] update content-lint dep to 1.2.0 --- scripts/validation/package-lock.json | 14 +++++++------- scripts/validation/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/validation/package-lock.json b/scripts/validation/package-lock.json index 3ef955cb45..35aa50ac4b 100644 --- a/scripts/validation/package-lock.json +++ b/scripts/validation/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "content-lint": "^1.1.3" + "content-lint": "^1.2.0" } }, "node_modules/ansi-styles": { @@ -139,9 +139,9 @@ } }, "node_modules/content-lint": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/content-lint/-/content-lint-1.1.3.tgz", - "integrity": "sha512-Z5KJywQPEXMYMf3gDXFpwt94Pw0QVwcRiknL2GwVh5eERusUEYDUabk3uVP0i7Dx8zYzKocioVuRUDi3dxq/Iw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/content-lint/-/content-lint-1.2.0.tgz", + "integrity": "sha512-hVT1e2VvZpqhzegH9iPYvFB+36wRbaGgGARoNMKBrEyfaLarfkJnoJZpconoIU/Kf2hVdMVv+IV7LZGpkzCh6g==", "dependencies": { "command-line-args": "^5.1.3", "front-matter": "^4.0.2", @@ -749,9 +749,9 @@ "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==" }, "content-lint": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/content-lint/-/content-lint-1.1.3.tgz", - "integrity": "sha512-Z5KJywQPEXMYMf3gDXFpwt94Pw0QVwcRiknL2GwVh5eERusUEYDUabk3uVP0i7Dx8zYzKocioVuRUDi3dxq/Iw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/content-lint/-/content-lint-1.2.0.tgz", + "integrity": "sha512-hVT1e2VvZpqhzegH9iPYvFB+36wRbaGgGARoNMKBrEyfaLarfkJnoJZpconoIU/Kf2hVdMVv+IV7LZGpkzCh6g==", "requires": { "command-line-args": "^5.1.3", "front-matter": "^4.0.2", diff --git a/scripts/validation/package.json b/scripts/validation/package.json index e8e4446b6e..5ed2722183 100644 --- a/scripts/validation/package.json +++ b/scripts/validation/package.json @@ -10,6 +10,6 @@ "author": "Sebastian Romero", "license": "ISC", "dependencies": { - "content-lint": "^1.1.3" + "content-lint": "^1.2.0" } }