You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This rule is being triggered on a controller defined in a file named Controllers.gen.cs, that includes the auto-generated comment, in a class that is annotated with GeneratedCode attribute.
//------------------------------------------------------------------------------
// <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>
//------------------------------------------------------------------------------
[System.CodeDom.Compiler.GeneratedCode("Lithium", "8")]
public abstract partial class HomeControllerBase : AppControllerBase, IHomeController
{
/// <inheritdoc />
[Microsoft.AspNetCore.Mvc.ActionName(Common.Constants.Controllers.Home.Actions.Error)]
[Microsoft.AspNetCore.Mvc.HttpGet(Common.Constants.Controllers.Home.Routes.Error)]
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult> ErrorAsync(int statusCode, System.Threading.CancellationToken cancellationToken = default)
{
// (...)
}
}
Known workarounds
None.
Related information
SonarAnalyzer.CSharp version 9.25.0.90414
Visual Studio 17.9.6
.NET 8.0.204
Windows 10
The text was updated successfully, but these errors were encountered:
mary-georgiou-sonarsource
changed the title
S6967 rule applied to generated code
Fix S6967 FP: Issues should not be raised in autogenerated code
May 16, 2024
Description
S6967 is not respecting generated code.
Repro steps
This rule is being triggered on a controller defined in a file named
Controllers.gen.cs
, that includes the auto-generated comment, in a class that is annotated withGeneratedCode
attribute.Known workarounds
None.
Related information
The text was updated successfully, but these errors were encountered: