Skip to content

Commit 3adb0b3

Browse files
committed
1 parent f1b8798 commit 3adb0b3

15 files changed

Lines changed: 110 additions & 110 deletions

File tree

.globalconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,7 @@ dotnet_diagnostic.SA0002.severity = none
10171017
dotnet_diagnostic.SA1000.severity = warning
10181018

10191019
# SA1001: Commas should be spaced correctly
1020-
dotnet_diagnostic.SA1001.severity = none
1020+
dotnet_diagnostic.SA1001.severity = warning
10211021

10221022
# SA1002: Semicolons should be spaced correctly
10231023
dotnet_diagnostic.SA1002.severity = warning

src/Microsoft.PowerShell.CoreCLR.Eventing/DotNetCode/Eventing/UnsafeNativeMethods.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -404,15 +404,15 @@ internal enum EvtChannelReferenceFlags
404404

405405
internal enum EvtEventMetadataPropertyId
406406
{
407-
EventMetadataEventID, // EvtVarTypeUInt32
408-
EventMetadataEventVersion, // EvtVarTypeUInt32
409-
EventMetadataEventChannel, // EvtVarTypeUInt32
410-
EventMetadataEventLevel, // EvtVarTypeUInt32
411-
EventMetadataEventOpcode, // EvtVarTypeUInt32
412-
EventMetadataEventTask, // EvtVarTypeUInt32
413-
EventMetadataEventKeyword, // EvtVarTypeUInt64
414-
EventMetadataEventMessageID,// EvtVarTypeUInt32
415-
EventMetadataEventTemplate // EvtVarTypeString
407+
EventMetadataEventID, // EvtVarTypeUInt32
408+
EventMetadataEventVersion, // EvtVarTypeUInt32
409+
EventMetadataEventChannel, // EvtVarTypeUInt32
410+
EventMetadataEventLevel, // EvtVarTypeUInt32
411+
EventMetadataEventOpcode, // EvtVarTypeUInt32
412+
EventMetadataEventTask, // EvtVarTypeUInt32
413+
EventMetadataEventKeyword, // EvtVarTypeUInt64
414+
EventMetadataEventMessageID, // EvtVarTypeUInt32
415+
EventMetadataEventTemplate // EvtVarTypeString
416416
// EvtEventMetadataPropertyIdEND
417417
}
418418

@@ -824,7 +824,7 @@ int flags
824824
[SecurityCritical]
825825
internal static extern EventLogHandle EvtCreateRenderContext(
826826
Int32 valuePathsCount,
827-
[MarshalAs(UnmanagedType.LPArray,ArraySubType = UnmanagedType.LPWStr)]
827+
[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr)]
828828
string[] valuePaths,
829829
[MarshalAs(UnmanagedType.I4)] EvtRenderContextFlags flags
830830
);

src/System.Management.Automation/DscSupport/CimDSCParser.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2715,16 +2715,16 @@ private static bool ImportKeywordsFromScriptFile(string fileName, PSModuleInfo m
27152715
private static readonly Dictionary<Type, string> s_mapPrimitiveDotNetTypeToMof = new()
27162716
{
27172717
{ typeof(sbyte), "sint8" },
2718-
{ typeof(byte) , "uint8"},
2719-
{ typeof(short) , "sint16"},
2720-
{ typeof(ushort) , "uint16"},
2721-
{ typeof(int) , "sint32"},
2722-
{ typeof(uint) , "uint32"},
2723-
{ typeof(long) , "sint64"},
2718+
{ typeof(byte), "uint8"},
2719+
{ typeof(short), "sint16"},
2720+
{ typeof(ushort), "uint16"},
2721+
{ typeof(int), "sint32"},
2722+
{ typeof(uint), "uint32"},
2723+
{ typeof(long), "sint64"},
27242724
{ typeof(ulong), "uint64" },
2725-
{ typeof(float) , "real32"},
2726-
{ typeof(double) , "real64"},
2727-
{ typeof(bool) , "boolean"},
2725+
{ typeof(float), "real32"},
2726+
{ typeof(double), "real64"},
2727+
{ typeof(bool), "boolean"},
27282728
{ typeof(string), "string" },
27292729
{ typeof(DateTime), "datetime" },
27302730
{ typeof(PSCredential), "string" },

src/System.Management.Automation/FormatAndOutput/DefaultFormatters/HelpV3_format_ps1xml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ internal static IEnumerable<ExtendedTypeDefinition> GetFormatData()
175175
.EndControl();
176176

177177
var sharedControls = new CustomControl[] {
178-
null,//MamlParameterValueGroupControl,
178+
null, //MamlParameterValueGroupControl,
179179
MamlParameterControl,
180180
MamlTypeControl,
181181
MamlParameterValueControl,

src/System.Management.Automation/engine/InitialSessionState.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4628,7 +4628,7 @@ internal static SessionStateAliasEntry[] BuiltInAliases
46284628
new SessionStateAliasEntry("gm", "Get-Member", string.Empty, ReadOnly),
46294629
new SessionStateAliasEntry("gmo", "Get-Module", string.Empty, ReadOnly),
46304630
new SessionStateAliasEntry("gp", "Get-ItemProperty", string.Empty, ReadOnly),
4631-
new SessionStateAliasEntry("gpv", "Get-ItemPropertyValue", string.Empty,ReadOnly),
4631+
new SessionStateAliasEntry("gpv", "Get-ItemPropertyValue", string.Empty, ReadOnly),
46324632
new SessionStateAliasEntry("gps", "Get-Process", string.Empty, ReadOnly),
46334633
new SessionStateAliasEntry("group", "Group-Object", string.Empty, ReadOnly),
46344634
new SessionStateAliasEntry("gu", "Get-Unique", string.Empty, ReadOnly),
@@ -4787,7 +4787,7 @@ internal static SessionStateAliasEntry[] BuiltInAliases
47874787
SessionStateFunctionEntry.GetDelayParsedFunctionEntry("cd\\", "Set-Location \\", isProductCode: true, languageMode: systemLanguageMode),
47884788
// Win8: 320909. Retaining the original definition to ensure backward compatability.
47894789
SessionStateFunctionEntry.GetDelayParsedFunctionEntry("Pause",
4790-
string.Concat("$null = Read-Host '", CodeGeneration.EscapeSingleQuotedStringContent(RunspaceInit.PauseDefinitionString),"'"), isProductCode: true, languageMode: systemLanguageMode),
4790+
string.Concat("$null = Read-Host '", CodeGeneration.EscapeSingleQuotedStringContent(RunspaceInit.PauseDefinitionString), "'"), isProductCode: true, languageMode: systemLanguageMode),
47914791
SessionStateFunctionEntry.GetDelayParsedFunctionEntry("help", GetHelpPagingFunctionText(), isProductCode: true, languageMode: systemLanguageMode),
47924792
SessionStateFunctionEntry.GetDelayParsedFunctionEntry("prompt", DefaultPromptFunctionText, isProductCode: true, languageMode: systemLanguageMode),
47934793

src/System.Management.Automation/engine/parser/tokenizer.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -629,18 +629,18 @@ private static readonly Dictionary<string, TokenKind> s_operatorTable
629629
};
630630

631631
private static readonly TokenKind[] s_keywordTokenKind = new TokenKind[] {
632-
/*1*/ TokenKind.ElseIf, TokenKind.If, TokenKind.Else, TokenKind.Switch, /*1*/
633-
/*2*/ TokenKind.Foreach, TokenKind.From, TokenKind.In, TokenKind.For, /*2*/
634-
/*3*/ TokenKind.While, TokenKind.Until, TokenKind.Do, TokenKind.Try, /*3*/
635-
/*4*/ TokenKind.Catch, TokenKind.Finally, TokenKind.Trap, TokenKind.Data, /*4*/
636-
/*5*/ TokenKind.Return, TokenKind.Continue, TokenKind.Break, TokenKind.Exit, /*5*/
637-
/*6*/ TokenKind.Throw, TokenKind.Begin, TokenKind.Process, TokenKind.End, /*6*/
638-
/*7*/ TokenKind.Dynamicparam, TokenKind.Function, TokenKind.Filter, TokenKind.Param, /*7*/
639-
/*8*/ TokenKind.Class, TokenKind.Define, TokenKind.Var, TokenKind.Using, /*8*/
640-
/*9*/ TokenKind.Workflow, TokenKind.Parallel, TokenKind.Sequence, TokenKind.InlineScript, /*9*/
641-
/*A*/ TokenKind.Configuration, TokenKind.Public, TokenKind.Private, TokenKind.Static, /*A*/
642-
/*B*/ TokenKind.Interface, TokenKind.Enum, TokenKind.Namespace,TokenKind.Module, /*B*/
643-
/*C*/ TokenKind.Type, TokenKind.Assembly, TokenKind.Command, TokenKind.Hidden, /*C*/
632+
/*1*/ TokenKind.ElseIf, TokenKind.If, TokenKind.Else, TokenKind.Switch, /*1*/
633+
/*2*/ TokenKind.Foreach, TokenKind.From, TokenKind.In, TokenKind.For, /*2*/
634+
/*3*/ TokenKind.While, TokenKind.Until, TokenKind.Do, TokenKind.Try, /*3*/
635+
/*4*/ TokenKind.Catch, TokenKind.Finally, TokenKind.Trap, TokenKind.Data, /*4*/
636+
/*5*/ TokenKind.Return, TokenKind.Continue, TokenKind.Break, TokenKind.Exit, /*5*/
637+
/*6*/ TokenKind.Throw, TokenKind.Begin, TokenKind.Process, TokenKind.End, /*6*/
638+
/*7*/ TokenKind.Dynamicparam, TokenKind.Function, TokenKind.Filter, TokenKind.Param, /*7*/
639+
/*8*/ TokenKind.Class, TokenKind.Define, TokenKind.Var, TokenKind.Using, /*8*/
640+
/*9*/ TokenKind.Workflow, TokenKind.Parallel, TokenKind.Sequence, TokenKind.InlineScript, /*9*/
641+
/*A*/ TokenKind.Configuration, TokenKind.Public, TokenKind.Private, TokenKind.Static, /*A*/
642+
/*B*/ TokenKind.Interface, TokenKind.Enum, TokenKind.Namespace, TokenKind.Module, /*B*/
643+
/*C*/ TokenKind.Type, TokenKind.Assembly, TokenKind.Command, TokenKind.Hidden, /*C*/
644644
/*D*/ TokenKind.Base, TokenKind.Default, /*D*/
645645
};
646646

src/System.Management.Automation/engine/remoting/common/RemoteSessionNamedPipe.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ internal static string CreateProcessPipeName(
110110
// There is a limit of 104 characters in total including the temp path to the named pipe file
111111
// on non-Windows systems, so we'll convert the starttime to hex and just take the first 8 characters.
112112
#if UNIX
113-
.Append(proc.StartTime.ToFileTime().ToString("X8").Substring(1,8))
113+
.Append(proc.StartTime.ToFileTime().ToString("X8").Substring(1, 8))
114114
#else
115115
.Append(proc.StartTime.ToFileTime().ToString(CultureInfo.InvariantCulture))
116116
#endif

src/System.Management.Automation/engine/remoting/fanin/InitialSessionStateProvider.cs

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -949,41 +949,41 @@ internal static class ConfigFileConstants
949949
internal static readonly string VisibleExternalCommands = "VisibleExternalCommands";
950950

951951
internal static readonly ConfigTypeEntry[] ConfigFileKeys = new ConfigTypeEntry[] {
952-
new ConfigTypeEntry(AliasDefinitions, new ConfigTypeEntry.TypeValidationCallback(AliasDefinitionsTypeValidationCallback)),
953-
new ConfigTypeEntry(AssembliesToLoad, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
954-
new ConfigTypeEntry(Author, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)),
955-
new ConfigTypeEntry(CompanyName, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)),
956-
new ConfigTypeEntry(Copyright, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)),
957-
new ConfigTypeEntry(Description, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)),
958-
new ConfigTypeEntry(EnforceInputParameterValidation,new ConfigTypeEntry.TypeValidationCallback(BooleanTypeValidationCallback)),
959-
new ConfigTypeEntry(EnvironmentVariables, new ConfigTypeEntry.TypeValidationCallback(HashtableTypeValidationCallback)),
960-
new ConfigTypeEntry(ExecutionPolicy, new ConfigTypeEntry.TypeValidationCallback(ExecutionPolicyValidationCallback)),
961-
new ConfigTypeEntry(FormatsToProcess, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
962-
new ConfigTypeEntry(FunctionDefinitions, new ConfigTypeEntry.TypeValidationCallback(FunctionDefinitionsTypeValidationCallback)),
963-
new ConfigTypeEntry(GMSAAccount, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)),
964-
new ConfigTypeEntry(Guid, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)),
965-
new ConfigTypeEntry(LanguageMode, new ConfigTypeEntry.TypeValidationCallback(LanguageModeValidationCallback)),
966-
new ConfigTypeEntry(ModulesToImport, new ConfigTypeEntry.TypeValidationCallback(StringOrHashtableArrayTypeValidationCallback)),
967-
new ConfigTypeEntry(MountUserDrive, new ConfigTypeEntry.TypeValidationCallback(BooleanTypeValidationCallback)),
968-
new ConfigTypeEntry(PowerShellVersion, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)),
969-
new ConfigTypeEntry(RequiredGroups, new ConfigTypeEntry.TypeValidationCallback(HashtableTypeValidationCallback)),
970-
new ConfigTypeEntry(RoleCapabilities, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
971-
new ConfigTypeEntry(RoleCapabilityFiles, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
972-
new ConfigTypeEntry(RoleDefinitions, new ConfigTypeEntry.TypeValidationCallback(HashtableTypeValidationCallback)),
973-
new ConfigTypeEntry(RunAsVirtualAccount, new ConfigTypeEntry.TypeValidationCallback(BooleanTypeValidationCallback)),
974-
new ConfigTypeEntry(RunAsVirtualAccountGroups, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
975-
new ConfigTypeEntry(SchemaVersion, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)),
976-
new ConfigTypeEntry(ScriptsToProcess, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
977-
new ConfigTypeEntry(SessionType, new ConfigTypeEntry.TypeValidationCallback(ISSValidationCallback)),
978-
new ConfigTypeEntry(TranscriptDirectory, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)),
979-
new ConfigTypeEntry(TypesToProcess, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
980-
new ConfigTypeEntry(UserDriveMaxSize, new ConfigTypeEntry.TypeValidationCallback(IntegerTypeValidationCallback)),
981-
new ConfigTypeEntry(VariableDefinitions, new ConfigTypeEntry.TypeValidationCallback(VariableDefinitionsTypeValidationCallback)),
982-
new ConfigTypeEntry(VisibleAliases, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
983-
new ConfigTypeEntry(VisibleCmdlets, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
984-
new ConfigTypeEntry(VisibleFunctions, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
985-
new ConfigTypeEntry(VisibleProviders, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
986-
new ConfigTypeEntry(VisibleExternalCommands, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
952+
new ConfigTypeEntry(AliasDefinitions, new ConfigTypeEntry.TypeValidationCallback(AliasDefinitionsTypeValidationCallback)),
953+
new ConfigTypeEntry(AssembliesToLoad, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
954+
new ConfigTypeEntry(Author, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)),
955+
new ConfigTypeEntry(CompanyName, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)),
956+
new ConfigTypeEntry(Copyright, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)),
957+
new ConfigTypeEntry(Description, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)),
958+
new ConfigTypeEntry(EnforceInputParameterValidation, new ConfigTypeEntry.TypeValidationCallback(BooleanTypeValidationCallback)),
959+
new ConfigTypeEntry(EnvironmentVariables, new ConfigTypeEntry.TypeValidationCallback(HashtableTypeValidationCallback)),
960+
new ConfigTypeEntry(ExecutionPolicy, new ConfigTypeEntry.TypeValidationCallback(ExecutionPolicyValidationCallback)),
961+
new ConfigTypeEntry(FormatsToProcess, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
962+
new ConfigTypeEntry(FunctionDefinitions, new ConfigTypeEntry.TypeValidationCallback(FunctionDefinitionsTypeValidationCallback)),
963+
new ConfigTypeEntry(GMSAAccount, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)),
964+
new ConfigTypeEntry(Guid, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)),
965+
new ConfigTypeEntry(LanguageMode, new ConfigTypeEntry.TypeValidationCallback(LanguageModeValidationCallback)),
966+
new ConfigTypeEntry(ModulesToImport, new ConfigTypeEntry.TypeValidationCallback(StringOrHashtableArrayTypeValidationCallback)),
967+
new ConfigTypeEntry(MountUserDrive, new ConfigTypeEntry.TypeValidationCallback(BooleanTypeValidationCallback)),
968+
new ConfigTypeEntry(PowerShellVersion, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)),
969+
new ConfigTypeEntry(RequiredGroups, new ConfigTypeEntry.TypeValidationCallback(HashtableTypeValidationCallback)),
970+
new ConfigTypeEntry(RoleCapabilities, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
971+
new ConfigTypeEntry(RoleCapabilityFiles, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
972+
new ConfigTypeEntry(RoleDefinitions, new ConfigTypeEntry.TypeValidationCallback(HashtableTypeValidationCallback)),
973+
new ConfigTypeEntry(RunAsVirtualAccount, new ConfigTypeEntry.TypeValidationCallback(BooleanTypeValidationCallback)),
974+
new ConfigTypeEntry(RunAsVirtualAccountGroups, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
975+
new ConfigTypeEntry(SchemaVersion, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)),
976+
new ConfigTypeEntry(ScriptsToProcess, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
977+
new ConfigTypeEntry(SessionType, new ConfigTypeEntry.TypeValidationCallback(ISSValidationCallback)),
978+
new ConfigTypeEntry(TranscriptDirectory, new ConfigTypeEntry.TypeValidationCallback(StringTypeValidationCallback)),
979+
new ConfigTypeEntry(TypesToProcess, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
980+
new ConfigTypeEntry(UserDriveMaxSize, new ConfigTypeEntry.TypeValidationCallback(IntegerTypeValidationCallback)),
981+
new ConfigTypeEntry(VariableDefinitions, new ConfigTypeEntry.TypeValidationCallback(VariableDefinitionsTypeValidationCallback)),
982+
new ConfigTypeEntry(VisibleAliases, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
983+
new ConfigTypeEntry(VisibleCmdlets, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
984+
new ConfigTypeEntry(VisibleFunctions, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
985+
new ConfigTypeEntry(VisibleProviders, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
986+
new ConfigTypeEntry(VisibleExternalCommands, new ConfigTypeEntry.TypeValidationCallback(StringArrayTypeValidationCallback)),
987987
};
988988

989989
/// <summary>

0 commit comments

Comments
 (0)