Fix MA0206 unnecessary-braces violations blocking Release builds#2320
Merged
Conversation
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.
|
NuGet packages for this PR, e.g. Cratis.Arc: |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed
MA0206(unnecessary braces in type declaration) errors that were blocking Release-configuration builds afterMeziantou.Analyzerwas bumped to3.0.117.Summary
These exception types never went through Release-configuration CI to catch the new analyzer rule, since the
.NET BuildandPublishworkflows both only trigger onSource/**paths and the analyzer bump only touched the rootDirectory.Packages.propsmanifest. Switched to semicolon-bodied primary constructor syntax per the project's own convention for types with no implementation body.