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

moonbitlang / core / 4250 / 1
94%
main: 94%

Build:
DEFAULT BRANCH: main
Ran 08 May 2026 01:11PM UTC
Files 365
Run time 13s
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

08 May 2026 01:09PM UTC coverage: 94.647% (+0.001%) from 94.646%
4250.1

push

github

bobzhang
refactor(argparse): collapse usage_tail to filter-and-join

`usage_tail` had a `let mut tail = ""` plus four conditional `tail =
"\{tail} \{...}"` accumulations. Replace with a single array literal,
filter-non-empty, and join:

```diff
 fn usage_tail(cmd : Command) -> String {
-  let mut tail = ""
-  let required_options = required_option_usage(cmd)
-  if required_options != "" {
-    tail = "\{tail} \{required_options}"
-  }
-  if has_options(cmd) {
-    tail = "\{tail} [options]"
-  }
-  let pos = positional_usage(cmd)
-  if pos != "" {
-    tail = "\{tail} \{pos}"
-  }
-  let sub = subcommand_usage(cmd)
-  if sub != "" {
-    tail = "\{tail} \{sub}"
-  }
-  tail
+  let parts = [
+    required_option_usage(cmd),
+    if has_options(cmd) { "[options]" } else { "" },
+    positional_usage(cmd),
+    subcommand_usage(cmd),
+  ].filter(p => p != "")
+  if parts.is_empty() {
+    ""
+  } else {
+    " " + parts.join(" ")
+  }
 }
```

Eliminates the `let mut` accumulator. Each helper still called once.

Semantics-preserving: `moon test -p argparse` (225/225) passes and
`moon info` produces no `.mbti` change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

14923 of 15767 relevant lines covered (94.65%)

217648.02 hits per line

Source Files on job 4250.1
  • Tree
  • List 365
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 4250
  • fb556ac6 on github
  • Prev Job for on main (#4246.1)
  • Next Job for on main (#4252.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc