Drop the formatting step, which spent minutes agreeing with the build
ci / build and test (push) Successful in 1m11s
ci / android head (push) Failing after 4s
ci / api image (push) Successful in 43s

`dotnet format --verify-no-changes` re-analysed the whole solution before the build did, to
reach a verdict the build reaches on its own: IDE0055 is an error in .editorconfig,
EnforceCodeStyleInBuild is on and warnings are errors, so a misformatted file fails the
build step. What the separate step bought was hearing about it a few minutes earlier, and
it charged those minutes on every run.

Checked rather than assumed, because the whole justification rests on it: appending a
badly-spaced member to a source file produces three `error IDE0055` lines and a failed
build with no format step in sight.

Three places said the old arrangement out loud and would now be wrong on their own — the
comment on the IDE0055 line, the conventions list in the README, and a note in
platform-flags telling people to run dotnet format before pushing or CI would fail them.
They say the build enforces it now. dotnet format is still how to fix what the build
complains about; it just no longer gates anything.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-01 21:43:32 +02:00
co-authored by Claude Opus 5
parent ddf0dd6a2b
commit ffab2be22a
4 changed files with 15 additions and 7 deletions
+3 -1
View File
@@ -91,7 +91,9 @@ dotnet_naming_style.camel_case_style.capitalization = camel_case
#### Diagnostics #### #### Diagnostics ####
# Formatting violations fail the build; `dotnet format --verify-no-changes` gates CI. # Formatting violations fail the build, and that is now the whole of the enforcement: CI
# has no `dotnet format --verify-no-changes` step any more, because this line already
# fails it.
dotnet_diagnostic.IDE0055.severity = error dotnet_diagnostic.IDE0055.severity = error
# ConfigureAwait is not meaningful in ASP.NET Core (no SynchronizationContext). It IS # ConfigureAwait is not meaningful in ASP.NET Core (no SynchronizationContext). It IS
+5 -2
View File
@@ -104,8 +104,11 @@ jobs:
- name: restore - name: restore
run: dotnet restore DodoSSH.slnx --locked-mode run: dotnet restore DodoSSH.slnx --locked-mode
- name: verify formatting # No `dotnet format --verify-no-changes` step. It re-analysed the whole solution before
run: dotnet format DodoSSH.slnx --verify-no-changes --no-restore # the build did, for minutes, to check something the build already checks: IDE0055 is an
# error in .editorconfig and TreatWarningsAsErrors is on, so a misformatted file fails
# the build step below on its own. What the separate step added was the ability to say
# so a few minutes earlier, and it cost more than that on every run.
# Avalonia's headless renderer is still Skia, and libSkiaSharp.so — which the layout # Avalonia's headless renderer is still Skia, and libSkiaSharp.so — which the layout
# test project copies into its own output — links against libfontconfig. Without that # test project copies into its own output — links against libfontconfig. Without that
+2 -1
View File
@@ -366,7 +366,8 @@ keychain plus a terminal — and the spike that gates all of it.
### Conventions the build enforces ### Conventions the build enforces
- Warnings are errors. `dotnet format --verify-no-changes` gates CI. - Warnings are errors, formatting included: `IDE0055` is an error in `.editorconfig`, so a
misformatted file fails the build itself rather than a separate CI step.
- Package versions are centralised in `Directory.Packages.props`; `packages.lock.json` is - Package versions are centralised in `Directory.Packages.props`; `packages.lock.json` is
committed and CI restores in locked mode. committed and CI restores in locked mode.
- [`BannedSymbols.txt`](BannedSymbols.txt) bans `DateTime.UtcNow` (use `TimeProvider`), - [`BannedSymbols.txt`](BannedSymbols.txt) bans `DateTime.UtcNow` (use `TimeProvider`),
+5 -3
View File
@@ -479,9 +479,11 @@ locates a fixture by source path passes locally and fails in CI. Copy fixtures t
directory and read them via `AppContext.BaseDirectory` instead; `GoldenVectorTests` shows the directory and read them via `AppContext.BaseDirectory` instead; `GoldenVectorTests` shows the
pattern. pattern.
**`dotnet format --verify-no-changes` is part of the CI gate** and exits non-zero on style **Formatting fails the build rather than a separate step.** `IDE0055` is an error in
warnings, not just whitespace. Run it before pushing; a build with zero warnings can still fail `.editorconfig` and `EnforceCodeStyleInBuild` is on, so `dotnet build` reports misformatted code
that step. the way it reports a type error. CI used to run `dotnet format --verify-no-changes` as well; it
was removed for spending minutes to reach a verdict the build reaches anyway. `dotnet format` is
still how to *fix* what the build complains about — it just no longer gates anything itself.
## Deployment ## Deployment