Skip to content

chore(deps): adopt the Sharp analyzer suite, update Primitives, modernize#4414

Merged
ChrisPulman merged 1 commit into
mainfrom
chore/nuget-package-upgrades
Jul 22, 2026
Merged

chore(deps): adopt the Sharp analyzer suite, update Primitives, modernize#4414
ChrisPulman merged 1 commit into
mainfrom
chore/nuget-package-upgrades

Conversation

@glennawatson

@glennawatson glennawatson commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Build / refactor - analyzer compliance, package updates, and code modernization. No public API or runtime behavior changes for consumers.

What is the new behavior?

  • The StyleSharp / PerformanceSharp / SecuritySharp analyzer suite (3.38.1) is enabled at error severity across every project and target framework, and the whole codebase now complies with it - style, performance, correctness, and security findings are all resolved in code. A small set of justified suppressions remain only for language-idiom cases that cannot be expressed away: the OAPH this-in-constructor pattern, interface-implementation generics, deliberately variadic overloads, and the BCL-mirroring polyfills.
  • ReactiveUI.Primitives is updated to 7.0.0, and the .NET 11 framework packages (Microsoft.Extensions.*, System.Collections.Immutable) are aligned so .NET 11 restores correctly.
  • A broad modernization pass: expression-bodied members, interpolated strings, pattern matching, nameof, static lambdas, built-in argument-throw helpers, and tighter disposal handling.
  • Verified building clean on Linux (all target frameworks, including the Windows heads via Windows targeting) and on Windows / iOS / macOS.

What is the current behavior?

The analyzer suite was pinned to an older version with most of the newer rules unenabled, ReactiveUI.Primitives was on 6.0.0, and the .NET 11 framework packages were misaligned so .NET 11 could not restore. A large number of style, performance, correctness, and security findings were outstanding across core, platform, test, and sample code.

What might this PR break?

None expected. There are no public API or runtime behavior changes; the overlapping third-party analyzer rules the suite now supersedes are turned off in .editorconfig so they do not double-report.

Checklist

  • I have read the Contribute guide
  • Tests have been added or updated (for bug fixes / features)
  • Docs have been added or updated (for bug fixes / features)
  • Changes target the main branch
  • PR title follows Conventional Commits

Additional information

The change set is large because the analyzer adoption is a repo-wide sweep, but it is overwhelmingly mechanical (net-negative line count) plus the package alignment. Verification: the full solution builds clean on Linux for every non-Apple target framework, and the Windows, iOS, and macOS heads build clean on a Windows toolchain. CI runs the complete cross-platform matrix.

@glennawatson
glennawatson force-pushed the chore/nuget-package-upgrades branch 4 times, most recently from 0d5af7c to 4b2af8f Compare July 22, 2026 06:37
…nize

- Enable StyleSharp/PerformanceSharp/SecuritySharp 3.38.1 at error across every
  project and target framework, and bring the whole codebase into compliance
  (style, performance, correctness, security) - clean on Linux and Windows.
- Update ReactiveUI.Primitives to 7.0.0 and align the net11 framework packages
  (Microsoft.Extensions.*, System.Collections.Immutable) so net11 restores.
- Modernize throughout: expression-bodied members, interpolated strings, pattern
  matching, nameof, static lambdas, built-in throw helpers, tighter disposal.
- Turn off the overlapping third-party analyzer rules the suite now supersedes;
  add justified suppressions only for documented-idiom cases (OAPH this-in-ctor,
  interface-impl generics, variadic overloads, BCL-mirror polyfills).
@glennawatson
glennawatson force-pushed the chore/nuget-package-upgrades branch from 4b2af8f to ecabc6b Compare July 22, 2026 09:00
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.58988% with 93 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.13%. Comparing base (fcf16d8) to head (ecabc6b).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
...Property/PropertyBinderImplementation.Internals.cs 90.84% 10 Missing and 3 partials ⚠️
...ared/Mixins/AutoPersistHelperMixins.Persistence.cs 94.55% 5 Missing and 6 partials ⚠️
....Shared/ReactiveCommand/CombinedReactiveCommand.cs 80.00% 3 Missing and 5 partials ⚠️
...ed/Bindings/Command/CommandBinderImplementation.cs 73.91% 4 Missing and 2 partials ⚠️
...red/Expression/Reflection.CompiledPropertyChain.cs 93.58% 3 Missing and 2 partials ⚠️
...red/Internal/WhenAny/WhenAnyObservableMergeSink.cs 28.57% 4 Missing and 1 partial ⚠️
...tiveUI.Shared/Activation/CanActivateViewFetcher.cs 0.00% 4 Missing ⚠️
...ared/Mixins/ReactiveNotifyPropertyChangedMixins.cs 40.00% 3 Missing ⚠️
.../Bindings/Property/PropertyBinderImplementation.cs 66.66% 2 Missing ⚠️
...activeUI.Shared/Builder/ReactiveUIBuilder.Build.cs 98.83% 1 Missing and 1 partial ⚠️
... and 30 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4414      +/-   ##
==========================================
+ Coverage   93.06%   93.13%   +0.07%     
==========================================
  Files         339      345       +6     
  Lines       14882    14979      +97     
  Branches     1567     1566       -1     
==========================================
+ Hits        13850    13951     +101     
+ Misses        767      755      -12     
- Partials      265      273       +8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ChrisPulman
ChrisPulman merged commit e6088d3 into main Jul 22, 2026
13 checks passed
@ChrisPulman
ChrisPulman deleted the chore/nuget-package-upgrades branch July 22, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants