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

.NET 8 and C# 12: add repros and UTs for rules starting with R in SonarWay #8093

Merged
merged 16 commits into from
Oct 2, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Code review 2
  • Loading branch information
antonioaversa committed Sep 28, 2023
commit 2735ee837ae82f993d87483b6bca42308a4cb9b1
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,20 @@ public void AMethod2(params IntMatrix a) { } // Compliant
}
}

// https://github.com/SonarSource/sonar-dotnet/issues/8100
namespace Repro_8100
{
public class InlineArrays
{
public void AMethod1(Buffer[] a) { } // FN, Buffer[] is 2-dimensional
public void AMethod1(Buffer[,] a) { } // Noncompliant, Buffer[,] is 3-dimensional
public void AMethod2(params Buffer[] a) { } // Compliant, params of Buffer
public void AMethod3(params Buffer[][] a) { } // FN, params of Buffer[]
}

[System.Runtime.CompilerServices.InlineArray(10)]
public struct Buffer
{
int arrayItem;
}
}