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

moonbitlang / core / 6558
89%

Build:
DEFAULT BRANCH: main
Ran 06 Sep 2026 02:14AM UTC
Jobs 1
Files 442
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

06 Sep 2026 02:11AM UTC coverage: 89.19%. Remained the same
6558

push

github

bobzhang
refactor(argparse): drop the program name from argv with a list pattern

`default_argv` returned everything after `@env.args()[0]` via a length
guard plus an `args[1:]` slice. The `> 1` bound only exists because
`args[1:]` would panic on an empty array, so the emptiness handling is
spread across a comparison and a branch. Express the intent directly:
`[_, .. rest] => rest` drops the head element, with `[] => []` as the
total empty-array fallback. `.. rest` binds an `ArrayView[String]` — the
same zero-copy view `args[1:]` produced — so behaviour is unchanged.

A structural sweep for sibling sites (moongrep over `match` blocks that
destructure the head off a sequence and return the tail with an empty
fallback, plus `rg` over length-guarded `[1:]` slices) found no further
instances. The remaining `[.. rest]`-shaped code in the tree — char/byte
decoders peeling one element per iteration, `FixedArray::rev` and
`debug::compact_lines` needing the last element, quickcheck shrink and
`ArrayView::join` reconstruction — genuinely uses the head or tail, so a
slice or drop is not equivalent there.

## Verification
- `moon check argparse` clean
- `moon fmt --check argparse` clean
- `moon test argparse`: 153 passed, 0 failed

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

2 of 3 new or added lines in 1 file covered. (66.67%)

16205 of 18169 relevant lines covered (89.19%)

275187.12 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
85.52
0.0% argparse/parser.mbt
Jobs
ID Job ID Ran Files Coverage
1 6558.1 06 Sep 2026 02:14AM UTC 443
89.21
GitHub Action Run
Source Files on build 6558
  • Tree
  • List 442
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 63a0e05c on github
  • Prev Build on main (#6550)
  • Next Build on main (#6560)
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