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

moonbitlang / core / 5628
90%

Build:
DEFAULT BRANCH: main
Ran 28 Jul 2026 06:55AM UTC
Jobs 1
Files 453
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 Jul 2026 06:54AM UTC coverage: 91.255%. Remained the same
5628

push

github

bobzhang
refactor: extend `+=` rewrite to embedded and doc-comment sites

The first pass matched line-anchored statements only, so it missed
`x = x + a` appearing mid-line — chiefly inside single-line lambda
bodies such as `arr.each(x => sum = sum + x)`. Two scans were used to
close the gap, because each misses what the other finds:

- `moongrep --pattern '$(a:id) = $(a:id) + $(_:exp)'` matches on the AST,
  so it sees lambda bodies regardless of layout — but it skips blocks it
  cannot parse, and its pattern does not match left-nested chains
  (`sum = sum + i + x` is `Add(Add(sum, i), x)`, whose left operand is
  not the bare lvalue).
- A text scan catches those chains and the unparseable blocks, but needs
  paren/string-aware scanning to find where the RHS ends: in
  `each(x => sum = sum + x)` the RHS stops before the lambda's `)`.

63 further sites: 37 in code and 26 in `///` doc examples (which are
```mbt check doctests, so they are compiled and run).

Converting three doc examples surfaced `unused_value` warnings on `sum`
in `queue/queue.mbt` and `builtin/intrinsics.mbt`. Those examples
accumulate into `sum` and never read it; `sum = sum + x` merely hid that
by mentioning `sum` on the right. Completed them with the assertion they
were missing rather than reverting the rewrite.

`moon check --target all` is warning-free; tests pass on wasm-gc, js and
native; `moon info` still reports no `.mbti` change.

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

15892 of 17415 relevant lines covered (91.25%)

188976.04 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5628.1 28 Jul 2026 06:55AM UTC 454
91.27
GitHub Action Run
Source Files on build 5628
  • Tree
  • List 453
  • Changed 25
  • Source Changed 25
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 4fa37be8 on github
  • Prev Build on main (#5615)
  • Next Build on main (#5632)
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