Fix S2699 FP: Support Moq #7961
Labels
Area: C#
C# rules related issues.
Area: VB.NET
VB.NET rules related issues.
Sprint: Hardening
Fix FPs/FNs/improvements
Type: False Positive
Rule IS triggered when it shouldn't be.
Milestone
S2699
Description
The following rule supports several frameworks but Moq is not among them:
https://rules.sonarsource.com/csharp/RSPEC-2699/
As you can see in the examples, it allows to verify for example that a method or event call is made:
https://github.com/moq/moq
But not being an
Assert
throws this rule as a false positive and forces to do ugly things likeAssert.True(true)
.Repro steps
Create a minimal example of Moq by taking it from the Readme.md file in repository and see how it throws the false positive of the mentioned rule.
The text was updated successfully, but these errors were encountered: