Skip to content

Commit

Permalink
Add ITs
Browse files Browse the repository at this point in the history
  • Loading branch information
zsolt-kolbay-sonarsource committed Apr 22, 2024
1 parent 3542373 commit 3d67e2d
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
Expand Up @@ -7,6 +7,8 @@
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.ViewFeatures" Version="2.2.0" />
</ItemGroup>

</Project>
@@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Mvc;

namespace IntentionalFindings
{
public class S6964
{
public class Model
{
public int ValueProperty { get; set; } // Noncompliant
}
}

public class ControllerClass : Controller
{
[HttpPost] public IActionResult Create(S6964.Model model) => View(model);
}
}
Expand Up @@ -65,6 +65,12 @@
"Message": "Add or update the header of this file.",
"Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/Projects/ManuallyAddedNoncompliantIssues.CS/IntentionalFindings/S6675.cs#L1",
"Location": "Line 1 Position 1-1"
},
{
"Id": "S1451",
"Message": "Add or update the header of this file.",
"Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/Projects/ManuallyAddedNoncompliantIssues.CS/IntentionalFindings/S6964.cs#L1",
"Location": "Line 1 Position 1-1"
}
]
}
@@ -0,0 +1,10 @@
{
"Issues": [
{
"Id": "S6964",
"Message": "Property used as input in a controller action should be nullable or annotated with the Required attribute to avoid under-posting.",
"Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/Projects/ManuallyAddedNoncompliantIssues.CS/IntentionalFindings/S6964.cs#L9",
"Location": "Line 9 Position 13-51"
}
]
}

0 comments on commit 3d67e2d

Please sign in to comment.