MoonBit implementation of the MoonBit compiler coverage reporter.
It reads compiler-generated .trace.source metadata together with
moonbit_coverage_* runtime logs. The supported trace schema is
MOONCOVE00000004.
See the coverage reference for system architecture, reporter configuration, CI integration, and the complete command-line reference.
Generate coverage artifacts in the target project:
moon test --enable-coverageRun directly from Mooncakes:
moonx --target wasm moonbitlang/moon_cove@latest -f summaryOr install the root executable and run moon_cove from the target project root:
moon install moonbitlang/moon_cove@latestWith no explicit inputs, moon_cove recursively discovers both artifact types:
moon_cove -f html
moon_cove -f caret
moon_cove -f simp_caret
moon_cove -f summary
moon_cove -f full_summary
moon_cove -f sorted_summary
moon_cove -f cobertura
moon_cove -f coveralls
moon_cove -f bisectRepeated -f / --format options use the last value, matching the legacy
reporter. For example, -f=simp_caret -f=summary produces a summary.
For the toolchain commands moon coverage report and moon coverage analyze,
set MOON_COVE_REPORT_ENABLED=1 to select the bundled Wasm reporter.
This setting does not enable test instrumentation or update the bundled reporter.
File-producing formats default to:
bisect.coverage_coverage/coveralls.jsoncobertura.xml
Inputs and filters can be explicit:
moon_cove path/to/package.trace.source \
-t path/to/moonbit_coverage_1.txt \
-p username/module/pkg \
-F source.mbt \
--source-paths src,generated \
-f caretPackage and file filters use exact or /suffix matching.
Coveralls upload uses curl; Codecov upload uses the official codecovcli
executable. Both must already be available on PATH.
moon_cove -f coveralls \
--send-to coveralls
moon_cove -f coveralls \
--send-to codecovCircleCI, Travis CI, GitHub Actions, and GitLab CI metadata are detected from
the environment. Store tokens in COVERALLS_REPO_TOKEN or CODECOV_TOKEN
instead of command-line arguments. Explicit --service-name,
--service-job-id, and --service-pull-request values take precedence.
Coveralls uploads from GitHub Actions and CircleCI automatically include commit
and branch metadata. Use --coveralls-include-git-info to include it in local
reports or other upload environments.
Automatic CI metadata and token detection apply only to --send-to.
Local JSON output requires explicit metadata options.
Upload reports are written to a private temporary directory and removed after
the upload attempt. Local -f coveralls output is retained normally.
moon check --target all --warn-list +73
moon test --target native
moon test --target wasm
moon info
moon fmt