Skip to content

Comments

refactor: fix sonar issues#296

Merged
vbreuss merged 2 commits intomainfrom
topic/fix-sonar-issues-3
Dec 11, 2025
Merged

refactor: fix sonar issues#296
vbreuss merged 2 commits intomainfrom
topic/fix-sonar-issues-3

Conversation

@vbreuss
Copy link
Contributor

@vbreuss vbreuss commented Dec 11, 2025

This PR addresses SonarQube/SonarCloud code quality issues by suppressing S3218 warnings (inner class members shadowing outer class members) across multiple files in the It class implementation. The changes involve adding pragma directives to disable and restore the S3218 warning, and includes a minor refactoring of the ParameterEqualsMatch class to use primary constructor syntax.

Key changes:

  • Added S3218 pragma warning suppressions to all partial class files in the It class family
  • Added ReSharper comment to suppress localization warning for an error message

@vbreuss vbreuss self-assigned this Dec 11, 2025
Copilot AI review requested due to automatic review settings December 11, 2025 19:20
Copy link

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 PR addresses SonarQube/SonarCloud code quality issues by suppressing S3218 warnings (inner class members shadowing outer class members) across multiple files in the It class implementation. The changes involve adding pragma directives to disable and restore the S3218 warning, and includes a minor refactoring of the ParameterEqualsMatch class to use primary constructor syntax.

Key changes:

  • Added S3218 pragma warning suppressions to all partial class files in the It class family
  • Refactored ParameterEqualsMatch<T> to use C# 12 primary constructor syntax
  • Added ReSharper comment to suppress localization warning for an error message

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Source/Mockolate/It.cs Added S3218 warning suppression pragmas
Source/Mockolate/It.Matches.cs Added S3218 warning suppression pragmas
Source/Mockolate/It.IsTrue.cs Added S3218 warning suppression pragmas
Source/Mockolate/It.IsSpan.cs Added S3218 warning suppression pragmas
Source/Mockolate/It.IsRef.cs Added S3218 warning suppression pragmas
Source/Mockolate/It.IsReadOnlySpan.cs Added S3218 warning suppression pragmas
Source/Mockolate/It.IsOut.cs Added S3218 warning suppression pragmas
Source/Mockolate/It.IsNull.cs Added S3218 warning suppression pragmas
Source/Mockolate/It.IsInRange.cs Added S3218 warning suppression pragmas and ReSharper comment
Source/Mockolate/It.IsFalse.cs Added S3218 warning suppression pragmas
Source/Mockolate/It.IsAny.cs Added S3218 warning suppression pragmas
Source/Mockolate/It.Is.cs Added S3218 warning suppression pragmas and refactored ParameterEqualsMatch<T> to primary constructor

@vbreuss vbreuss enabled auto-merge (squash) December 11, 2025 19:25
@github-actions
Copy link

github-actions bot commented Dec 11, 2025

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
AMD EPYC 7763 2.77GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.101
[Host] : .NET 10.0.1 (10.0.1, 10.0.125.57005), X64 RyuJIT x86-64-v3

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

Method Mean Error StdDev Gen0 Gen1 Allocated
Simple_Mockolate 1.419 μs 0.0170 μs 0.0159 μs 0.2232 - 3.66 KB
Simple_Moq 178.085 μs 1.0348 μs 0.8641 μs 0.4883 - 14.55 KB
Simple_NSubstitute 5.599 μs 0.0262 μs 0.0232 μs 0.5569 0.0076 9.14 KB
Simple_FakeItEasy 6.211 μs 0.0216 μs 0.0202 μs 0.4959 - 8.11 KB

@sonarqubecloud
Copy link

@github-actions
Copy link

Test Results

    14 files  ±0      14 suites  ±0   4m 2s ⏱️ -21s
 1 534 tests ±0   1 533 ✅ ±0  1 💤 ±0  0 ❌ ±0 
10 227 runs  ±0  10 226 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit a4134e7. ± Comparison against base commit 436f685.

@vbreuss vbreuss merged commit a45333a into main Dec 11, 2025
12 checks passed
@vbreuss vbreuss deleted the topic/fix-sonar-issues-3 branch December 11, 2025 19:29
@github-actions
Copy link

This is addressed in release v0.44.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state: released The issue is released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant