Loading...
Loading...
Write tests for the added lines that a pharn-ci report (the pharn-dev/pharn-ci GitHub Action or the `pharn-ci check` CLI, 0.1.x with Report v1 or 0.2.x with Report v2) lists as uncovered, so a pull request's diff coverage meets its threshold. Use when pharn-ci fails with DIFF_COVERAGE_BELOW_THRESHOLD, or the person asks to cover the lines pharn-ci reports, raise diff coverage, get the pharn-ci coverage check passing, or exclude a file from, lower or switch off the pharn-ci coverage gate (it explains what that changes and asks first). Adds tests only - never lowers the threshold, excludes files, edits the pharn-ci config or workflow (including the test-integrity and accept-label inputs), adds coverage-ignore comments, skips or focuses tests, weakens test scripts, or applies the accept label. Not for adding pharn-ci to a repository (pharn-ci-install) or the PHARN CLI (pharn-cli).
npx skill4agent add pharn-dev/skills pharn-ci-coverdiffCoveragescripts/check-lines.mjs''\''--literal-pathspecs--$(...)…and N morediffCoveragenullpharn-ci-explainDIFF_COVERAGE_BELOW_THRESHOLDgit rev-parse HEADgh pr view <pr> --json headRefOidgit status --shortpull_requestpush--baselines.notAddedbase.changedFilesbase.changedFilespharn-ci checknullgit diff --name-only HEAD...origin/<base> -- <files>git diff --unified=0 <base>...HEAD -- <file>n(coveredLines + n) * 100 >= threshold * coverableLinesnpharn-dev/pharn-cinode <skill-dir>/scripts/check-lines.mjs --report <report.json> --coverage <coverage file> [--coverage <file>]... --base <base> [--coverage-root <dir>]--basenulllines.nowCoveredlines.stillUncoveredlines.notInCoveragelines.regressedlines.notAddedbase.changedFilescoverableMismatchsourcesChangedHEADestimatemeetsThreshold--basebasis: "added-lines""listed-lines""git": falsenullnotInCoveragepharn-ci checkbasisregressedbase.changedFilesnullgit status --short.pharn/ci.ymlthresholdexcludecoverage-rootcoverage-filefail-on-thresholdcommenttest-integrityaccept-label-diffbinary.gitattributes.onlyfitfdescribepackage.json|| true--passWithNoTestspretestsrc/generated/**round2CONFIG_CHANGED_IN_DIFFnpx pharn-cipharn/acceptedgh