Skip to content

Commit 8357cfe

Browse files
authored
[release/10.0.1xx] Sort options alphabetically by name (#50405)
2 parents 16c1d35 + a9c6f61 commit 8357cfe

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Cli/dotnet/Commands/Test/TestingPlatformCommand.Help.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@ private Dictionary<bool, List<CommandLineOption>> GetAllOptions()
143143
value.Add(option.Value);
144144
}
145145
}
146+
147+
// Sort options alphabetically by name
148+
foreach (var optionsList in builtInToOptions.Values)
149+
{
150+
optionsList.Sort((x, y) => string.Compare(x.Name, y.Name, StringComparison.OrdinalIgnoreCase));
151+
}
152+
146153
return builtInToOptions;
147154
}
148155

0 commit comments

Comments
 (0)