Using Reordering bug ?

2 posts, 0 answers
  1. Boas
    Boas avatar
    9 posts
    Member since:
    Sep 2008

    Posted 01 May 2015 Link to this post

    When I use "cleancode" and I've the  following usings:

    using GP.CRM.Events;
    using System;
    using GP.CRM.Commands;
    using GP.Components.CQRS;
    using System.Linq;

     

    The result after reordering is

    using System;
    using System.Linq;
    using GP.CRM.Commands;
    using GP.CRM.Events;
    using GP.Components.CQRS;

     

    but I expected:

     

    using GP.Components.CQRS;
    using GP.CRM.Commands;
    using GP.CRM.Events;
    using System;
    using System.Linq;

    Also it doesn't remove unused usings (even though the option is set) 

    Is there a setting im missing ?

     

  2. Svetlozar
    Admin
    Svetlozar avatar
    271 posts

    Posted 04 May 2015 Link to this post

    Hi,

    Thank you for your feedback!

    The code cleaner respects the code style settings regarding Using Directives. You can change them from JustCode Options | Code Style | C# | Using Directives.

    We have "Put System.* namespaces on top". If that setting is on the System.* usings will be first and then the rest in alphabetical order. I believe you want that setting off - all usings sorted alphabetically.

    We also have "Using directives that should never be removed". If a using is in that list (System and System.Linq by default) it won't get removed by the cleaner. Maybe you would want to clear that list.

    Let me know if you have any questions.

    Regards,
    Svetlozar
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. DevCraft banner
Back to Top