Skip to content

Add BuildTestFormat script and project skills - #1475

Merged
ardalis merged 1 commit into
mainfrom
chore/add-skills-and-build-script
Oct 3, 2026
Merged

ardalis merged 1 commit into
mainfrom
chore/add-skills-and-build-script

Conversation

@ardalis

@ardalis ardalis commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • BuildTestFormat.cs: a file-based .NET script (dotnet ./BuildTestFormat.cs) that restores, builds, runs each *Tests.csproj with a pass/fail summary, and then runs dotnet 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.
  • Skills: adds .claude/skills/aspire-integration-testing and .claude/skills/csharp-coding-standards.

Review fixes

Codex review found two problems, both fixed:

  • The script called 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.
  • Several value-object examples in csharp-coding-standards declared a positional record struct and 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-changes reports 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
  • Codex review: no remaining findings

🤖 Generated with Claude Code

- 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>
@ardalis
ardalis merged commit 730e263 into main Oct 3, 2026
3 checks passed
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.

1 participant