Skip to content

Establish reproducible formatting baseline#232

Merged
Widthdom merged 2 commits into
mainfrom
agent/enforce-formatting-baseline-218
Jul 25, 2026
Merged

Establish reproducible formatting baseline#232
Widthdom merged 2 commits into
mainfrom
agent/enforce-formatting-baseline-218

Conversation

@Widthdom

@Widthdom Widthdom commented Jul 25, 2026

Copy link
Copy Markdown
Owner

CLOSES #218

What

  • Pin the formatting SDK to .NET SDK 8.0.423 with roll-forward disabled.
  • Make .editorconfig the explicit formatting source of truth and define LF/CRLF plus generated-code handling.
  • Add .gitattributes for deterministic checkout line endings and binary assets.
  • Apply the one-time dotnet format baseline to all currently drifting C# files.
  • Add a blocking formatting verification step to the main CI workflow.
  • Document local verification and fix commands in English and Japanese.
  • Add an architecture test that protects the SDK pin, formatting rules, line-ending policy, documentation, and CI gate.

Why

The repository previously used global.json with latestMinor, so formatting could resolve to different SDKs across developer machines and CI. The committed C# baseline also failed dotnet format --verify-no-changes, and neither CI nor contributor documentation prevented future drift.

Impact

This intentionally changes repository formatting and automation only. The mechanical C# baseline is whitespace-only and introduces no intended runtime behavior changes. CI will now reject formatting drift.

Validation

  • dotnet format FolderDiffIL4DotNet.sln --verify-no-changes --no-restore --verbosity minimal
  • dotnet build FolderDiffIL4DotNet.sln --configuration Release --no-restore --nologo -m:1
  • dotnet test FolderDiffIL4DotNet.Tests/FolderDiffIL4DotNet.Tests.csproj --configuration Release --no-build --no-restore --nologo -m:1 — 2036 passed, 1 existing E2E skipped
  • Focused formatting-baseline architecture test — passed
  • git diff --check
  • Adversarial review against origin/main — no remaining findings

Checklist

  • I read AGENT_GUIDE.md.
  • I used the nildiff command name in user-facing text.
  • I ran the relevant tests.
  • I ran the Release configuration test.
  • I updated English and Japanese contributor documentation.
  • I did not add secrets, tags, or publish steps.
  • I used explicit git add <file> paths only.

@Widthdom
Widthdom marked this pull request as ready for review July 25, 2026 07:33
@Widthdom
Widthdom merged commit c2796a6 into main Jul 25, 2026
9 checks passed
@Widthdom
Widthdom deleted the agent/enforce-formatting-baseline-218 branch July 26, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Establish a reproducible formatting baseline and enforce it in CI

1 participant