Fix S3963 FP: Static constructor with conditional and no static filed initialization #6343
Labels
Area: C#
C# rules related issues.
Sprint: Hardening
Fix FPs/FNs/improvements
Type: False Positive
Rule IS triggered when it shouldn't be.
Milestone
Description
I have a class with no static fields whose static constructor does some stuff, yet S3963 gets triggered.
Repro steps
https://github.com/TileDB-Inc/TileDB-CSharp/blob/b5a5966adbd551c161b1ed80fa8e07a7f7275111/tests/TileDB.CSharp.Test/TestUtil.cs#L8-L14
Expected behavior
No warnings.
Actual behavior
S3963 appears.
Known workarounds
Suppress it.
Related information
SonarAnalyzer.CSharp
version: 8.48.0.56517The text was updated successfully, but these errors were encountered: