Skip to content

Commit a9c6f61

Browse files
mariam-abdullagithub-actions
authored andcommitted
Sort options alphabetically by name
1 parent 15c4791 commit a9c6f61

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)