-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
chore: Cleanup editorconfig file, reorganise tests, other cleanup #4239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
glennawatson
commented
Dec 21, 2025
- 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.
There was a problem hiding this 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 Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this 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.
src/tests/ReactiveUI.Tests.Core/Resolvers/PocoObservableForPropertyTests.cs
Outdated
Show resolved
Hide resolved
src/tests/ReactiveUI.Tests.Core/Commands/ReactiveCommandTest.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…pertyTests.cs Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
… add new tests for ViewLocator functionality.
Update project files to set OutputType to Exe for test projects and adjust package references
…ing IsTestProject=false
…ntion consistency
Re-enable the windows targets on the maui tests
…ue initialization
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
Fix API approvals
Document the maui tests fully
…, routing mixins, and POCO observables
…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%