Skip to content
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

S3963: Add FP repro for #6343 #6357

Merged
merged 2 commits into from
Nov 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Reflection;
using System.IO;
using System.Reflection;
using System.Resources;
using System.Globalization;

Expand Down Expand Up @@ -160,4 +161,16 @@ static ReproSwitchMulti() // Compliant, because there are multiple variable a
}
}
}

public static class TestUtil
{
// https://github.com/SonarSource/sonar-dotnet/issues/6343
static TestUtil() // Noncompliant - FP, there are no static fields
{
if (!Directory.Exists(""))
{
Directory.CreateDirectory("");
}
}
}
}