-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
6f55663
commit 761e070
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...ests/SonarAnalyzer.Test/TestCases/AspNet/CallModelStateIsValid.AutogeneratedController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// This code was generated by a tool. | ||
// Changes to this file may cause incorrect behavior and will be lost if | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
|
||
// Repro https://github.com/SonarSource/sonar-dotnet/issues/9260 | ||
// Also related to https://github.com/SonarSource/sonar-dotnet/issues/8876 | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
public partial class AutogeneratedController : Controller | ||
{ | ||
// Repro for https://github.com/SonarSource/sonar-dotnet/issues/9261 | ||
// this will be fixed once https://github.com/SonarSource/sonar-dotnet/issues/8876 is fixed | ||
[HttpPost] | ||
public void Post(object model) { } // Noncompliant, FP we should not raise in autogenerated code. | ||
} |