Skip to content

feat(checks): add name-whitespace rule and fix model-unknown SARIF catalog gap#29

Merged
protosphinx merged 1 commit into
mainfrom
bot/name-whitespace-check
Jun 8, 2026
Merged

feat(checks): add name-whitespace rule and fix model-unknown SARIF catalog gap#29
protosphinx merged 1 commit into
mainfrom
bot/name-whitespace-check

Conversation

@protosphinx

Copy link
Copy Markdown
Member

Why

Two small gaps in skillcheck's rule coverage:

  1. A skill whose name: contains spaces or tabs cannot match any typical
    filename and creates ambiguous lookups at runtime. There was no rule
    catching this. Authors who type name: my cool skill get no signal
    from the linter today.

  2. The SARIF RULES catalog was missing model-unknown. When that
    diagnostic appeared in output, the SARIF serializer fell back to a
    synthetic rule entry (id used as both name and short description),
    which produces lower-quality output in GitHub Code Scanning.

What

  • src/checks.ts: add checkNameWhitespace, called from runChecks
    after checkNameDrift. Rule id: name-whitespace, severity: warn.
    Fires when /\s/.test(v.name) is true (spaces, tabs, newlines).
  • src/sarif.ts: add name-whitespace and model-unknown entries to
    the RULES catalog with proper camelCase names and descriptions.
  • test/checks.test.ts: 4 new test cases for name-whitespace.
  • test/sarif.test.ts: 3 new test cases; also extend the existing
    full-catalog assertion to cover both new rules.

Tests

  • warns when skill name contains spaces
  • does not warn name-whitespace for a clean hyphenated name
  • name-whitespace message includes the offending name
  • warns when skill name contains a leading space
  • model-unknown appears in the catalog with a proper camelCase name
  • name-whitespace appears in the catalog with a proper camelCase name
  • ruleIndex for name-whitespace points to the registered entry

Self-merge gate

  • all CI checks pass
  • LOC delta < 250 (added + removed)
  • no public-API surface change
  • no runtime-dependency additions
  • no workflow file changes
  • tests added or extended

Generated by Claude Code

…talog

Warn when a skill's frontmatter name contains whitespace characters.
Names with spaces or tabs cannot match typical filenames and create
ambiguous lookups at runtime.

Also adds the missing model-unknown entry to the SARIF RULES catalog
so GitHub Code Scanning shows a proper rule description instead of
falling back to the synthetic-rule path.
@protosphinx protosphinx added the automated Opened by the daily bot label Jun 8, 2026 — with Claude
@protosphinx protosphinx merged commit 3522221 into main Jun 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated Opened by the daily bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant