nexus icon indicating copy to clipboard operation
nexus copied to clipboard

fix: coverage script reliability and cross-platform support

Open mdqst opened this issue 4 months ago • 0 comments

fixed a few issues in the coverage script:

  • replaced EXCLUDE="..." with an array EXCLUDES=(...) and used "${EXCLUDES[@]}" in lcov --remove, so patterns aren’t expanded by the shell.
  • changed rm lcov.info && rm coverage.json to rm -f lcov.info coverage.json, preventing failures when coverage.json is missing.
  • updated open coverage/foundry/index.html to check for xdg-open (Linux) and open (macOS), making it cross-platform.

this should make the script more robust and portable.


PR-Codex overview

This PR updates the generate_coverage_report.sh script to improve the handling of excluded directories and enhance the file removal process, as well as the method for opening the coverage report in a cross-platform manner.

Detailed summary

  • Changed EXCLUDE variable to an array EXCLUDES.
  • Updated lcov command to use the array syntax for exclusions.
  • Modified the rm command to use -f for forceful removal of files.
  • Improved the method for opening the HTML report by checking for xdg-open or open commands.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

mdqst avatar Sep 01 '25 12:09 mdqst