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

Using Reordering bug ?

1 Answer 34 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.
Boas
Top achievements
Rank 1
Boas asked on 01 May 2015, 06:30 PM

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 ?

 

1 Answer, 1 is accepted

Sort by
0
Svetlozar
Telerik team
answered on 04 May 2015, 03:07 PM
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.

 
Tags
General Discussions
Asked by
Boas
Top achievements
Rank 1
Answers by
Svetlozar
Telerik team
Share this question
or