Skip to content

Integrate folder validation [PC-929] #308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/validation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"author": "Sebastian Romero",
"license": "ISC",
"dependencies": {
"content-lint": "^1.0.0"
"content-lint": "^1.1.1"
}
}
4 changes: 4 additions & 0 deletions scripts/validation/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { validateImageDescriptions, validateImagePaths, validateReferencedAssets
import { validateSyntaxSpecifiers } from 'content-lint';
import { validateNestedLists } from 'content-lint';
import { validateBrokenLinks } from 'content-lint';
import { validateFolderName } from 'content-lint';
import { ConfigManager } from 'content-lint';

const configManager = new ConfigManager();
Expand Down Expand Up @@ -55,6 +56,9 @@ if(configManager.options.checkBrokenLinks){
validator.addValidation(allArticles, validateBrokenLinks, configManager.getConfig("generic").brokenLinkExcludePatterns, configManager.getConfig("generic").baseURL, configManager.options.verbose);
};

// Verify if articles contain discouraged foldernames (which translate into URLs)
validator.addValidation(allArticles, validateFolderName);

// Verify that all files in the assets folder are referenced
validator.addValidation(allArticles, validateReferencedAssets);

Expand Down