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

PascalCase

1 Answer 104 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.
Jan
Top achievements
Rank 1
Jan asked on 11 Aug 2012, 10:46 PM
JustCode complains about a property named

public static readonly DependencyProperty InputsGroup3x3Property

I don't remember whether the standard setting was PascalCase or something else.
It raises a warning indicating that it wants to change the name to 

InputsGroup3X3Property

i.e., it wants to capitalize the 'x' in '3x3'.

It's obviously not a big deal, but I am guessing that it is a reasonably common pattern for people to have the string 3x3 or some such occur in some place or another to indicate '3 by 3'. I find it much more readable with the lower case x and can't really say that I see that the lower case x violates the Pascal casing. Maybe you should change your RegEx to allow lower or upper case after a number in a PascalCase string?

Cheers,
Jan

1 Answer, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 14 Aug 2012, 07:53 AM
Hi,

Thank you for your feedback. Our naming rules assume by design that after a digit starts another word, which in PascalCase should start with an upper letter. And since "x" marks the start of a new word a warning is shown that the rule is violated.
At the moment we do not intend to change this behavior, but we will definitely discuss it and see whether we will come up with a reasonable solution.
You could ignore this warning by pressing alt + enter on the identifier and selecting "Ignore this error/warning".
If you have any more questions or remarks, please do not hesitate to contact us again!

Greetings,
Ivan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Code Analysis
Asked by
Jan
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Share this question
or