JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9388
  • Score
    100M100P100Q137661F

A Tool to Show Code Coverage for Modified Lines in a Diff

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (diff-cover) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    diff_cover_ts

    A TypeScript port of the diff_cover tool.

    Installation

    bun install

    Usage

    Diff Cover

    Automatically find diff lines that need test coverage.

    bun src/diff_cover_tool.ts coverage.xml

    Options:

    • --compare-branch <branch>: Branch to compare (default: origin/main)
    • --fail-under <score>: Returns an error code if coverage is below this value
    • --html-report <file>: Write HTML report to this file
    • --json-report <file>: Write JSON report to this file

    Diff Quality

    Automatically find diff lines that need quality checks.

    bun src/diff_quality_tool.ts report.txt --violations <driver>

    Supported drivers:

    • eslint
    • pylint
    • flake8
    • shellcheck
    • cppcheck
    • checkstyle
    • findbugs

    Options:

    • --compare-branch <branch>: Branch to compare (default: origin/main)
    • --fail-under <score>: Returns an error code if quality score is below this value
    • --include-untracked: Include untracked files in the check

    Development

    Run tests:

    bun test