Skip to content

Conversation

@glennawatson
Copy link
Contributor

  • Cleanup editorconfig file, remove old settings, add description for each setting. Will be migrated to other repos in the future.
  • New AOT compatibility settings for non-test, non-WPF projects targeting .NET 8.0 and above in Directory.Build.props.
  • Enabled trim analyzers and set trimming warnings to be treated as errors.
  • Refactored NewGameViewModel to use a cryptographically secure random number generator for shuffling player order.
  • Improved readability by formatting code and adding a ShuffleCrypto method for better separation of concerns.
  • Minor documentation update in SuspensionHost.cs to improve clarity.

… each setting. Will be migrated to other repos in the future.

- New AOT compatibility settings for non-test, non-WPF projects targeting .NET 8.0 and above in Directory.Build.props.
- Enabled trim analyzers and set trimming warnings to be treated as errors.
- Refactored NewGameViewModel to use a cryptographically secure random number generator for shuffling player order.
- Improved readability by formatting code and adding a ShuffleCrypto method for better separation of concerns.
- Minor documentation update in SuspensionHost.cs to improve clarity.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request performs a comprehensive cleanup and modernization of the ReactiveUI codebase, focusing on configuration improvements, security enhancements, and documentation updates.

Key Changes:

  • Reorganized and enhanced the .editorconfig file with detailed categorization, comments, and expanded analyzer rules including comprehensive security rules
  • Added AOT (Ahead-of-Time) compatibility settings for .NET 8.0+ projects with trim analyzers enabled
  • Refactored NewGameViewModel to use cryptographically secure random number generation (RandomNumberGenerator) instead of the standard Random class

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
.editorconfig Complete reorganization with categorized sections, descriptive comments for all rules, and extensive security analyzer configurations (CA series) covering SQL injection, XSS, deserialization, cryptography, TLS/SSL, and other security concerns
src/Directory.Build.props Added AOT compatibility settings for non-test, non-WPF projects targeting .NET 8.0+, including IsAotCompatible flag, trim analyzers, and treating trimming warnings as errors
src/ReactiveUI.Tests/ObservedChanged/Mocks/NewGameViewModel.cs Replaced insecure Random-based shuffling with Fisher-Yates shuffle using RandomNumberGenerator for cryptographic security; improved code formatting and separation of concerns with dedicated ShuffleCrypto method
src/ReactiveUI/Suspension/SuspensionHost.cs Removed cref tag from AutoSuspendHelper reference in documentation comment for clarity

@codecov
Copy link

codecov bot commented Dec 21, 2025

Codecov Report

❌ Patch coverage is 82.88288% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.55%. Comparing base (1e44aed) to head (00c2c30).

Files with missing lines Patch % Lines
...I.Winforms/WinformsCreatesObservableForProperty.cs 73.91% 5 Missing and 1 partial ⚠️
.../ReactiveUI/Suspension/SuspensionHostExtensions.cs 78.57% 0 Missing and 3 partials ⚠️
src/ReactiveUI.Testing/MessageBusExtensions.cs 0.00% 2 Missing ⚠️
src/ReactiveUI/ReactiveCommand/ReactiveCommand.cs 50.00% 2 Missing ⚠️
...activeUI.Blazor/ReactiveInjectableComponentBase.cs 50.00% 0 Missing and 1 partial ⚠️
src/ReactiveUI.Testing/RxTest.cs 0.00% 1 Missing ⚠️
...c/ReactiveUI.Winforms/ContentControlBindingHook.cs 0.00% 1 Missing ⚠️
...ctiveUI.Winforms/PanelSetMethodBindingConverter.cs 0.00% 1 Missing ⚠️
....Winforms/TableContentSetMethodBindingConverter.cs 0.00% 1 Missing ⚠️
src/ReactiveUI/View/DefaultViewLocator.cs 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #4239       +/-   ##
===========================================
+ Coverage   40.77%   54.55%   +13.78%     
===========================================
  Files         146      175       +29     
  Lines        6744     7599      +855     
  Branches     1038     1266      +228     
===========================================
+ Hits         2750     4146     +1396     
+ Misses       3794     3275      -519     
+ Partials      200      178       -22     

☔ View full report in Codecov by Sentry.
📢 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.

@glennawatson glennawatson requested a review from Copilot December 21, 2025 05:59
@glennawatson glennawatson changed the title Cleanup editorconfig file, remove old settings, minor other fixes. Cleanup editorconfig file, reorganise tests, other cleanup Dec 21, 2025
@glennawatson glennawatson changed the title Cleanup editorconfig file, reorganise tests, other cleanup chore: Cleanup editorconfig file, reorganise tests, other cleanup Dec 21, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 43 out of 317 changed files in this pull request and generated 6 comments.

glennawatson and others added 13 commits December 21, 2025 17:02
… add new tests for ViewLocator functionality.
Update project files to set OutputType to Exe for test projects and adjust package references
Re-enable the windows targets on the maui tests
Disable test temporarily
…nfig-update

# Conflicts:
#	src/ReactiveUI/Platforms/android/AutoSuspendHelper.cs
#	src/ReactiveUI/Platforms/mac/AutoSuspendHelper.cs
#	src/ReactiveUI/Suspension/SuspensionHost.cs
#	src/ReactiveUI/Suspension/SuspensionHostExtensions.cs
Document the maui tests fully
…ngs, and property bindings

- Add 16 test files for all type converters (byte, short, int, long, decimal, double, float, and nullable versions)
- Add tests for EqualityTypeConverter and StringConverter
- Add comprehensive tests for CreatesCommandBindingViaCommandParameter
- Add comprehensive tests for CreatesCommandBindingViaEvent
- Add tests for PropertyBindingMixins (Bind, OneWayBind, BindTo)
- Total: 129 new tests, all passing
- Significantly improves coverage from ~16-30% to near 100% for tested components
- Add 11 tests for CanActivateViewFetcher covering GetAffinityForView and GetActivationForView
- Tests verify affinity calculations for ICanActivate types
- Tests verify activation/deactivation observable sequences
- Use ObserveOn(ImmediateScheduler.Instance) for proper reactive testing
- Total test count increased from 1440 to 1470 tests
- Improves coverage for CanActivateViewFetcher from 0% to near 100%
- Add 15 tests for ExpressionRewriter covering all expression types
- Tests verify parameter, member access, constant, convert expressions
- Tests verify array index, list indexer, array length rewriting
- Tests verify error handling for unsupported expressions
- Total test count increased from 1470 to 1515 tests
- Improves coverage for ExpressionRewriter from 43.75% to near 100%
- Add 26 tests for Reflection class covering key methods
- Tests verify ExpressionToPropertyNames functionality
- Tests verify GetValueFetcherForProperty and GetValueSetterForProperty
- Tests verify property chain operations (get/set values)
- Tests verify ReallyFindType with caching
- Tests verify GetEventArgsTypeForEvent and IsStatic
- Total test count increased from 1515 to 1593 tests
- Significantly improves coverage for Reflection class methods
…mTests

- Resolves namespace conflict with ReactiveUI.Tests.Expression namespace
- Fixes build error on Linux CI
- Add tests for string-to-number conversion with rounding hints
- Tests cover DecimalToStringTypeConverter, DoubleToStringTypeConverter
- Tests cover SingleToStringTypeConverter and nullable versions
- Total test count increased from 1593 to 1611 tests
- Converter coverage improved from 85-89% to near 100%
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.

3 participants