stylecop sa1116 fix

2 posts, 1 answers
  1. lnu
    lnu avatar
    19 posts
    Member since:
    Aug 2012

    Posted 11 Jan 2012 Link to this post

    Hello,

    Is it possible to fix this code, as explained in stylecop rule 1116:

    Bad Code:
    this.Property(x => x.IsDeleted,
                   map =>
                   {
                       map.Column("IsDeleted");
                       map.Index("i_index_deleted");
                       map.Index("i_index_description");
                       map.Index("i_index_index_type");
                   });

    Should be:
    this.Property(
                   x => x.IsDeleted,
                   map =>
                   {
                       map.Column("IsDeleted");
                       map.Index("i_index_deleted");
                       map.Index("i_index_description");
                       map.Index("i_index_index_type");
                   });

    Thank you

    Laurent
  2. Answer
    Borislav
    Admin
    Borislav avatar
    35 posts

    Posted 13 Jan 2012 Link to this post

    Hi Laurent,

    JustCode have a set of settings, which allows you to customize the formatter. They can be found in menu JustCode / Options / Code Style / C#. In Wrapping page there are sections for method declaration parameters or method invocation arguments. Each section consists of two combo-boxes and one check box. The first check-box named 'Wrap' is used to specify when the parameters/arguments should be placed on a new line. The second on named 'Indent' is used to specify how to indent the parameters/arguments which were put on a new lines. If the check-box 'First included' is checked - the first parameter/argument will be put on a new line.

    You can experiment with those setting and setup JustCode to format your code as you want.

    Also have started writing a series of blog-post about the JustCode formatter. Please stay tuned for our future releases and check our blog for a new posts.

    Kind regards,
    Borislav
    the Telerik team

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

  3. DevCraft banner
Back to Top