diff --git a/.editorconfig b/.editorconfig index b7bc01e..8ae9273 100644 --- a/.editorconfig +++ b/.editorconfig @@ -91,7 +91,9 @@ dotnet_naming_style.camel_case_style.capitalization = camel_case #### 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 # ConfigureAwait is not meaningful in ASP.NET Core (no SynchronizationContext). It IS diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9596ef..33e7ff5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,8 +104,11 @@ jobs: - name: restore run: dotnet restore DodoSSH.slnx --locked-mode - - name: verify formatting - run: dotnet format DodoSSH.slnx --verify-no-changes --no-restore + # No `dotnet format --verify-no-changes` step. It re-analysed the whole solution before + # 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 # test project copies into its own output — links against libfontconfig. Without that diff --git a/README.md b/README.md index 0f36fcd..b33a7c2 100644 --- a/README.md +++ b/README.md @@ -366,7 +366,8 @@ keychain plus a terminal — and the spike that gates all of it. ### 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 committed and CI restores in locked mode. - [`BannedSymbols.txt`](BannedSymbols.txt) bans `DateTime.UtcNow` (use `TimeProvider`), diff --git a/docs/platform-flags.md b/docs/platform-flags.md index 3e91090..23fe04d 100644 --- a/docs/platform-flags.md +++ b/docs/platform-flags.md @@ -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 pattern. -**`dotnet format --verify-no-changes` is part of the CI gate** and exits non-zero on style -warnings, not just whitespace. Run it before pushing; a build with zero warnings can still fail -that step. +**Formatting fails the build rather than a separate step.** `IDE0055` is an error in +`.editorconfig` and `EnforceCodeStyleInBuild` is on, so `dotnet build` reports misformatted code +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