Skip to content

TypeScript Rewrite: Check command with built-in checks#38

Closed
d4mation wants to merge 18 commits intoENG-219/command-helpfrom
ENG-219/command-check
Closed

TypeScript Rewrite: Check command with built-in checks#38
d4mation wants to merge 18 commits intoENG-219/command-helpfrom
ENG-219/command-check

Conversation

@d4mation
Copy link
Contributor

@d4mation d4mation commented Feb 11, 2026

🎫 ENG-219

Reference

Summary

  • Adds the check command that runs validation checks against the project
  • Includes CheckCollection class and CheckModule/CheckContext interfaces for extensible check system
  • Adds built-in tbd check that scans for @since TBD markers in source files
  • Adds built-in version-conflict check that detects mismatched version strings across configured files
  • Includes test coverage for check command and both built-in checks

Dependencies

This PR depends on #30 (app-bootstrap) being merged first.

Test plan

  • Verify npx pup check runs all configured checks
  • Verify TBD check detects @since TBD markers
  • Verify version-conflict check detects mismatched versions
  • Verify check failure modes (error vs warn)

@d4mation d4mation added the On Hold We're waiting for something. The Pull Request should not be merged. label Feb 11, 2026
d4mation and others added 2 commits February 11, 2026 16:24
Add emoji messages and detailed guidance when no checks are configured.
Use output module prefix system, bail early on error-level failures with
a descriptive message, and show a failure summary at the end. Built-in
checks now use output.section/success/error for formatted output matching
the PHP version's color and structure, and the TBD check skips .pup-/.puprc
files.
@d4mation d4mation changed the base branch from ENG-219/app-bootstrap to ENG-219/command-help February 12, 2026 19:30
Verify section headers, prefixed output lines, file path listings,
and bail message in test expectations.
Verify section headers, prefixed output lines, updated error messages,
version listing, and bail message in test expectations.
…file validation

Register check:{slug} subcommands dynamically from .puprc config instead of
hardcoding them. Defer version file existence and regex validation from config
parsing to the version-conflict check runtime, matching PHP behavior.
… check

Output plain ERROR message matching PHP behavior when a version file does not
exist, without prefix or section header formatting.
…n conflict error

Remove prefix from standalone check subcommands (check:tbd, check:version-conflict)
to match PHP behavior where only the main check command uses prefixes. Use white on
red background for version conflict error message to match PHP error tag styling.
Scan src/commands/checks/ at build time and inject BUILTIN_CHECK_SLUGS as a
compile-time constant. Built-in checks are always registered as subcommands
and fall back to default config when not explicitly configured in .puprc.
Tests cover built-in check registration without .puprc config,
standalone subcommand output (no prefix), custom command/module
checks, fail methods (warn vs error), and empty checks guidance.
@d4mation
Copy link
Contributor Author

Going to recreate this as multiple PRs. It is too large and complex.

@d4mation d4mation closed this Feb 12, 2026
@d4mation d4mation deleted the ENG-219/command-check branch February 12, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

On Hold We're waiting for something. The Pull Request should not be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant