chore: adopt the revised .editorconfig and enable EnforceCodeStyleInBuild (Standards §5.2, §1.2.1) - #29
Merged
Merged
Conversation
…uild NextIteration.Standards §5.2 and §1.2.1, the latter now a MUST. Closes the `1.2 Directory.Build.props` and `5.2 .editorconfig canon` audit rows. The canonical .editorconfig is a deliberate allow-list of gated style rules — no blanket dotnet_analyzer_diagnostic.severity — so a rule a future SDK ships never auto-gates the build. Directory.Build.props now equals the template in non-comment content, EnforceCodeStyleInBuild included. Bringing the code green was mechanical and behaviour-preserving, 92 sites: - IDE0011 braces on single-statement ifs (64) - IDE0300/IDE0301/IDE0028 collection expressions - IDE0007 var, IDE0022 expression bodies, IDE0270 null check, IDE0055 format - IDE0005 five genuinely unnecessary usings in src/ Applied with `dotnet format style`, plus the collection-expression sites its fixer does not handle. 392 tests (196 × net8.0/net10.0) pass unchanged; build stays at zero warnings. IDE0005 is suppressed in the test project (§2.7) and the demo, which is the same shape — not shipped, GenerateDocumentationFile=false, so IDE0005 would hard-error demanding the doc file rather than run. It still gates src/. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
| { | ||
| Assert.Throws<ArgumentNullException>(() => UpdateCleanup.Run((IServiceProvider)null!)); | ||
| } | ||
| public void Run_with_null_services_throws() => Assert.Throws<ArgumentNullException>(() => UpdateCleanup.Run((IServiceProvider)null!)); |
| { | ||
| Assert.Throws<ArgumentNullException>(() => UpdateCleanup.Run((IUpdateInstaller)null!, new TestConsole())); | ||
| } | ||
| public void Run_with_null_installer_throws() => Assert.Throws<ArgumentNullException>(() => UpdateCleanup.Run((IUpdateInstaller)null!, new TestConsole())); |
Comment on lines
+131
to
+134
| } | ||
|
|
||
| if (!EndsWithRidAndArchive(asset.Name, ridSuffix)) | ||
| { |
| } | ||
|
|
||
| public string Combine(params string[] parts) => System.IO.Path.Combine(new[] { Path }.Concat(parts).ToArray()); | ||
| public string Combine(params string[] parts) => System.IO.Path.Combine([Path, .. parts]); |
`dotnet format`'s IDE0022 conversion hoisted two leading comments into the gap between `=>` and the expression. Roslyn's formatter and the canonical .editorconfig disagree about the newline trivia around a comment in that position, and the disagreement only surfaces on the Windows runner — the ubuntu and macOS legs, and a local Linux build, all report zero warnings. Both sites now carry the comment above the member, which is the shape they had before the reformat and reads better anyway. No behaviour change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 21, 2026
Closed
Merged
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.
Brings the repo up to the two NextIteration.Standards clauses that changed after its adoption.
What
.editorconfigreplaced with the revised canonical copy. It is a deliberate allow-list of gated style rules (no blanketdotnet_analyzer_diagnostic.severity), so a style rule a future SDK ships never auto-gates the build.EnforceCodeStyleInBuild=true, now aMUST.Directory.Build.propsequals the template in non-comment content.IDE0005added to the test project'sNoWarn, and to the demo's for the same reason.Closes the
1.2 Directory.Build.propsand5.2 .editorconfig canonrows inaudit-drift.sh.The reformat
92 sites, mechanical and behaviour-preserving:
ifssrc/varApplied with
dotnet format style, plus the collection-expression sites its fixer does not handle.IDE0005 in the demo
IDE0005only runs in-build whenGenerateDocumentationFileistrue. Both the test and demo projects set itfalse— neither is shipped, so neither carries XML docs, andTreatWarningsAsErrorswould otherwise fail the build over every missing one. WithEnforceCodeStyleInBuildon,IDE0005then hard-errors demanding the doc file be enabled. §2.7 resolves this for test projects; the demo is the same shape and needs the same opt-out. It still gatessrc/, where the doc file is on — and it caught five real unnecessary usings there.Verification
Local
Releasebuild: 0 warnings, 0 errors.dotnet test --configuration Release: 392 passed, 0 failed (196 ×net8.0/net10.0) — same count as before the reformat.No change to the library, its public surface, or the package contents.
🤖 Generated with Claude Code