This is a migrated thread and some comments may be shown as answers.

Naming conventions on cshtml pages

1 Answer 115 Views
Code Analysis
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Steve
Top achievements
Rank 1
Steve asked on 03 Aug 2015, 03:09 PM

Using VS2015  and JustCode Version Q2 2015 SP1 (2015.2.724.2)

I get the following warnings on all views:

Severity Code Description Project File Line
Warning JustCode_CSharp_TypeFileNameMismatch Type name does not match file name. JimmyMvc C:\Temp\JimmyMvc\JimmyMvc\Features\User\Index.cshtml 1
Warning JustCode_NamingConventions Name 'ASP' does not match the naming convention. JimmyMvc C:\Temp\JimmyMvc\JimmyMvc\Features\User\Index.cshtml 1
Warning JustCode_NamingConventions Name '_Page_Features_User_Index_cshtml' does not match the naming convention. JimmyMvc C:\Temp\JimmyMvc\JimmyMvc\Features\User\Index.cshtml 1
Warning JustCode_NamingConventions Name '@__o' does not match the naming convention. JimmyMvc C:\Temp\JimmyMvc\JimmyMvc\Features\User\Index.cshtml 1
Warning JustCode_NamingConventions Name '@__RazorDesignTimeHelpers__' does not match the naming convention. JimmyMvc C:\Temp\JimmyMvc\JimmyMvc\Features\User\Index.cshtml 1
Warning JustCode_NamingConventions Name '__inheritsHelper' does not match the naming convention. JimmyMvc C:\Temp\JimmyMvc\JimmyMvc\Features\User\Index.cshtml 1

 

Is there some way to prevent these?

1 Answer, 1 is accepted

Sort by
0
Svetlozar
Telerik team
answered on 06 Aug 2015, 03:04 PM
Hi,

I am really sorry for the inconvenience!

We managed to reproduce the issue on our side. The warnings in question are Roslyn warnings for C# code, but we have missed the fact that there is hidden C# generated for cshtml files. We will fix that in the upcoming internal builds. Meanwhile you can either disable warnings for cshtml files from JustCode Options | Code Analysis | General | Exclude file filters or disable the warnings from JustCode Options | Code Analysis | Problems | C#

If you have other problems or suggestions, please don't hesitate to write back!

Regards,
Svetlozar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Code Analysis
Asked by
Steve
Top achievements
Rank 1
Answers by
Svetlozar
Telerik team
Share this question
or