Repository navigation
fix(hidi): classify linked Pester file as test code - #894
Conversation
Link the existing Pester suite from the Hidi test project so SonarScanner for .NET can assign its test-project classification without excluding either the tests or production helper. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6f806d4e-2512-469d-b4ba-ccccda859f7f
|
|
Follow-up validation found that the linked None item did not fix PowerShell test classification. Full Sonar analysis run https://github.com/microsoft/OpenAPI.NET.OData/actions/runs/37968835374 analyzed exact commit 5ab3d06 on the default Sonar branch: test/scripts/check-nuget-package-published.Tests.ps1 remains FIL with 76 lines to cover, all 76 uncovered. The production helper remains FIL with 100% coverage (38 lines, zero uncovered), and existing C# tests remain UTS. The PR quality gate had no new-coverage condition because this was a project-metadata-only change; its pass did not establish correct classification. The default-branch gate fails new coverage (38.9% versus 80%). No thresholds, exclusions, or publishing settings were changed. The v2 equivalent in #895 is being held while scanner ownership handling is diagnosed. |



Summary
Link the existing
test/scripts/check-nuget-package-published.Tests.ps1as aNoneitem in the existing Hidi test project. This gives SonarScanner for .NET test-project ownership of the Pester suite rather than treating the standalone PowerShell test file as production code.This is a one-file, one-line corrective follow-up to accepted #891. No runtime code, test bodies, package versions, ESRP publisher settings, workflows, coverage exclusions, quality gates, or coverage reports are changed. Both the real Pester suite and production helper remain in analysis.
Validation
Noneitem to the existing test file withLink=Scripts\check-nuget-package-published.Tests.ps1.IsTestProjectis blank; classification proof must come from the scanner, not this property.git diff --checkpassed; exactly one project file changed.Remote acceptance requires the Pester component to remain indexed as
UTS, the production helper to remainFILwith 38 eligible lines and 100% coverage, and the existing quality gate to pass. Those checks are pending the PR-head analysis; no automatic merge is enabled.