-
-
Notifications
You must be signed in to change notification settings - Fork 12
refactor: fix or ignore sonar issues #922
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
Conversation
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 PR addresses SonarCloud issues by refactoring code to eliminate static analysis warnings. The changes focus on improving code quality without altering functionality.
Changes:
- Removed redundant multiplication by zero in timer configurations
- Replaced
GetCustomAttribute<T>()with more efficientIsDefined()calls - Added pragma directives to suppress unavoidable SonarCloud warnings for complexity and parameter count
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| Tests/Testably.Abstractions.Tests/TimeSystem/TimerTests.cs | Fixed timer delays by removing multiplication by zero |
| Tests/Testably.Abstractions.Testing.Tests/Statistics/StatisticsTests.Helpers.cs | Optimized obsolete attribute checking using IsDefined() |
| Source/Testably.Abstractions.Testing/Statistics/CallStatistics.cs | Suppressed parameter count warning for method with 7 parameters |
| Source/Testably.Abstractions.Testing/FileSystem/FileStreamMock.cs | Suppressed cognitive complexity warning for constructor |
Test Results 52 files ±0 52 suites ±0 34m 15s ⏱️ -19s For more details on these failures, see this check. Results for commit 359e6f5. ± Comparison against base commit 68305d1. This pull request removes 55342 and adds 55342 tests. Note that renamed tests count towards both.This pull request removes 2920 skipped tests and adds 2920 skipped tests. Note that renamed tests count towards both. |
|
|
This is addressed in release v5.0.3. |



This PR addresses SonarCloud issues by refactoring code to eliminate static analysis warnings. The changes focus on improving code quality without altering functionality.
Key Changes:
GetCustomAttribute<T>()with more efficientIsDefined()calls