• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moonbitlang / core / 8715
87%

Build:
DEFAULT BRANCH: main
Ran 28 Nov 2026 11:22AM UTC
Jobs 1
Files 674
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Nov 2026 11:20AM UTC coverage: 88.275% (-0.004%) from 88.279%
8715

push

github

bobzhang
refactor(argparse): use Option::map and set comprehensions

Replace `if x is Some(v) { Some(..) } else { None }` boilerplate with
`Option::map` in the suggestion paths (`suggest_long`, `suggest_short`) and
in `required_option_token`, build the validation name sets with set
comprehensions instead of insert loops, flatten a nested default_values
check, and drop two redundancies: a `let _ =` on a `Unit`-returning call and
`if min > 0 { min } else { 0 }` in favour of `min.max(0)`.

`ValidationCtx::finalize` was a private one-line method with exactly one
caller, so it is inlined into `collect_args` next to the other `validate_*`
calls.

Behavior and public API are unchanged: `moon check --deny-warn` is clean,
`moon test argparse` passes 165/165, and `argparse/pkg.generated.mbti` is
untouched.

Co-Authored-By: SeekMoon <seekmoon@moonbitlang.com>

15 of 15 new or added lines in 5 files covered. (100.0%)

25320 of 28683 relevant lines covered (88.28%)

785942.15 hits per line

Jobs
ID Job ID Ran Files Coverage
1 8715.1 28 Nov 2026 11:22AM UTC 674
88.28
GitHub Action Run
Source Files on build 8715
  • Tree
  • List 674
  • Changed 5
  • Source Changed 5
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 6ef258d8 on github
  • Prev Build on main (#8713)
  • Next Build on main (#8717)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc