Skip to content

docs:check misses copied --docs-* token values that share a line with another declaration #49

Closed

Description

@joeblau

Found by the independent verifier of #48 (bloxwap/hig#58). Evidence: automated mutation test with npm run docs:check.

What happens

apps/docs/scripts/hig-tokens.mjs (line 38) looks for copied HIG token values with /^\s*--docs-(?:radius|duration|ease|control|type)[\w-]*\s*:/m. That pattern only matches a declaration at the start of a line. If a copied value shares a line with another declaration, for example --docs-icon: 16px; --docs-radius: 14px;, docs:check still passes.

The guard does catch these, so they are not affected:

  • copies on their own line
  • a reintroduced .hig-button font bridge
  • var(--font-bloxwap-*)
  • misspelled --hig-* roles

Expected

The guard finds a copied --docs-(radius|duration|ease|control|type)* declaration anywhere in global.css. For example, it could match on (?:^|[;{\s])--docs-…\s*:, or parse the CSS declarations.

Acceptance

  • docs:check fails on a same-line copy, and a test or a documented mutation run covers that case.

Part of bloxwap/hig#58.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions