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
S6934 raises an issue when the Route attribute isn't added to an abstract Controller class (but it's added to one or more of its action methods). This shouldn't happen, as the action method will always be accessed through a non-abstract derived rather than the abstract base class, so the Route attribute only needs to be applied there.
Repro steps
publicabstractclassBaseController:Controller// Noncompliant - FP: shouldn't raise on abstract classes{[HttpGet][Route("list")]publicIActionResultList()// Secondary{// ... load and return itemsreturnView();}}[Route("/api/user")]publicsealedclassUserController:BaseController{// other controller code}
Expected behavior
The rule should not raise an issue on the abstract class.
Actual behavior
The rule raises an issue on the abstract Controller class.
Related information
C#/VB.NET Plugins version: 9.24
Visual Studio version: Visual Studio 2022 (17.9.6)
Operating System: Windows 10
The text was updated successfully, but these errors were encountered:
Description
S6934 raises an issue when the
Route
attribute isn't added to an abstractController
class (but it's added to one or more of its action methods). This shouldn't happen, as the action method will always be accessed through a non-abstract derived rather than the abstract base class, so theRoute
attribute only needs to be applied there.Repro steps
Expected behavior
The rule should not raise an issue on the abstract class.
Actual behavior
The rule raises an issue on the abstract
Controller
class.Related information
The text was updated successfully, but these errors were encountered: