Skip to content

Fix MA0206 unnecessary-braces violations blocking Release builds#2320

Merged
woksin merged 2 commits into
mainfrom
fix/ma0206-unnecessary-braces-exception-types
Jul 1, 2026
Merged

Fix MA0206 unnecessary-braces violations blocking Release builds#2320
woksin merged 2 commits into
mainfrom
fix/ma0206-unnecessary-braces-exception-types

Conversation

@woksin

@woksin woksin commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Fixed

  • Resolved 9 MA0206 (unnecessary braces in type declaration) errors that were blocking Release-configuration builds after Meziantou.Analyzer was bumped to 3.0.117.

Summary

These exception types never went through Release-configuration CI to catch the new analyzer rule, since the .NET Build and Publish workflows both only trigger on Source/** paths and the analyzer bump only touched the root Directory.Packages.props manifest. Switched to semicolon-bodied primary constructor syntax per the project's own convention for types with no implementation body.

Meziantou.Analyzer 3.0.117 (bumped in #2316) introduced rule MA0206,
which flags empty '{ }' bodies on type declarations as errors -- these
nine exception types never went through Release-configuration CI to
catch it, since the .NET Build and Publish workflows both only trigger
on Source/** paths and the bump only touched root dependency manifests.
Switch to the semicolon-bodied primary constructor syntax per the
project's own C# convention for types with no implementation body.
@woksin woksin added the patch label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

NuGet packages for this PR, e.g. Cratis.Arc:
https://github.com/cratis/arc/packages/1655206?version=20.48.3

The previous commit's GitHub Actions cache reservation for this
branch got stuck (repeated "another job may be creating this cache"
failures across dotnet-bin/dotnet-obj/js-dist/yarn/nuget keys, all
scoped to that commit SHA), which starved the specs matrix of its
build output every retry. No cache-clearing API exists for open
reservations, so bump the SHA to get fresh cache keys.
@woksin woksin merged commit 06497b2 into main Jul 1, 2026
10 of 50 checks passed
@woksin woksin deleted the fix/ma0206-unnecessary-braces-exception-types branch July 1, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant