ci: enforce dotnet format baseline#397
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
This PR adds a CI quality gate that fails builds when dotnet format --verify-no-changes detects formatting drift, and documents the same expectation for contributors to run locally before opening PRs.
Changes:
- Add a
dotnet format PatternKit.slnx --verify-no-changescheck to PR CI workflows (PR validation + CI PR checks). - Add the same formatting check to
mainrelease CI. - Update the quality gates guide to include and describe the enforced formatting gate.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| docs/guides/quality-gates.md | Documents the new dotnet format --verify-no-changes gate as part of the required local quality checks. |
| .github/workflows/pr-validation.yml | Adds a formatting verification step before build/test in PR validation CI. |
| .github/workflows/ci.yml | Adds formatting verification to both pull request checks and main release CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Verify formatting | ||
| run: dotnet format PatternKit.slnx --verify-no-changes --verbosity minimal |
| - name: Verify formatting | ||
| run: dotnet format PatternKit.slnx --verify-no-changes --verbosity minimal |
| - name: Verify formatting | ||
| run: dotnet format PatternKit.slnx --verify-no-changes --verbosity minimal |
| - name: Verify formatting | ||
| run: dotnet format PatternKit.slnx --verify-no-changes --verbosity minimal |
| - name: Verify formatting | ||
| run: dotnet format PatternKit.slnx --verify-no-changes --verbosity minimal |
| - name: Verify formatting | ||
| run: dotnet format PatternKit.slnx --verify-no-changes --verbosity minimal |
| ```bash | ||
| dotnet restore PatternKit.slnx --use-lock-file | ||
| dotnet format PatternKit.slnx --verify-no-changes --verbosity minimal | ||
| dotnet build PatternKit.slnx --configuration Release --no-restore -m:1 |
| dotnet restore PatternKit.slnx --use-lock-file | ||
| dotnet format PatternKit.slnx --verify-no-changes --verbosity minimal | ||
| dotnet build PatternKit.slnx --configuration Release --no-restore -m:1 |
| ## Formatting and static analysis | ||
|
|
||
| The repository includes a root `.editorconfig` so editors and `dotnet format` agree on basic C# layout and style. The current source tree still has historical whitespace that makes a full solution `dotnet format --verify-no-changes` fail with a very large formatting-only diff. Treat that as a dedicated cleanup task, not a drive-by change inside feature work. | ||
| The repository includes a root `.editorconfig` so editors, `dotnet format`, and CI agree on basic C# layout and style. Run `dotnet format PatternKit.slnx --verify-no-changes --verbosity minimal` before opening a PR; CI enforces the same gate for pull requests and `main` releases. |
Test Results 12 files 12 suites 9m 11s ⏱️ Results for commit e9038c7. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #397 +/- ##
==========================================
+ Coverage 89.55% 95.63% +6.08%
==========================================
Files 530 530
Lines 42899 42899
Branches 6203 6203
==========================================
+ Hits 38417 41026 +2609
+ Misses 2023 1873 -150
+ Partials 2459 0 -2459
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🔍 PR Validation ResultsVersion: `` ✅ Validation Steps
📊 ArtifactsDry-run artifacts have been uploaded and will be available for 7 days. This comment was automatically generated by the PR validation workflow. |
Code Coverage |
Summary
Validation