Skip to content

v12.0.0: correctness fixes, test coverage, Codecov + SonarCloud#12

Merged
PFalkowski merged 1 commit into
masterfrom
fix/v12-breaking-changes
Jun 14, 2026
Merged

v12.0.0: correctness fixes, test coverage, Codecov + SonarCloud#12
PFalkowski merged 1 commit into
masterfrom
fix/v12-breaking-changes

Conversation

@PFalkowski

Copy link
Copy Markdown
Owner

Summary

A code-review pass over master plus the breaking-change fixes it surfaced, raising the package to v12.0.0. Also adds black-box test coverage for previously-untested methods and wires up Codecov + SonarCloud.

All work is test-driven: tests were written black-box (from each method's contract, not its body), which is what surfaced the four defects below. 228 tests pass (195 original + 33 new); Release builds clean across netstandard2.0 and net8.0.

Breaking changes

Change Issue
Area() returns a non-negative magnitude (was the signed shoelace area — negative for clockwise polygons) Closes #7
Removed the redundant Scale<T>(IEnumerable<double>) overload with an unused type parameter (use non-generic Scale()) Closes #8
MaxIndex() / FindMinMaxInOn() throw InvalidOperationException on empty input (LINQ convention); Scale(empty) still returns empty Closes #9
AsTime(TimeSpan) drops the trailing ", " separator and returns "0 ms" for TimeSpan.Zero Closes #10

Tooling & docs

  • Codecov: CI collects coverage (--collect:"XPlat Code Coverage") and uploads via codecov-action@v5 (non-fatal). Added coverlet.collector to the test project.
  • SonarCloud: new .github/workflows/sonar.yml + SONAR_SETUP.md. No-op until SONAR_TOKEN is set, so CI stays green.
  • README badges: fixed NuGet version badge, added NuGet downloads + Codecov badges, replaced the broken placeholder license badge with a working MIT one.
  • CHANGELOG.md added; version bumped 11.0.012.0.0 with PackageReleaseNotes.

Follow-up (not in this PR)

🤖 Generated with Claude Code

…loud

Breaking changes (see CHANGELOG.md / PackageReleaseNotes):
- Area() returns a non-negative magnitude instead of the signed shoelace
  area (was negative for clockwise polygons).
- MaxIndex() and FindMinMaxInOn() throw InvalidOperationException on empty
  input (LINQ Max/Min convention); Scale() on empty still returns empty.
- AsTime(TimeSpan) drops the trailing ", " separator and returns "0 ms"
  for TimeSpan.Zero, matching the AsTime(milliseconds) overload.
- Removed the redundant Scale<T>(IEnumerable<double>) overload whose type
  parameter was unused.

Testing:
- Added 33 black-box tests covering previously-untested public surface
  (HsVtoArgb, Head/Tail/HeadAndTail, PluralizeWhenNeeded, AsTime(TimeSpan),
  FindMinMaxInOn, Scale, MaxIndex). 228 tests pass.

Tooling / docs:
- CI now collects coverage and uploads it to Codecov (non-fatal).
- Added a SonarCloud workflow + SONAR_SETUP.md (no-op until SONAR_TOKEN set).
- README badges: fixed NuGet, added downloads + Codecov, fixed license badge.
- Added CHANGELOG.md; bumped version 11.0.0 -> 12.0.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@PFalkowski PFalkowski merged commit 481cfcb into master Jun 14, 2026
2 checks passed
@PFalkowski PFalkowski deleted the fix/v12-breaking-changes branch June 14, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant