Skip to content

Chore: Implement Automated Snippet Validation Script for CI #48

Description

@EndlessTrax

Problem

The current validation in GitHub Actions parses snippet files as JSON inline via node -e. We should make this more robust and run it as a regular npm test script.

Solution

  1. Add a validation script at scripts/validate-snippets.js that checks for:
    • Valid JSON formatting.
    • All snippets containing prefix, body, and description.
    • Prefix naming convention (pt prefix).
    • Duplicate prefixes across catalogs to avoid collisions.
  2. Update package.json with a test script: "test": "node scripts/validate-snippets.js".
  3. Update GitHub Actions config ci.yml to run npm test instead of inline script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions