Skip to content

feat: add --verbose flag to mex check#23

Merged
theDakshJaitly merged 2 commits intotheDakshJaitly:mainfrom
mvanhorn:feat/5-verbose-flag
Apr 11, 2026
Merged

feat: add --verbose flag to mex check#23
theDakshJaitly merged 2 commits intotheDakshJaitly:mainfrom
mvanhorn:feat/5-verbose-flag

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

Summary

Adds --verbose to mex check. When passed, it prints diagnostic output before the normal report: scaffold files scanned, claims extracted (broken down by kind), and per-checker summaries.

Changes

  • src/cli.ts: Added --verbose option, passed through to runDriftCheck, calls reportVerbose before reportConsole
  • src/drift/index.ts: runDriftCheck accepts { verbose?: boolean } options, populates verboseLog on the report with file counts, claim breakdowns, and checker summaries
  • src/types.ts: Added verboseLog?: string[] to DriftReport
  • src/reporter.ts: Added reportVerbose function that prints dim-styled diagnostic lines

Behavior

  • mex check (default): unchanged
  • mex check --verbose: prints diagnostic info, then normal report
  • mex check --quiet: verbose ignored
  • mex check --json: verbose ignored (verboseLog field is included in JSON output)

Fixes #5

This contribution was developed with AI assistance (Codex).

@theDakshJaitly theDakshJaitly self-requested a review April 10, 2026 09:15
Copy link
Copy Markdown
Owner

@theDakshJaitly theDakshJaitly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good — clean, well-scoped feature. Approving, but two things to address before merge:

  1. --verbose --json inconsistency: PR description says verbose is ignored with --json, but verboseLog is still populated and included in the JSON output. Either gate it off when JSON mode is active, or update the description to say it's intentionally included.

  2. No tests: buildVerboseLog is a pure function — easy to unit test. Would also be good to verify runDriftCheck with { verbose: true } populates verboseLog on the report.

Minor nit: per-file edges:/staleness: entries in checkerIssueCounts could get noisy on large scaffolds (2 lines per file vs 1 per aggregate checker). Worth considering whether to aggregate those too.

- reportJSON now strips verboseLog unless --verbose is also passed
- Export buildVerboseLog for testing
- Add test/verbose.test.ts with 4 tests:
  - buildVerboseLog claim breakdown and file count
  - buildVerboseLog empty inputs
  - JSON output excludes verboseLog without --verbose
  - JSON output includes verboseLog with --verbose
@mvanhorn
Copy link
Copy Markdown
Contributor Author

Addressed both items in c81f5c5:

  1. --verbose --json: verboseLog is now excluded from JSON output by default. reportJSON accepts a { verbose } option to include it explicitly.
  2. Added test/verbose.test.ts covering buildVerboseLog (claim breakdown, checker counts, singular/plural, empty inputs) and reportJSON verbose gating.

89/89 tests passing.

@mvanhorn
Copy link
Copy Markdown
Contributor Author

Both items addressed in c81f5c5:

  1. --verbose --json inconsistency: reportJSON now strips verboseLog from output unless --verbose is also passed. So --json alone gives a clean report, --json --verbose includes the diagnostic log.

  2. Tests: Added test/verbose.test.ts with 4 tests covering buildVerboseLog (claim breakdown, empty inputs) and the JSON gating behavior. All 89 tests pass.

On the nit about per-file checker counts getting noisy: agreed, but I'd leave that for a follow-up since it's a display preference rather than a correctness issue.

Copy link
Copy Markdown
Owner

@theDakshJaitly theDakshJaitly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, both items addressed cleanly. Approving and merging.

Also — thanks for the contribution, really appreciate you taking the time on this. Been following your 30 Days Skill repo too, the work you're doing there is incredible. Cheers Matt 🤝

@theDakshJaitly theDakshJaitly merged commit bca5d17 into theDakshJaitly:main Apr 11, 2026
3 checks passed
@mvanhorn
Copy link
Copy Markdown
Contributor Author

Omg thanks for using last30days!! You're first person to notice here. :)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add --verbose flag to mex check

2 participants