Skip to content

Convert CLI modes into Clikt subcommands#254

Merged
ogolberg merged 1 commit intomainfrom
cli-subcommands
Apr 27, 2026
Merged

Convert CLI modes into Clikt subcommands#254
ogolberg merged 1 commit intomainfrom
cli-subcommands

Conversation

@ogolberg
Copy link
Copy Markdown
Member

Summary

  • Replace the --mode flag with check / print / describe subcommands following the Clikt subcommands guide
  • Share --project-classes / --libraries across check and describe via a SourcesOptions : OptionGroup, per the advanced.md pattern for sharing options
  • Use Clikt's option().required() for mandatory flags (--output, --platform-descriptors) instead of hand-rolled error() checks

Test plan

  • ./gradlew :cli:test :cli:spotlessCheck passes
  • Integration tests updated to invoke check / print / describe as subcommands, including the describeprint round-trip
  • Error-path tests updated to assert on CliktError from .required() where applicable

🤖 Generated with Claude Code

Replace the --mode flag with check/print/describe subcommands, sharing
the --project-classes/--libraries flags through a SourcesOptions group
and using Clikt's required() for mandatory options.

Generated with Claude Code
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

❌ Patch coverage is 90.62500% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.94%. Comparing base (1afcd10) to head (f2988a6).

Files with missing lines Patch % Lines
.../com/toasttab/expediter/cli/ExpediterCliCommand.kt 90.62% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #254      +/-   ##
============================================
- Coverage     90.95%   90.94%   -0.02%     
+ Complexity      365      340      -25     
============================================
  Files            44       44              
  Lines          1139     1137       -2     
  Branches        155      157       +2     
============================================
- Hits           1036     1034       -2     
  Misses           52       52              
  Partials         51       51              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ogolberg ogolberg merged commit fb731dc into main Apr 27, 2026
1 of 3 checks passed
@ogolberg ogolberg deleted the cli-subcommands branch April 27, 2026 14:08
ogolberg added a commit that referenced this pull request May 5, 2026
## Summary
- Expand the README's CLI section to cover the `check`, `describe`, and
`print` subcommands introduced in #250 and #254
- Show example invocations for each subcommand, including the gzipped
`TypeDescriptors` proto format shared between `describe` and
`--platform-descriptors`

## Test plan
- [x] Rendered README locally to verify formatting

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.

1 participant