Add categories cross-checking
We need to ensure that there's no mismatch between what stages.yml and categories.yml says, namely which stage a category is in. We also shouldn't list a listed (assumed to be active) category as a maintained one.
Additionally, the MR
- Renames the files/methods as it no longer only checks links.
- Fixes validation errors.
AI Summary
Enhances categories.yml validation by adding comprehensive cross-file validation between categories.yml and stages.yml to ensure data consistency.
Changes Made
CategoriesYmlChecker
-
Stage-category consistency: Validates that a category's
stagefield matches where it's listed instages.yml -
Unlisted category detection: Ensures all categories (except
stage: unknown) are properly listed instages.yml - Cross-file validation: Prevents orphaned references and ensures bidirectional consistency
YamlResourceLinter
-
Maintained categories validation: Ensures
maintained_categoriesentries don't exist in categories.yml -
Category separation: Validates that
categoriesandmaintained_categoriesdon't overlap
Tests
- Added comprehensive test coverage for new validation rules
- Updated existing tests to account for additional validation errors
Benefits
- Prevents data inconsistencies between YAML files
- Catches configuration errors during validation
- Ensures proper categorization of all features
- Maintains clean separation between regular and maintained categories
The validation now provides more consistency checking across both data files.
Edited by Cynthia "Arty" Ng