Repository navigation
breaking: Remove netstandard2.0, reorganise tests with more coverage - #4239
Conversation
… 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.
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% 59.68% +18.91%
===========================================
Files 146 174 +28
Lines 6744 7566 +822
Branches 1038 1236 +198
===========================================
+ Hits 2750 4516 +1766
+ Misses 3794 2885 -909
+ Partials 200 165 -35 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…pertyTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… 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
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%
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Uh oh!
There was an error while loading. Please reload this page.