Skip to content

Commit b797528

Browse files
Claude (Initial Force WPF Bot)claude
andcommitted
fix(.editorconfig): restore CA1052 suggestion severity
Cherry-pick dfd7ac3 ("Fix CA1052 in the codebase") removed the CA1052 severity downgrade in src/Microsoft.DotNet.Wpf/src/.editorconfig and converted some static-holder types to actually be static. But the upstream PR (dotnet#10718) is still OPEN — h3xds1nz never finished fixing all violations. Three types still trigger CA1052 in our cherry-picked state: - MarshalGeneric<T> (Marshalers.cs L339) — base class, not convertible to static; would need to become `abstract` - XamlParser (XamlParser.cs L58) — constructors guarded by #if PBTCOMPILER; non-PBT build has only statics - XamlReaderHelper (XamlReaderConstants.cs L28) — partial class upstream/main still has `dotnet_diagnostic.CA1052.severity = suggestion` in this same .editorconfig — so we match upstream's current state. Properly finishing upstream PR 10718 (making the three types static/ sealed/abstract correctly) is queued for a follow-up — see FORK.md "Conflicted PRs" list. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7715979 commit b797528

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/Microsoft.DotNet.Wpf/src/.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
1717
# CA1036: Override methods on comparable types
1818
dotnet_diagnostic.CA1036.severity = suggestion
1919

20+
# CA1052: Static holder types should be Static or NotInheritable
21+
# Upstream PR #10718 (cherry-picked as dfd7ac3f6) removed this severity
22+
# downgrade, but the upstream PR is still OPEN and incomplete — it does
23+
# not fix MarshalGeneric<T>, XamlParser, or XamlReaderHelper. Reinstate
24+
# the suggestion-level severity so the build passes; finishing upstream
25+
# PR 10718 (making those three types static/sealed/abstract correctly)
26+
# is tracked as a follow-up.
27+
dotnet_diagnostic.CA1052.severity = suggestion
28+
2029
# NOTE: If existing public API, CA1066 should be suppressed individually
2130
# in the GlobalSuppressions file.
2231

0 commit comments

Comments
 (0)