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

S1144: Add FP/FN Repro for #8532 #8534

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
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
Expand Up @@ -350,3 +350,11 @@ [Private2] internal void AnInternalMethod() { }
[Private3] protected void AProtectedMethod() { }
[Private4] private void APrivateMethodCalledByAPublicMethod() { }
}

// https://github.com/SonarSource/sonar-dotnet/issues/8532
[Serializable]
public class Repro_8532
{
[NonSerialized]
private string value; // FN
}
Original file line number Diff line number Diff line change
Expand Up @@ -334,3 +334,11 @@ [Private2] internal void AnInternalMethod() { }
[Private3] protected void AProtectedMethod() { }
[Private4] private void APrivateMethodCalledByAPublicMethod() { }
}

// https://github.com/SonarSource/sonar-dotnet/issues/8532
[Serializable]
public class Repro_8532
{
[NonSerialized]
private string value; // FN
}
Original file line number Diff line number Diff line change
Expand Up @@ -434,3 +434,13 @@ private class Private2Attribute : Attribute { } // Noncompliant: FP: attribute u
private class Private3Attribute : Attribute { } // Noncompliant: FP: attribute used on a protected method
private class Private4Attribute : Attribute { } // Noncompliant: FP: attribute used on a private method used by a public method
}

// https://github.com/SonarSource/sonar-dotnet/issues/8532
[Serializable]
public class Repro_8532
{
private string type; // Noncompliant FP
private string key { get; set; } // Noncompliant FP
[NonSerialized]
private string value; // FN
}
Loading