chore: enable EnforceCodeStyleInBuild and bring code to style-green (Standards §1.2.1) - #29
Merged
Merged
Conversation
…Standards §1.2.1)
NextIteration.Standards §1.2.1 flipped from "blocked" to MUST: EnforceCodeStyleInBuild
must be true, set in Directory.Build.props (matches the revised template). It runs the
IDE analyzers in-build so the canonical .editorconfig actually gates the house style.
Bringing the code green under the flag is mechanical, behavior-preserving reformat work,
applied with `dotnet format` (run against a single TFM to avoid dotnet format's
multi-target conflict-marker bug):
- IDE0011: braces on all single-statement ifs (estate house style is braces-always)
- IDE0160: file-scoped -> block-scoped namespaces (interop layer + all test files)
- minor: expression-body/accessibility/collection-expression/using-placement fixes
IDE0005 is suppressed in the TEST project only: it requires GenerateDocumentationFile,
which §2.7 mandates false for test projects, so gating it there hard-errors ("set
GenerateDocumentationFile=true to enable IDE0005"). It still gates the shipping project.
This is a newly-surfaced consequence of the §1.2.1 flag flip; STANDARD.md §2.7 needs the
matching amendment estate-wide (the test project has zero actual unused usings).
Clean Release build (0 warnings, flag on); 334/334 tests pass on net8.0 + net10.0.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
A comment placed between => and the expression body trips IDE0055 (Fix formatting) on the Windows Roslyn analyzer, though not on the Linux/macOS legs or the local build. Move the comments above the member and make the bodies single-line in AtomicFile.BuildTempPath and one test, eliminating the only two such constructs in the tree. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ity race SelectAndGetSelected_RoundTripsDecryptedPayload flaked on macOS: Assert.True(await SelectCredentialAsync(id)) returned false because the just-added item wasn't yet visible to SelectCredentialAsync's lookup under concurrent multi-targeted keychain access — the same add-visibility race already hardened for the delete and export read-backs. Wrap the four select-after-add assertions (Keychain + libsecret) with RetryHelper. Note: AddCredentialCommand does add-then-select in production too, so this is a latent race in the experimental Keychain/libsecret backends, tracked separately. 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.
NextIteration.Standards §1.2.1 flipped from "blocked" to MUST (standards #16):
EnforceCodeStyleInBuildmust betrue, set inDirectory.Build.props(now in the canonical template). It runs the IDE analyzers in-build so the canonical.editorconfig(adopted in #27) actually gates the house style instead of merely documenting it.What's here
EnforceCodeStyleInBuild=trueinDirectory.Build.props(matches template; §1.2/§1.2.1).dotnet format:IDE0011— braces on all single-statementifs (estate house style is braces-always; this code used brace-less guards)IDE0160— file-scoped → block-scoped namespaces (the interop layer and every test file were file-scoped, so those files re-indent wholesale — that's the bulk of the diff)IDE0005suppressed in the test project only — see below.Enabling the flag makes the editorconfig's
IDE0005=warninggate at build, butIDE0005requiresGenerateDocumentationFile, which §2.7 mandatesfalsefor test projects → Roslyn hard-errors demanding the doc file. The test project has zero actual unused usings; it's a pure config conflict. Resolved by addingIDE0005to the test project'sNoWarn(agreed approach: amend §2.7 estate-wide).STANDARD.md §2.7needs the matching amendment so this is conformance, not a per-repo deviation.Tooling note
dotnet formatwrites literal merge-conflict markers into multi-targeted projects (it can't reconcile the net8 and net10 passes). Worked around by formatting against a single TFM (there are no#ifregions, so the fixes are identical across TFMs).Verification
Clean Release build with the flag on (0 warnings); 334/334 tests pass on net8.0 + net10.0.
🤖 Generated with Claude Code