-
-
Notifications
You must be signed in to change notification settings - Fork 139
Description
First of all, great project and big fan of automating formatting.
I noticed an inconsistency when it comes to sorting regular using System* directives vs global using System* directives:
When sorting the regular using directives the System using directives are ordered before the non-system using directives.
However when sorting global using all the directives are grouped together and sorted as one set.
Basically sorting the following:
using Library;
using System;
using AnotherLibrary;Results in
using System;
using AnotherLibrary;
using Library;Where as sorting the following:
global using Library;
global using System;
global using AnotherLibrary;Results in
global using AnotherLibrary;
global using Library;
global using System;My suggestion would be to use the same pattern with global System using directives so that they would be sorted before other non-System global using directives.
I don't mind doing the work if this sounds like a reasonable idea.
csharpier/Src/CSharpier/SyntaxPrinter/UsingDirectives.cs
Lines 217 to 223 in a877f7d
| yield return globalUsings.OrderBy(o => o.Using, Comparer).ToList(); | |
| yield return globalAliasUsings.OrderBy(o => o.Using, Comparer).ToList(); | |
| yield return systemUsings.OrderBy(o => o.Using, Comparer).ToList(); | |
| yield return aliasNameUsings.OrderBy(o => o.Using, Comparer).ToList(); | |
| yield return regularUsings.OrderBy(o => o.Using, Comparer).ToList(); | |
| yield return staticUsings.OrderBy(o => o.Using, Comparer).ToList(); | |
| yield return aliasUsings.OrderBy(o => o.Using, Comparer).ToList(); |