CI: ratchet build warnings to errors now that the solution builds with 0 warnings (#725) #766

Closed
opened 2026-11-09 13:30:06 -05:00 by dohertj2 · 1 comment
Owner

Since #725 the CI Release build of ZB.MOM.WW.OtOpcUa.slnx has 0 warnings. Add the ratchet the issue's last acceptance item asked for (e.g. TreatWarningsAsErrors for test projects, or -warnaserror in the CI build step) and update the stale comment in Directory.Build.props that says test projects aren't clean. Also review the xUnit1051 code-fix sites where WriteAsync(..., default) became the runner token, in case a test relied on ignoring runner cancellation.

Since #725 the CI Release build of ZB.MOM.WW.OtOpcUa.slnx has 0 warnings. Add the ratchet the issue's last acceptance item asked for (e.g. `TreatWarningsAsErrors` for test projects, or `-warnaserror` in the CI build step) and update the stale comment in Directory.Build.props that says test projects aren't clean. Also review the xUnit1051 code-fix sites where `WriteAsync(..., default)` became the runner token, in case a test relied on ignoring runner cancellation.
dohertj2 added the type:infrapriority:p3 labels 2026-11-09 13:30:06 -05:00
Author
Owner

Fixed on master c904472a: TreatWarningsAsErrors=true set globally in Directory.Build.props (the 61 src/ projects already set it per project since #606 — now extended to tests; stale comment rewritten); applies to CI too, so v2-ci.yml unchanged. Evidence: dotnet build ZB.MOM.WW.OtOpcUa.slnx -c Release -m:2 --no-incremental 0 warnings / 0 errors, Debug clean; a planted unused local in a test project fails the build (CS0219). xUnit1051 code-fix review: the WriteAsync(..., default)→runner-token sites (MqttDriverWriteTests) and Task.Run(..., token) sites don't run cleanup/shutdown under the token or rely on ignoring cancellation — no further changes.

Fixed on master c904472a: `TreatWarningsAsErrors=true` set globally in Directory.Build.props (the 61 src/ projects already set it per project since #606 — now extended to tests; stale comment rewritten); applies to CI too, so v2-ci.yml unchanged. Evidence: `dotnet build ZB.MOM.WW.OtOpcUa.slnx -c Release -m:2 --no-incremental` 0 warnings / 0 errors, Debug clean; a planted unused local in a test project fails the build (CS0219). xUnit1051 code-fix review: the WriteAsync(..., default)→runner-token sites (MqttDriverWriteTests) and Task.Run(..., token) sites don't run cleanup/shutdown under the token or rely on ignoring cancellation — no further changes.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#766