Skip to content

Commit

Permalink
S6934: Add FP repro for #8985 (#8987)
Browse files Browse the repository at this point in the history
  • Loading branch information
mary-georgiou-sonarsource authored Mar 27, 2024
1 parent 7823e0d commit 1fb5367
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,13 @@ public class ControllerOverridesActionWithRoute : BaseControllerWithActionWithRo
// Route: ControllerOverridesActionWithRoute/Index/1
public override string Index(int id) => "Hi!"; // Compliant
}

// Repro: https://github.com/SonarSource/sonar-dotnet/issues/8985
public sealed class ExtendedRouteAttribute() : RouteAttribute("[controller]/[action]");

[ExtendedRoute]
public class SomeController : ControllerBase // Noncompliant, FP the route attribute template is set in the base class of ExtendedRouteAttribute
{
[HttpGet("foo")]
public string Foo() => "Hi"; // Secondary
}

0 comments on commit 1fb5367

Please sign in to comment.