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

  1. Renames the files/methods as it no longer only checks links.
  2. 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 stage field matches where it's listed in stages.yml
  • Unlisted category detection: Ensures all categories (except stage: unknown) are properly listed in stages.yml
  • Cross-file validation: Prevents orphaned references and ensures bidirectional consistency

YamlResourceLinter

  • Maintained categories validation: Ensures maintained_categories entries don't exist in categories.yml
  • Category separation: Validates that categories and maintained_categories don'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

Merge request reports

Loading