Repository navigation
Add BuildTestFormat script and project skills - #1475
Merged
Merged
Conversation
- BuildTestFormat.cs: file-based script that restores, builds, tests each test project, and verifies formatting; run with `dotnet ./BuildTestFormat.cs` - AGENTS.md: tell agents to run the script before committing - Add aspire-integration-testing and csharp-coding-standards skills - Fix value-object examples in csharp-coding-standards that failed to compile (CS0111 duplicate constructor on positional record structs) Co-Authored-By: Claude Opus 5.5 (1M context) <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.
Summary
BuildTestFormat.cs: a file-based .NET script (dotnet ./BuildTestFormat.cs) that restores, builds, runs each*Tests.csprojwith a pass/fail summary, and then runsdotnet format --verify-no-changes. If Playwright browsers are missing, it installs them and retries.AGENTS.md: tells agents to run the script after code changes and before committing..claude/skills/aspire-integration-testingand.claude/skills/csharp-coding-standards.Review fixes
Codex review found two problems, both fixed:
dotnet test --project, which only works in Microsoft.Testing.Platform mode. This repo runs tests through VSTest, so the command failed. The script now passes the project path positionally.csharp-coding-standardsdeclared a positionalrecord structand then added a constructor with the same signature (CS0111). They now use explicit properties and a validating constructor. I compiled and ran the corrected examples to check them.Known issue
The script's format step fails on the current main:
dotnet format --verify-no-changesreports about 11k problems in existing code, mostly whitespace, plus end-of-line, charset, import-ordering and file-scoped-namespace issues in old migrations. This PR doesn't change that. Until the repo is reformatted, the script will always exit non-zero, even though build and tests pass.Test plan
dotnet ./BuildTestFormat.cs: build OK; FunctionalTests 3/3, Tests 104/104, UnitTests 154/154; format step fails as described above🤖 Generated with Claude Code