chore(analyzers)!: adopt the 3.43.2 analyzer baseline - #68
Open
glennawatson wants to merge 1 commit into
Open
Conversation
- Move StyleSharp, PerformanceSharp and SecuritySharp to 3.43.2 and take the shared .editorconfig, then clear the diagnostics that surfaced. - PascalCase every tuple element name on the public surface. WhenAnyValue, WhenChanged and WhenChanging now return (T1 Property1, ...) and Bind returns (object? View, bool IsViewModel). - Move Microsoft.Maui.Controls on net11 to 11.0.0-preview.7.26406.9, matching the workload that builds it. Roslyn stays pinned at the 4.8.0 shipping floor. - Relax SST2334 for tests and benchmarks. A fixture or harness is read through assertions, not a debugger summary; product code keeps the rule. - Suppress SST2461 on the DynamicallyAccessedMemberTypes polyfill. Its values must stay identical to the BCL enum the newer targets type-forward to. - Replace a racy bool latch in the initial-emit serialization test with Interlocked.Exchange. Two threads could pass it and mask the race it guards. BREAKING CHANGE: public tuple element names are now PascalCase. A caller reading x.property1 or x.view must read x.Property1 or x.View instead. Tuple element names are metadata only, so this is a source break, not a binary one.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #68 +/- ##
==========================================
- Coverage 97.56% 97.55% -0.01%
==========================================
Files 228 228
Lines 7840 7826 -14
Branches 1077 1071 -6
==========================================
- Hits 7649 7635 -14
Misses 143 143
Partials 48 48 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.



What kind of change does this PR introduce?
Build and maintenance, with one breaking change to the public surface.
What is the new behavior?
The repo builds against the 3.43.2 analyzer baseline and the shared .editorconfig, and public tuple element names are PascalCase.
WhenAnyValue,WhenChangedandWhenChangingreturn(T1 Property1, T2 Property2, ...)for arities 2 through 16, andBindreturnsIReactiveBinding<TView, (object? View, bool IsViewModel)>.RuntimeObservationFallbackno longer disagree about what an element is called.SST2334is off for tests and benchmarks: a fixture or a harness is read through assertions, not a debugger summary. Product code still enforces it.SST2461is suppressed on theDynamicallyAccessedMemberTypespolyfill, whose values must stay numerically identical to the BCL enum the newer targets type-forward to.What is the current behavior?
x.property1,x.view), and disagree withRuntimeObservationFallback, which already returned PascalCase elements.Microsoft.Maui.Controlson net11 is pinned to preview.6.InitialEmitCompetitorin the initial-emit serialization test claims its turn with a plainboolcheck-then-set. Two threads can pass it, which throws out of the source's event handler or stalls instead of reporting the emission sequence - in the test that exists to catch exactly that class of race.What might this PR break?
x.property1orx.viewmust readx.Property1orx.View. Element names are metadata only, so existing binaries keep working and only recompilation is affected.Checklist
mainbranchAdditional information
Most of the diff is mechanical; the hand-written parts are a short list.
Mechanical, and safe to skim:
*.g.verified.cssnapshots - element casing, plus dispatch line numbers and their derived method-name hashes.[MethodImpl(MethodImplOptions.AggressiveInlining)]attributes and their imports, applied where the analyzer reported them.Worth actual review:
src/Directory.Packages.props,src/tests/.editorconfig,src/benchmarks/.editorconfigCodeGeneration/BindCodeGenerator.csandCodeGeneration/ObservationCodeGenerator.cs- the two places the generator emitted tuple element names as literalsPolyfills/DynamicallyAccessedMemberTypes.cs- the suppression and its justificationObservables/PropertyChangingObservableInitialEmitSerializationTests.cs- the latch now usesInterlocked.ExchangeWpf.Shared/BooleanToVisibilityTypeConverter.cs- restructured into an early-exit guard; both original branch expressions are preserved verbatim<exception>documentation added across the binding mixins, and theDebuggerDisplaystrings on the runtime types