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

Looking for Naming Convention help

4 Answers 44 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stuart Hemming
Top achievements
Rank 2
Stuart Hemming asked on 15 Jun 2012, 10:46 AM
We have a rule in place that requires all methof parameters to be PascalCase ...
GetContact(int ContactId) {}

But having set this up JC wants to use PascalCase names for LINQ ...
item.Checked = ContactTypesList.Any(t => t.ContactTypeId == Int32.Parse(item.Value));
Here it complains that 't' in the Any method should be 'T'.

Now, I know that this is working as designed, but is there any way I can set up a secondary rule to get it to accept pascalCase parameters for LINQ extensions?

--
Stuart

4 Answers, 1 is accepted

Sort by
0
Stuart Hemming
Top achievements
Rank 2
answered on 16 Jun 2012, 05:39 AM
Of course, in the final paragraph of my last, I meant camelCase!
0
Zdravko
Telerik team
answered on 20 Jun 2012, 10:57 AM
Hello Stuart,

 Thanks for contacting us.
We have a story in our system for further implementation of a rule for lambda parameters, but it is not pretty clear when it will be implemented.

So far I could suggest you to set a secondary rule for the method parameters. You could go to JustCode menu -> Options -> Code Style -> choose the desired language (e.g. C#) -> Naming conventions. Then locate the Method Parameters option and set the secondary rule by clicking the Add button.
But adding a secondary rule will prevent showing warnings when a method parameter is not PascalCase.
Thank you.

Please, do not hesitate to contact us if you have any questions or need of assistance.

All the best,
Zdravko
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Steven T.
Top achievements
Rank 1
answered on 06 Oct 2014, 03:03 PM
I too want to relax my convention for lambda expressions.  Has this story made the schedule yet?
0
Nikolay Valchev
Telerik team
answered on 09 Oct 2014, 08:13 AM
Hello,

We've already introduced such an option and you will be able to use it in our next release.

If you have any other questions, please do not hesitate to write us back!

Regards,
Nikolay Valchev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Stuart Hemming
Top achievements
Rank 2
Answers by
Stuart Hemming
Top achievements
Rank 2
Zdravko
Telerik team
Steven T.
Top achievements
Rank 1
Nikolay Valchev
Telerik team
Share this question
or