Repository navigation
OPS-157454: Migrate to .NET 10 and upload test coverage to Codacy - #1
Conversation
main did not build: the library declared both TargetFrameworks netstandard2.0 and a stray TargetFramework net10.0 (NETSDK1005). - Library targets net10.0 only; netstandard2.0 dropped. Fix the CS8601 the net10.0 nullable annotations on Uri.TryCreate surfaced. - Tests: xunit v2 -> xunit.v3 on Microsoft.Testing.Platform, nullable enabled with the resulting warnings fixed, legacy packages.config and VS Service item removed. - global.json pins SDK 10.0.401 with rollForward disable; CI installs it via global-json-file. - New coverage job on pdl-public runs the offline suite with Microsoft.Testing.Extensions.CodeCoverage and uploads Cobertura to Codacy; Integration-trait tests are excluded. - README and CONTRIBUTING updated for the new target framework. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
🟢 Coverage 100.00% diff coverage
Metric Results Coverage variation Report missing for 56550731 Diff coverage ✅ 100.00% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (5655073) Report Missing Report Missing Report Missing Head commit (d1d4927) 89 78 87.64% Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#1) 2 2 100.00% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%1 Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.
AI Reviewer: run a review on demand. To trigger the first review automatically, go to your organization or repository integration settings. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
Tracks OPS-157454.
Why
mainhas not built since the 16 Sep NuGet governance remediation commit. The library.csprojdeclared both<TargetFrameworks>netstandard2.0</TargetFrameworks>and a stray<TargetFramework>net10.0</TargetFramework>, which fails with NETSDK1005..NET 10 migration
net10.0only.netstandard2.0is dropped.Uri.TryCreate(..., out _webhookUri), because net10.0 annotates the out parameter as nullable. Fixed by assigning through a local after the success check. No new suppressions were added.xunit.v3on Microsoft.Testing.Platform (UseMicrosoftTestingPlatformRunner). Nullable is now enabled for the tests too, and the 8 warnings that caused were fixed with real null checks rather than suppressions. The legacy net45packages.configand VSServiceitem were removed, and the unused xunit v2 version was removed fromDirectory.Packages.props.global.jsonpins SDK 10.0.401 withrollForward: disable. Because of that, the CI jobs now install the SDK withglobal-json-file: global.jsonrather than10.0.x.Coverage job
This follows
PanoramicData.NugetManagementand the mergedPanoramicData.Mapperexample:runs-on: [pdl-public], and setup-dotnet usesDOTNET_INSTALL_DIR: ${{ runner.temp }}/dotnet. All steps are bash.--coverage --coverage-settings coverage.config --coverage-output-format cobertura.coverage.configis added and ports the estate's generated-code exclusions.codacy/codacy-coverage-reporter-action@v1(continue-on-error: true), and uploads the Cobertura file as a 7-day artifact.--filter-not-trait "Category=Integration". Every current test uses a mockedHttpMessageHandler, so nothing is excluded today. The filter and a CONTRIBUTING note are there for any future live-Slack test.Verification
These checks were run in a clean
mcr.microsoft.com/dotnet/sdk:10.0.401container:dotnet build -c Releasefinished with 0 warnings and 0 errors, anddotnet packsucceeded.pdl-publiclabel.No NuGet publish or release tag is part of this change.
🤖 Generated with Claude Code