Can code inspection catch URL.Action calls in views which don't correspond to an existing controller action?


I am working with a standard ASP.NET/MVC/C# site and we are working towards eliminating unused code, both in the views and js files, as well as in the corresponding C# code.

Does R# have a code inspection feature which can scan views and js files for Ajax calls to non-existent C# controller actions? This would complement the various code inspection features which work only within the C# code.

More specifically, many of these Ajax calls are happening via jQuery, either as a get or post, and usually the Ajax url us constructed using MVC helpers such as URL.Action but sometimes the paths are hardcoded.

Thank you.

1 comment
Official comment

Hello Cliff,

Such feature affect C# only and there is no way to get the same for JS.


Please sign in to leave a comment.