From c724220af1937b60dc0c8f623b0a0a68f1de034e Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Thu, 1 Sep 2016 14:47:07 +0000 Subject: [PATCH] spelling: locals in src/System.Management.Automation/engine/Modules --- .../engine/Modules/AnalysisCache.cs | 8 ++--- .../engine/Modules/ModuleCmdletBase.cs | 34 +++++++++---------- .../Modules/NewModuleManifestCommand.cs | 8 ++--- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/System.Management.Automation/engine/Modules/AnalysisCache.cs b/src/System.Management.Automation/engine/Modules/AnalysisCache.cs index 70ebe628c..0b6220255 100644 --- a/src/System.Management.Automation/engine/Modules/AnalysisCache.cs +++ b/src/System.Management.Automation/engine/Modules/AnalysisCache.cs @@ -123,17 +123,17 @@ namespace System.Management.Automation var hadFunctions = AddPsd1EntryToResult(result, moduleManifestProperties["FunctionsToExport"], CommandTypes.Function, ref sawWildcard); var hadAliases = AddPsd1EntryToResult(result, moduleManifestProperties["AliasesToExport"], CommandTypes.Alias, ref sawWildcard); - var analysisSuceeded = hadCmdlets && hadFunctions && hadAliases; + var analysisSucceeded = hadCmdlets && hadFunctions && hadAliases; - if (!analysisSuceeded && !sawWildcard && (hadCmdlets || hadFunctions)) + if (!analysisSucceeded && !sawWildcard && (hadCmdlets || hadFunctions)) { // If we're missing CmdletsToExport, that might still be OK, but only if we have a script module. // Likewise, if we're missing FunctionsToExport, that might be OK, but only if we have a binary module. - analysisSuceeded = !CheckModulesTypesInManifestAgainstExportedCommands(moduleManifestProperties, hadCmdlets, hadFunctions, hadAliases); + analysisSucceeded = !CheckModulesTypesInManifestAgainstExportedCommands(moduleManifestProperties, hadCmdlets, hadFunctions, hadAliases); } - if (analysisSuceeded) + if (analysisSucceeded) { var moduleCacheEntry = new ModuleCacheEntry { diff --git a/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs b/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs index 3e7368d3e..10c1fd274 100644 --- a/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs +++ b/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs @@ -762,12 +762,12 @@ namespace Microsoft.PowerShell.Commands Version version; if (Version.TryParse(subdirName, out version)) { - var modueBaseWithoutVersion = Path.GetDirectoryName(tempModuleInfoFromVerification.ModuleBase); + var moduleBaseWithoutVersion = Path.GetDirectoryName(tempModuleInfoFromVerification.ModuleBase); modulePath = new string[] { - Path.GetDirectoryName(modueBaseWithoutVersion), - modueBaseWithoutVersion + Path.GetDirectoryName(moduleBaseWithoutVersion), + moduleBaseWithoutVersion }; } else @@ -1874,24 +1874,24 @@ namespace Microsoft.PowerShell.Commands } // Test the required processor architecture - ProcessorArchitecture requiredProcesorArchitecture; + ProcessorArchitecture requiredProcessorArchitecture; if ( !GetScalarFromData(data, moduleManifestPath, "ProcessorArchitecture", manifestProcessingFlags, - out requiredProcesorArchitecture)) + out requiredProcessorArchitecture)) { containedErrors = true; if (bailOnFirstError) return null; } - else if ((requiredProcesorArchitecture != ProcessorArchitecture.None) && - (requiredProcesorArchitecture != ProcessorArchitecture.MSIL)) + else if ((requiredProcessorArchitecture != ProcessorArchitecture.None) && + (requiredProcessorArchitecture != ProcessorArchitecture.MSIL)) { bool isRunningOnArm = false; ProcessorArchitecture currentArchitecture = PsUtils.GetProcessorArchitecture(out isRunningOnArm); // For ARM Architectures, we need to do additional string-level comparison - if ((currentArchitecture != requiredProcesorArchitecture && !isRunningOnArm) || + if ((currentArchitecture != requiredProcessorArchitecture && !isRunningOnArm) || (isRunningOnArm && - !requiredProcesorArchitecture.ToString() + !requiredProcessorArchitecture.ToString() .Equals(PsUtils.ArmArchitecture, StringComparison.OrdinalIgnoreCase))) { containedErrors = true; @@ -1901,7 +1901,7 @@ namespace Microsoft.PowerShell.Commands ? PsUtils.ArmArchitecture : currentArchitecture.ToString(); message = StringUtil.Format(Modules.InvalidProcessorArchitecture, - actualCurrentArchitecture, moduleManifestPath, requiredProcesorArchitecture); + actualCurrentArchitecture, moduleManifestPath, requiredProcessorArchitecture); InvalidOperationException ioe = new InvalidOperationException(message); ErrorRecord er = new ErrorRecord(ioe, "Modules_InvalidProcessorArchitecture", ErrorCategory.ResourceUnavailable, moduleManifestPath); @@ -2527,7 +2527,7 @@ namespace Microsoft.PowerShell.Commands manifestInfo.PowerShellHostName = requestedHostName; manifestInfo.PowerShellHostVersion = requestedHostVersion; manifestInfo.PowerShellVersion = powerShellVersion; - manifestInfo.ProcessorArchitecture = requiredProcesorArchitecture; + manifestInfo.ProcessorArchitecture = requiredProcessorArchitecture; manifestInfo.Prefix = resolvedCommandPrefix; if (assemblyList != null) { @@ -2540,8 +2540,8 @@ namespace Microsoft.PowerShell.Commands { foreach (var f in fileList) { - string absuluteFilePath = GetAbsolutePath(moduleBase, f); - manifestInfo.AddToFileList(absuluteFilePath); + string absoluteFilePath = GetAbsolutePath(moduleBase, f); + manifestInfo.AddToFileList(absoluteFilePath); } } if (moduleList != null) @@ -2892,7 +2892,7 @@ namespace Microsoft.PowerShell.Commands null, //SessionState nestedModuleOptions, manifestProcessingFlags, - false, // addToParentModueIfFound + false, // addToParentModuleIfFound out found); } else @@ -3303,7 +3303,7 @@ namespace Microsoft.PowerShell.Commands if (newManifestInfo.ProcessorArchitecture == ProcessorArchitecture.None) { - newManifestInfo.ProcessorArchitecture = requiredProcesorArchitecture; + newManifestInfo.ProcessorArchitecture = requiredProcessorArchitecture; } if (newManifestInfo.RequiredAssemblies == null || newManifestInfo.RequiredAssemblies.LongCount() == 0) @@ -3627,7 +3627,7 @@ namespace Microsoft.PowerShell.Commands private readonly string _serviceCoreAssemblyFullName = "Microsoft.Powershell.Workflow.ServiceCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"; private readonly string _serviceCoreAssemblyShortName = "Microsoft.Powershell.Workflow.ServiceCore"; - private PSModuleInfo LoadServiceCoreModule(PSModuleInfo parentModule, string moduleBase, SessionState ss, ImportModuleOptions nestedModuleOptions, ManifestProcessingFlags manifestProcessingFlags, bool addToParentModueIfFound, out bool found) + private PSModuleInfo LoadServiceCoreModule(PSModuleInfo parentModule, string moduleBase, SessionState ss, ImportModuleOptions nestedModuleOptions, ManifestProcessingFlags manifestProcessingFlags, bool addToParentModuleIfFound, out bool found) { SessionStateInternal oldSessionState = Context.EngineSessionState; @@ -3663,7 +3663,7 @@ namespace Microsoft.PowerShell.Commands // If found, add it to the parent's list of NestedModules if (found) { - if (addToParentModueIfFound) + if (addToParentModuleIfFound) { parentModule.AddNestedModule(nestedModule); } diff --git a/src/System.Management.Automation/engine/Modules/NewModuleManifestCommand.cs b/src/System.Management.Automation/engine/Modules/NewModuleManifestCommand.cs index 986289d25..8b7b34d6a 100644 --- a/src/System.Management.Automation/engine/Modules/NewModuleManifestCommand.cs +++ b/src/System.Management.Automation/engine/Modules/NewModuleManifestCommand.cs @@ -881,9 +881,9 @@ namespace Microsoft.PowerShell.Commands _exportedCmdlets = new string[] { "*" }; } - ValidateUriParamterValue(ProjectUri, "ProjectUri"); - ValidateUriParamterValue(LicenseUri, "LicenseUri"); - ValidateUriParamterValue(IconUri, "IconUri"); + ValidateUriParameterValue(ProjectUri, "ProjectUri"); + ValidateUriParameterValue(LicenseUri, "LicenseUri"); + ValidateUriParameterValue(IconUri, "IconUri"); if (CompatiblePSEditions != null && (CompatiblePSEditions.Distinct(StringComparer.OrdinalIgnoreCase).Count() != CompatiblePSEditions.Count())) { @@ -1131,7 +1131,7 @@ namespace Microsoft.PowerShell.Commands } } - private void ValidateUriParamterValue(Uri uri, string parameterName) + private void ValidateUriParameterValue(Uri uri, string parameterName) { Dbg.Assert(!String.IsNullOrWhiteSpace(parameterName), "parameterName should not be null or whitespace");