From 8df277e544770c0e1abe42fe891188b914dcab0a Mon Sep 17 00:00:00 2001 From: Alexander Nachtmann Date: Tue, 13 Oct 2026 03:49:34 +0200 Subject: [PATCH] Prepare 2.0.0 Set 2.0.0 as the package version, the badge action's default and the README's action snippet and release-notes link, and add docs/releases/2.0.0.md. The major version marks that the same report can now count differently: istanbul line totals and coverage.py multi-root paths (#74, #76). The README's migration section now covers 1.x and points 0.x users to the 1.0 notes. Co-Authored-By: Claude Opus 5.5 --- .github/actions/badge/action.yml | 2 +- Directory.Build.props | 2 +- README.md | 14 ++++++------ docs/releases/2.0.0.md | 37 ++++++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+), 8 deletions(-) create mode 100644 docs/releases/2.0.0.md diff --git a/.github/actions/badge/action.yml b/.github/actions/badge/action.yml index fb95c10..6df2d8f 100644 --- a/.github/actions/badge/action.yml +++ b/.github/actions/badge/action.yml @@ -42,7 +42,7 @@ inputs: default: 'true' version: description: dotcov.tool version to install. - default: '1.7.1' + default: '2.0.0' command: description: >- Command that runs dotcov instead of installing it, split on whitespace, e.g. diff --git a/Directory.Build.props b/Directory.Build.props index ce0114c..600aa1a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ - 1.7.1 + 2.0.0 local $(VersionPrefix)-$(VersionSuffix) $(VersionPrefix) diff --git a/README.md b/README.md index 8c994ad..77c40d6 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,13 @@ Turn Cobertura XML into a build decision — a table, a markdown block, a JSON payload, and an exit code your CI can act on. Local by default; uploads are opt-in. -## Migrating from 0.x +## Migrating from 1.x -Version 1.0 replaces `DotCov.Nuke` with `DotCov.Fallout` and separates report discovery from -XML parsing (`ReportResolver.Resolve` replaces the parser's path methods). See the -[1.0 migration notes](docs/releases/1.0.0.md) for both upgrades. +Version 2.0 counts some reports differently. Line totals of istanbul reports (Jest, Vitest) drop +to the tool's own, and coverage.py reports with several `source` roots resolve each file against +its own root. Commands, flags and exit codes are unchanged. Check thresholds and badges set on +1.x numbers; the [2.0 release notes](docs/releases/2.0.0.md) have the details. Coming from 0.x, +read the [1.0 migration notes](docs/releases/1.0.0.md) first. ## Getting started @@ -176,7 +178,7 @@ permissions: steps: # … checkout, setup-dotnet, and a test run writing Cobertura to TestResults/ - - uses: ANcpLua/dotcov/.github/actions/badge@v1.7.1 + - uses: ANcpLua/dotcov/.github/actions/badge@v2.0.0 with: reports: TestResults min-line: 80 @@ -222,5 +224,5 @@ fallout Coverage # tests plus the coverage gate ## Feedback [Issues](https://github.com/ANcpLua/dotcov/issues) · -[Release notes](docs/releases/1.7.1.md) · +[Release notes](docs/releases/2.0.0.md) · [MIT](LICENSE) diff --git a/docs/releases/2.0.0.md b/docs/releases/2.0.0.md new file mode 100644 index 0000000..32ebcf7 --- /dev/null +++ b/docs/releases/2.0.0.md @@ -0,0 +1,37 @@ +# DotCov 2.0.0 + +The same Cobertura report can produce different numbers than in 1.x. Two parser fixes change +what DotCov counts, so thresholds and badges set on 1.x numbers can move. Commands, flags, +exit codes and the JSON shape are unchanged. + +## What changes in your numbers + +- **istanbul reports (Jest, Vitest): line totals now equal the tool's own.** istanbul lists each + function's declaration line under ``, and 1.x counted those lines as file lines. A + class's own `` now decide its file's lines; method lines count only for a class that has + no `` of its own. Coverlet's totals do not change. On ten Vitest reports from the MCP + TypeScript SDK, every line total now equals Vitest's; with 1.7.1, all ten were higher, by up to + 823 lines. +- **coverage.py with several `source` roots: each file keeps its own root.** 1.x prefixed every + relative file name with the first ``. A file now resolves against the root under which + it exists on disk, so run DotCov where the sources are checked out. When the file exists under + no root or under several, the first root applies and the report keeps the multi-root warning. + On the MCP Python SDK's report (three roots, 414 files), 413 files now resolve to their real + paths. +- The multi-root warning now appears only when a file stays ambiguous, not for every report + with several roots. + +## What DotCov cannot change + +istanbul attaches branches only to lines that hold statements. A branch on any other line exists +only in the report's header totals, so DotCov's branch count can stay below Jest's or Vitest's +summary. The README's TypeScript section says so too. + +## Upgrade + +```bash +dotnet tool update -g DotCov.Tool --version 2.0.0 +``` + +Update the badge action to `ANcpLua/dotcov/.github/actions/badge@v2.0.0` and the `DotCov` and +`DotCov.Fallout` package references to `2.0.0`.