Looking for Naming Convention help

5 posts, 0 answers
  1. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 15 Jun 2012 Link to this post

    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?


  2. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 16 Jun 2012 Link to this post

    Of course, in the final paragraph of my last, I meant camelCase!
  3. DevCraft banner
  4. Zdravko
    Zdravko avatar
    657 posts

    Posted 20 Jun 2012 Link to this post

    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,
    the Telerik team

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

  5. Steven
    Steven avatar
    4 posts
    Member since:
    Jul 2013

    Posted 06 Oct 2014 Link to this post

    I too want to relax my convention for lambda expressions.  Has this story made the schedule yet?
  6. Nikolay Valchev
    Nikolay Valchev avatar
    72 posts

    Posted 09 Oct 2014 Link to this post


    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!

    Nikolay Valchev

    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.

Back to Top
DevCraft banner