Skip to content

Update CLI logic to use Cmdliner-recommended style#1558

Merged
WardBrian merged 3 commits intomasterfrom
cli-style-cleanup
Oct 14, 2025
Merged

Update CLI logic to use Cmdliner-recommended style#1558
WardBrian merged 3 commits intomasterfrom
cli-style-cleanup

Conversation

@WardBrian
Copy link
Copy Markdown
Member

See Cmdliner's docs:

In general Cmdliner wants you to see your tools as regular OCaml functions that you make available to the shell.

This moves the stanc.exe driver code in that direction. Where we were before relying on Cmd.eval_value', we now can just use Cmd.eval', and we can treat exit codes like more of a first class citizen without as much matching on cmdliner's internal return types.

Submission Checklist

  • Run unit tests
  • Documentation
    • If a user-facing facing change was made, the documentation PR is here:
    • OR, no user-facing changes were made

Release notes

Copyright and Licensing

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)

@WardBrian WardBrian requested a review from nhuurre October 9, 2025 20:45
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 14, 2025

Codecov Report

❌ Patch coverage is 89.36170% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.26%. Comparing base (3976b6e) to head (bc2ef61).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/stanc/stanc.ml 84.84% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1558      +/-   ##
==========================================
- Coverage   90.26%   90.26%   -0.01%     
==========================================
  Files          64       64              
  Lines        9916     9929      +13     
==========================================
+ Hits         8951     8962      +11     
- Misses        965      967       +2     
Files with missing lines Coverage Δ
src/stanc/CLI.ml 98.14% <100.00%> (-0.07%) ⬇️
src/stanc/stanc.ml 87.30% <84.84%> (+0.34%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@WardBrian WardBrian merged commit 5061bdf into master Oct 14, 2025
3 checks passed
@WardBrian WardBrian deleted the cli-style-cleanup branch October 14, 2025 14:05
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.

2 participants