Skip to content

Commit b0ff166

Browse files
author
Robert Holt
committed
Address @bergmeister's feedback
1 parent b6d0d9f commit b0ff166

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

PSCompatibilityAnalyzer/Microsoft.PowerShell.CrossCompatibility/Query/Modules/ModuleData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ private IReadOnlyDictionary<string, IReadOnlyList<CommandData>> CreateAliasTable
8181
return null;
8282
}
8383

84-
var aliasTable = new Dictionary<string, IReadOnlyList<CommandData>>();
84+
var aliasTable = new Dictionary<string, IReadOnlyList<CommandData>>(StringComparer.OrdinalIgnoreCase);
8585
foreach (KeyValuePair<string, string> alias in aliases)
8686
{
8787
if (_parent.Aliases.TryGetValue(alias.Key, out IReadOnlyList<CommandData> aliasedCommands))

PSCompatibilityAnalyzer/Microsoft.PowerShell.CrossCompatibility/Query/RuntimeData.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public RuntimeData(Data.RuntimeData runtimeData)
3737
_modules = new Lazy<IReadOnlyDictionary<string, IReadOnlyDictionary<Version, ModuleData>>>(() => CreateModuleTable(runtimeData.Modules));
3838
_nonAliasCommands = new Lazy<IReadOnlyDictionary<string, IReadOnlyList<CommandData>>>(() => CreateNonAliasCommandLookupTable(Modules));
3939
_aliases = new Lazy<IReadOnlyDictionary<string, IReadOnlyList<CommandData>>>(() => CreateAliasLookupTable(runtimeData.Modules, NonAliasCommands));
40-
_commands = new Lazy<IReadOnlyDictionary<string, IReadOnlyList<CommandData>>>(() => new DualLookupTable<string, IReadOnlyList<CommandData>>(Aliases, NonAliasCommands));
40+
_commands = new Lazy<IReadOnlyDictionary<string, IReadOnlyList<CommandData>>>(() => new DualLookupTable<string, IReadOnlyList<CommandData>>(NonAliasCommands, Aliases));
4141
_nativeCommands = new Lazy<NativeCommandLookupTable>(() => NativeCommandLookupTable.Create(runtimeData.NativeCommands));
4242
}
4343

@@ -129,7 +129,7 @@ private static IReadOnlyDictionary<string, IReadOnlyList<CommandData>> CreateAli
129129
IReadOnlyDictionary<string, JsonDictionary<Version, Data.Modules.ModuleData>> modules,
130130
IReadOnlyDictionary<string, IReadOnlyList<CommandData>> commands)
131131
{
132-
var aliasTable = new Dictionary<string, IReadOnlyList<CommandData>>();
132+
var aliasTable = new Dictionary<string, IReadOnlyList<CommandData>>(StringComparer.OrdinalIgnoreCase);
133133
foreach (KeyValuePair<string, JsonDictionary<Version, Data.Modules.ModuleData>> module in modules)
134134
{
135135
foreach (KeyValuePair<Version, Data.Modules.ModuleData> moduleVersion in module.Value)

0 commit comments

Comments
 (0)