-
Notifications
You must be signed in to change notification settings - Fork 223
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
2d909a7
commit b993838
Showing
7 changed files
with
159 additions
and
57 deletions.
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
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
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
20 changes: 20 additions & 0 deletions
20
...yzer.Test/TestCases/RouteTemplateShouldNotStartWithSlash.AspNet4x.PartialAutogenerated.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,20 @@ | ||
// <auto-generated/> | ||
using System.Web.Mvc; | ||
|
||
[Route("[controller]")] | ||
public partial class NonCompliantPartialController : Controller // This is non-compliant but primary issues are not reported on auto-generated classes | ||
{ | ||
[Route("/[action]")] // Secondary [first, second] | ||
public ActionResult Index5() => View(); | ||
|
||
[Route("/SubPath/Index6_1")] // Secondary [first, second] | ||
[Route("/[controller]/Index6_2")] // Secondary [first, second] | ||
public ActionResult Index6() => View(); | ||
} | ||
|
||
[Route("[controller]")] | ||
public partial class PartialCompliantController : Controller // This class makes its partial partial part in RouteTemplateShouldNotStartWithSlash.AspNet4x.cs compliant | ||
{ | ||
[Route("[action]")] | ||
public ActionResult Index4() => View(); | ||
} |
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
20 changes: 20 additions & 0 deletions
20
...er.Test/TestCases/RouteTemplateShouldNotStartWithSlash.AspNetCore.PartialAutogenerated.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,20 @@ | ||
// <auto-generated/> | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc.Routing; | ||
|
||
[Route("[controller]")] | ||
public partial class NoncompliantPartialAutogeneratedController : Controller // This is non-compliant but primary issues are not reported on auto-generated classes | ||
{ | ||
[HttpGet("/[action]")] // Secondary | ||
public IActionResult Index3() => View(); | ||
|
||
[HttpGet("/SubPath/Index4_1")] // Secondary | ||
public IActionResult Index4() => View(); | ||
} | ||
|
||
[Route("[controller]")] | ||
public partial class CompliantPartialAutogeneratedController : Controller // This class makes its partial partial part in RouteTemplateShouldNotStartWithSlash.AspNet4x.cs compliant | ||
{ | ||
[HttpGet("[action]")] | ||
public IActionResult Index3() => View(); | ||
} |
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