Skip to content

Commit

Permalink
fix usings order
Browse files Browse the repository at this point in the history
  • Loading branch information
rkodev committed Nov 11, 2024
1 parent 3661ff2 commit 437745e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public override void WriteCodeElement(CodeFileDeclaration codeElement, LanguageW
.Where(static x => x is { IsExternal: false, Declaration.TypeDefinition: not null })
.GroupBy(static x =>
$"{x.Declaration!.TypeDefinition!.GetImmediateParentOfType<CodeNamespace>().Name}.{x.Declaration?.Name.ToLowerInvariant()}")
.Select(static x => x.OrderByDescending(static x => x.Alias, StringComparer.OrdinalIgnoreCase).First()));
.Select(static x => x.OrderByDescending(static x => x.Alias, StringComparer.OrdinalIgnoreCase).ThenBy(static x => x.Parent?.Name, StringComparer.OrdinalIgnoreCase).First()));

_codeUsingWriter.WriteCodeElement(filteredUsing, ns, writer);
}
Expand Down

0 comments on commit 437745e

Please sign in to comment.