v12.0.0: correctness fixes, test coverage, Codecov + SonarCloud#12
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A code-review pass over
masterplus 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.0andnet8.0.Breaking changes
Area()returns a non-negative magnitude (was the signed shoelace area — negative for clockwise polygons)Scale<T>(IEnumerable<double>)overload with an unused type parameter (use non-genericScale())MaxIndex()/FindMinMaxInOn()throwInvalidOperationExceptionon empty input (LINQ convention);Scale(empty)still returns emptyAsTime(TimeSpan)drops the trailing", "separator and returns"0 ms"forTimeSpan.ZeroTooling & docs
--collect:"XPlat Code Coverage") and uploads viacodecov-action@v5(non-fatal). Addedcoverlet.collectorto the test project..github/workflows/sonar.yml+SONAR_SETUP.md. No-op untilSONAR_TOKENis set, so CI stays green.11.0.0→12.0.0withPackageReleaseNotes.Follow-up (not in this PR)
SONAR_TOKENandCODECOV_TOKENsecrets for the badges/analysis to report live data. Left open intentionally.v*.*.*tag.🤖 Generated with Claude Code