Skip to content

ci: enforce dotnet format baseline#397

Merged
JerrettDavis merged 1 commit into
mainfrom
ci/enforce-dotnet-format
May 28, 2026
Merged

ci: enforce dotnet format baseline#397
JerrettDavis merged 1 commit into
mainfrom
ci/enforce-dotnet-format

Conversation

@JerrettDavis

Copy link
Copy Markdown
Owner

Summary

  • add a dotnet format --verify-no-changes gate to PR CI and main release CI
  • document the enforced format gate in the quality guide
  • keep formatting checks before build/test so drift fails quickly

Validation

  • dotnet format PatternKit.slnx --verify-no-changes --verbosity minimal
  • git diff --check
  • dotnet build PatternKit.slnx --configuration Release --no-restore -m:1

Copilot AI review requested due to automatic review settings May 28, 2026 01:09
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-changes check to PR CI workflows (PR validation + CI PR checks).
  • Add the same formatting check to main release 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.

Comment on lines +67 to +68
- name: Verify formatting
run: dotnet format PatternKit.slnx --verify-no-changes --verbosity minimal
Comment on lines +67 to +68
- name: Verify formatting
run: dotnet format PatternKit.slnx --verify-no-changes --verbosity minimal
Comment thread .github/workflows/ci.yml
Comment on lines +41 to +42
- name: Verify formatting
run: dotnet format PatternKit.slnx --verify-no-changes --verbosity minimal
Comment thread .github/workflows/ci.yml
Comment on lines +41 to +42
- name: Verify formatting
run: dotnet format PatternKit.slnx --verify-no-changes --verbosity minimal
Comment thread .github/workflows/ci.yml
Comment on lines +140 to +141
- name: Verify formatting
run: dotnet format PatternKit.slnx --verify-no-changes --verbosity minimal
Comment thread .github/workflows/ci.yml
Comment on lines +140 to +141
- name: Verify formatting
run: dotnet format PatternKit.slnx --verify-no-changes --verbosity minimal
Comment on lines 9 to 12
```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
Comment on lines 10 to 12
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.
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

    12 files      12 suites   9m 11s ⏱️
 3 513 tests  3 513 ✅ 0 💤 0 ❌
10 550 runs  10 550 ✅ 0 💤 0 ❌

Results for commit e9038c7.

@codecov

codecov Bot commented May 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.63%. Comparing base (17c6d72) to head (e9038c7).

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     
Flag Coverage Δ
unittests 95.63% <ø> (+6.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 PR Validation Results

Version: ``

✅ Validation Steps

  • Build solution
  • Run tests
  • Build documentation
  • Dry-run NuGet packaging

📊 Artifacts

Dry-run artifacts have been uploaded and will be available for 7 days.


This comment was automatically generated by the PR validation workflow.

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Summary
  Generated on: 05/28/2026 - 01:17:29
  Coverage date: 05/28/2026 - 01:14:44 - 05/28/2026 - 01:17:17
  Parser: MultiReport (12x Cobertura)
  Assemblies: 5
  Classes: 1613
  Files: 649
  Line coverage: 94.6%
  Covered lines: 42062
  Uncovered lines: 2387
  Coverable lines: 44449
  Total lines: 97120
  Branch coverage: 75.5% (12374 of 16380)
  Covered branches: 12374
  Total branches: 16380
  Method coverage: 96% (8425 of 8770)
  Full method coverage: 88.1% (7731 of 8770)
  Covered methods: 8425
  Fully covered methods: 7731
  Total methods: 8770

PatternKit.Core                                                                                                     95.4%
  PatternKit.Application.ActivityTracking.ActivityGateState                                                          100%
  PatternKit.Application.ActivityTracking.ActivityLease                                                              100%
  PatternKit.Application.ActivityTracking.ActivityRecord                                                             100%
  PatternKit.Application.ActivityTracking.ActivityTracker                                                            100%
  PatternKit.Application.AntiCorruption.AntiCorruptionLayer<T1, T2>                                                 90.4%
  PatternKit.Application.AntiCorruption.AntiCorruptionResult<T>                                                      100%
  PatternKit.Application.AuditLog.AuditLogAppendResult<T>                                                           85.7%
  PatternKit.Application.AuditLog.InMemoryAuditLog<T1, T2>                                                          95.4%
  PatternKit.Application.DataMapping.DataMapper<T1, T2>                                                             94.6%
  PatternKit.Application.DataMapping.DataMapperError                                                                  90%
  PatternKit.Application.DataMapping.DataMapperResult<T>                                                            84.6%
  PatternKit.Application.DomainEvents.DomainEventDispatcher<T>                                                      95.4%
  PatternKit.Application.DomainEvents.DomainEventDispatchResult                                                      100%
  PatternKit.Application.EventSourcing.EventStoreAppendResult                                                        100%
  PatternKit.Application.EventSourcing.InMemoryEventStore<T1, T2>                                                   97.9%
  PatternKit.Application.EventSourcing.StoredEvent<T1, T2>                                                            80%
  PatternKit.Application.FeatureToggles.FeatureToggleDecision                                                       87.5%
  PatternKit.Application.FeatureToggles.FeatureToggleRule<T>                                                         100%
  PatternKit.Application.FeatureToggles.FeatureToggleSet<T>                                                         96.9%
  PatternKit.Application.IdentityMap.IdentityMap<T1, T2>                                                             100%
  PatternKit.Application.IdentityMap.IdentityMapResult<T>                                                           92.8%
  PatternKit.Application.MaterializedViews.MaterializedView<T1, T2>                                                 98.4%
  PatternKit.Application.Repository.InMemoryRepository<T1, T2>                                                      92.8%
  PatternKit.Application.Repository.RepositoryResult<T>                                                             93.3%
  PatternKit.Application.ServiceLayer.ServiceLayerOperation<T1, T2>                                                 96.7%
  PatternKit.Application.ServiceLayer.ServiceLayerResult<T>                                                         94.7%
  PatternKit.Application.ServiceLayer.ServiceLayerRule<T>                                                            100%
  PatternKit.Application.Specification.Specification<T>                                                              100%
  PatternKit.Application.Specification.SpecificationRegistry<T>                                                     93.3%
  PatternKit.Application.TableDataGateway.InMemoryTableDataGateway<T1, T2>                                            86%
  PatternKit.Application.TableDataGateway.TableGatewayResult<T>                                                     82.3%
  PatternKit.Application.TransactionScript.TransactionScript<T1, T2>                                                  97%
  PatternKit.Application.TransactionScript.TransactionScriptError                                                     90%
  PatternKit.Application.TransactionScript.TransactionScriptResult<T>                                                100%
  PatternKit.Application.UnitOfWork.UnitOfWork                                                                      90.9%
  PatternKit.Application.UnitOfWork.UnitOfWorkResult                                                                94.7%
  PatternKit.Application.UnitOfWork.UnitOfWorkRollbackResult                                                         100%
  PatternKit.Application.UnitOfWork.UnitOfWorkStep                                                                   100%

@JerrettDavis JerrettDavis merged commit 74e3bda into main May 28, 2026
13 checks passed
@JerrettDavis JerrettDavis deleted the ci/enforce-dotnet-format branch May 28, 2026 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants