Skip to content

Commit edb2fac

Browse files
authored
Enable SA1000: Spacing around keywords (#112302)
* Enable `SA1000`: Spacing around keywords Do not enable for `src/tools/illink/` due to different code style. * fix `SA1000` * fix `SA1000` * fix `SA1000` * fix `SA1000` * fix `SA1000` * fix `SA1000` * `if(` -> `if (` * `catch(` -> `catch (` * `for(` -> `for (` * `while(` -> `while (`
1 parent 2240175 commit edb2fac

File tree

81 files changed

+147
-145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+147
-145
lines changed

eng/CodeAnalysis.src.globalconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,8 +1139,7 @@ dotnet_diagnostic.RS2008.severity = warning
11391139
dotnet_diagnostic.SA0001.severity = none
11401140

11411141
# SA1000: Spacing around keywords
1142-
# suggestion until https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3478 is resolved
1143-
dotnet_diagnostic.SA1000.severity = suggestion
1142+
dotnet_diagnostic.SA1000.severity = warning
11441143

11451144
# SA1001: Commas should not be preceded by whitespace
11461145
dotnet_diagnostic.SA1001.severity = warning

src/coreclr/System.Private.CoreLib/src/System/OleAutBinder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public override object ChangeType(object value, Type type, CultureInfo? cultureI
7070
return RetObj;
7171
}
7272
#if DISPLAY_DEBUG_INFO
73-
catch(NotSupportedException e)
73+
catch (NotSupportedException e)
7474
#else
7575
catch (NotSupportedException)
7676
#endif

src/coreclr/tools/Common/CommandLineHelpers.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static List<string> BuildPathList(IReadOnlyList<CliToken> tokens)
5656

5757
public static TargetOS GetTargetOS(string token)
5858
{
59-
if(string.IsNullOrEmpty(token))
59+
if (string.IsNullOrEmpty(token))
6060
{
6161
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
6262
return TargetOS.Windows;
@@ -87,7 +87,7 @@ public static TargetOS GetTargetOS(string token)
8787

8888
public static TargetArchitecture GetTargetArchitecture(string token)
8989
{
90-
if(string.IsNullOrEmpty(token))
90+
if (string.IsNullOrEmpty(token))
9191
{
9292
return RuntimeInformation.ProcessArchitecture switch
9393
{

src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@ IntPtr LocalObjectToHandle(object input)
270270

271271
bool isType = nativeSchema[index + 1].InstrumentationKind == PgoInstrumentationKind.HandleHistogramTypes;
272272

273-
fixed(PgoInstrumentationSchema* pSchema = &nativeSchema[index])
273+
fixed (PgoInstrumentationSchema* pSchema = &nativeSchema[index])
274274
{
275-
fixed(byte* pInstrumentationData = &instrumentationData[0])
275+
fixed (byte* pInstrumentationData = &instrumentationData[0])
276276
{
277277
// We're going to store only the most popular type/method to reduce size of the profile
278278
LikelyClassMethodRecord* likelyClassMethods = stackalloc LikelyClassMethodRecord[1];

src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -497,25 +497,25 @@ public void ExpandInstructionSetByImplication(TargetArchitecture architecture)
497497

498498
public static InstructionSet ConvertToImpliedInstructionSetForVectorInstructionSets(TargetArchitecture architecture, InstructionSet input)
499499
{
500-
switch(architecture)
500+
switch (architecture)
501501
{
502502
case TargetArchitecture.ARM64:
503-
switch(input)
503+
switch (input)
504504
{
505505
case InstructionSet.ARM64_Vector64: return InstructionSet.ARM64_AdvSimd;
506506
case InstructionSet.ARM64_Vector128: return InstructionSet.ARM64_AdvSimd;
507507
}
508508
break;
509509
case TargetArchitecture.X64:
510-
switch(input)
510+
switch (input)
511511
{
512512
case InstructionSet.X64_Vector128: return InstructionSet.X64_SSE;
513513
case InstructionSet.X64_Vector256: return InstructionSet.X64_AVX;
514514
case InstructionSet.X64_Vector512: return InstructionSet.X64_AVX512F;
515515
}
516516
break;
517517
case TargetArchitecture.X86:
518-
switch(input)
518+
switch (input)
519519
{
520520
case InstructionSet.X86_Vector128: return InstructionSet.X86_SSE;
521521
case InstructionSet.X86_Vector256: return InstructionSet.X86_AVX;
@@ -984,7 +984,7 @@ private static InstructionSetFlags ExpandInstructionSetByReverseImplicationHelpe
984984
do
985985
{
986986
oldflags = resultflags;
987-
switch(architecture)
987+
switch (architecture)
988988
{
989989

990990
case TargetArchitecture.ARM64:

src/coreclr/tools/Common/TypeSystem/Common/TypeSystemConstraintsHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ private static bool CanCastConstraint(ref ArrayBuilder<TypeDesc> instantiatedCon
162162

163163
public static bool CheckValidInstantiationArguments(this Instantiation instantiation)
164164
{
165-
foreach(var arg in instantiation)
165+
foreach (var arg in instantiation)
166166
{
167167
if (arg.IsPointer || arg.IsByRef || arg.IsGenericParameter || arg.IsVoid)
168168
return false;

src/coreclr/tools/Common/TypeSystem/Interop/InteropStateManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public TypeDesc GetInlineArrayType(InlineArrayCandidate candidate)
182182

183183
public FieldDesc GetPInvokeLazyFixupField(MethodDesc method, MethodSignature nativeSig)
184184
{
185-
return _pInvokeLazyFixupFieldHashtable.GetOrCreateValue(new (method, nativeSig));
185+
return _pInvokeLazyFixupFieldHashtable.GetOrCreateValue(new(method, nativeSig));
186186
}
187187

188188
public MethodDesc GetPInvokeCalliStub(MethodSignature signature, ModuleDesc moduleContext)

src/coreclr/tools/SuperFileCheck/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ static async Task<int> Main(string[] args)
660660
Console.Write(String.Join(' ', methodDeclInfos.Select(x => x.FullyQualifiedName)));
661661
return 0;
662662
}
663-
catch(Exception ex)
663+
catch (Exception ex)
664664
{
665665
Console.ForegroundColor = ConsoleColor.Red;
666666
Console.WriteLine(ex.Message);

src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/InterfaceDispatchMapNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ private void EmitDispatchMap(ref ObjectDataBuilder builder, NodeFactory factory)
179179
if (!declMethod.Signature.IsStatic && !needsEntriesForInstanceInterfaceMethodImpls)
180180
continue;
181181

182-
if(!interfaceType.IsTypeDefinition)
182+
if (!interfaceType.IsTypeDefinition)
183183
declMethod = factory.TypeSystemContext.GetMethodForInstantiatedType(declMethod.GetTypicalMethodDefinition(), (InstantiatedType)definitionInterfaceType);
184184

185185
var implMethod = declMethod.Signature.IsStatic ?

src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/InterfaceGenericVirtualMethodTableNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static void GetGenericVirtualMethodImplementationDependencies(ref Depende
6969

7070
if (!openImplementationType.IsInterface)
7171
{
72-
for(int index = 0; index < openImplementationType.RuntimeInterfaces.Length; index++)
72+
for (int index = 0; index < openImplementationType.RuntimeInterfaces.Length; index++)
7373
{
7474
if (openImplementationType.RuntimeInterfaces[index] == callingMethod.OwningType)
7575
{

src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/MethodAssociatedDataNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static bool MethodHasAssociatedData(IMethodNode methodNode)
5555
{
5656
// Instantiating unboxing stubs. We need to store their non-unboxing target pointer (looked up by runtime)
5757
ISpecialUnboxThunkNode unboxThunk = methodNode as ISpecialUnboxThunkNode;
58-
if(unboxThunk != null && unboxThunk.IsSpecialUnboxingThunk)
58+
if (unboxThunk != null && unboxThunk.IsSpecialUnboxingThunk)
5959
return true;
6060

6161
return false;

src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/TypeGVMEntriesNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public override IEnumerable<DependencyListEntry> GetStaticDependencies(NodeFacto
6565
{
6666
_staticDependencies = new DependencyList();
6767

68-
foreach(var entry in ScanForGenericVirtualMethodEntries())
68+
foreach (var entry in ScanForGenericVirtualMethodEntries())
6969
GenericVirtualMethodTableNode.GetGenericVirtualMethodImplementationDependencies(ref _staticDependencies, context, entry.CallingMethod, entry.ImplementationMethod);
7070

7171
foreach (var entry in ScanForInterfaceGenericVirtualMethodEntries())

src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ExportsFileWriter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void EmitExportedMethods()
4141
foreach (var method in _methods)
4242
streamWriter.WriteLine($" {method.GetUnmanagedCallersOnlyExportName()}");
4343
}
44-
else if(_context.Target.IsApplePlatform)
44+
else if (_context.Target.IsApplePlatform)
4545
{
4646
foreach (string symbol in _exportSymbols)
4747
streamWriter.WriteLine($"_{symbol}");

src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/AttributePresenceFilterNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
439439
bucketCount *= 2;
440440
}
441441
}
442-
while(tryAgainWithBiggerTable && ((countOfRetries++) < 2));
442+
while (tryAgainWithBiggerTable && ((countOfRetries++) < 2));
443443

444444
byte[] result;
445445
if (tryAgainWithBiggerTable)

src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/DevirtualizationManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ protected override MethodDesc ResolveVirtualMethod(MethodDesc declMethod, DefTyp
143143
if (!implType.IsObject)
144144
{
145145
TypeDesc typeThatDerivesFromObject = implType;
146-
while(!typeThatDerivesFromObject.BaseType.IsObject)
146+
while (!typeThatDerivesFromObject.BaseType.IsObject)
147147
{
148148
typeThatDerivesFromObject = typeThatDerivesFromObject.BaseType;
149149
}

src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ProfileData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private EmptyProfileData()
126126
{
127127
}
128128

129-
public override MibcConfig Config { get; } = new ();
129+
public override MibcConfig Config { get; } = new();
130130

131131
public override bool PartialNGen => false;
132132

src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ void CompileMethodList(IEnumerable<DependencyNodeCore<NodeFactory>> methodList)
801801

802802
void CompilationThread(object objThreadId)
803803
{
804-
while(true)
804+
while (true)
805805
{
806806
_compilationThreadSemaphore.Wait();
807807
lock(this)

src/coreclr/tools/aot/ILCompiler.ReadyToRun/IL/Stubs/PInvokeILEmitter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public struct PInvokeILEmitter
2424
private readonly MethodDesc _targetMethod;
2525
private readonly Marshaller[] _marshallers;
2626
private readonly PInvokeMetadata _importMetadata;
27-
private static readonly ConditionalWeakTable<TypeSystemContext, ConcurrentDictionary<MethodDesc, PInvokeTargetNativeMethod>> s_contexts = new ();
27+
private static readonly ConditionalWeakTable<TypeSystemContext, ConcurrentDictionary<MethodDesc, PInvokeTargetNativeMethod>> s_contexts = new();
2828

2929
private PInvokeILEmitter(MethodDesc targetMethod)
3030
{

src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ TypeDesc HandleContext(IEcmaModule module, EntityHandle handle, TypeDesc methodT
215215
{
216216
derivesFromTypeDefinition = currentType.GetTypeDefinition() == tokenOnlyOwningType;
217217
currentType = currentType.BaseType;
218-
} while(currentType != null && !derivesFromTypeDefinition);
218+
} while (currentType != null && !derivesFromTypeDefinition);
219219

220220
if (derivesFromTypeDefinition)
221221
{
@@ -311,7 +311,7 @@ public override bool Equals(object obj)
311311

312312
public override int GetHashCode()
313313
{
314-
return Method.GetHashCode() ^ unchecked(17 * Token.GetHashCode()) ^ unchecked (39 * (ConstrainedType?.GetHashCode() ?? 0));
314+
return Method.GetHashCode() ^ unchecked(17 * Token.GetHashCode()) ^ unchecked(39 * (ConstrainedType?.GetHashCode() ?? 0));
315315
}
316316

317317
public bool Equals(MethodWithToken methodWithToken)
@@ -2113,7 +2113,7 @@ private void ceeInfoGetCallInfo(
21132113
// of shared generic code calling a shared generic implementation method, which should be rare.
21142114
//
21152115
// An alternative design would be to add a new generic dictionary entry kind to hold the MethodDesc
2116-
// of the constrained target instead, and use that in some circumstances; however, implementation of
2116+
// of the constrained target instead, and use that in some circumstances; however, implementation of
21172117
// that design requires refactoring variuos parts of the JIT interface as well as
21182118
// TryResolveConstraintMethodApprox. In particular we would need to be abled to embed a constrained lookup
21192119
// via EmbedGenericHandle, as well as decide in TryResolveConstraintMethodApprox if the call can be made
@@ -3152,7 +3152,7 @@ private void setEHinfo(uint EHnumber, ref CORINFO_EH_CLAUSE clause)
31523152

31533153
// Currently, the only place we are using a token here is for a COM-to-CLR exception-to-HRESULT
31543154
// mapping catch clause. We want this catch clause to catch all exceptions, so we override the
3155-
// token to be mdTypeRefNil, which used by the EH system to mean catch(...)
3155+
// token to be mdTypeRefNil, which used by the EH system to mean catch (...)
31563156
Debug.Assert(clauseType.IsObject);
31573157
clause.ClassTokenOrOffset = 0;
31583158
}

src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/x86/GcSlotTable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public override string ToString()
8181
sb.Append($" LowBits: ");
8282
if ((Flags & GcSlotFlags.GC_SLOT_UNTRACKED) != 0)
8383
{
84-
if((LowBits & pinned_OFFSET_FLAG) != 0) sb.Append("pinned ");
84+
if ((LowBits & pinned_OFFSET_FLAG) != 0) sb.Append("pinned ");
8585
if ((LowBits & byref_OFFSET_FLAG) != 0) sb.Append("byref ");
8686
}
8787
sb.AppendLine();

src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/AssemblyChecker.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ private IEnumerable<string> VerifyExportedTypes (AssemblyDefinition original, As
10281028
protected virtual IEnumerable<string> VerifyPseudoAttributes (MethodDefinition src, MethodDefinition linked)
10291029
{
10301030
var expected = (MethodAttributes) GetExpectedPseudoAttributeValue (src, (uint) src.Attributes);
1031-
if(!linked.Attributes.Equals(expected))
1031+
if (!linked.Attributes.Equals(expected))
10321032
{
10331033
yield return $"Method `{src}' pseudo attributes did not match expected";
10341034
}
@@ -1038,7 +1038,7 @@ protected virtual IEnumerable<string> VerifyPseudoAttributes (TypeDefinition src
10381038
{
10391039
var expected = (TypeAttributes) GetExpectedPseudoAttributeValue (src, (uint) src.Attributes);
10401040

1041-
if(!linked.Attributes.Equals(expected))
1041+
if (!linked.Attributes.Equals(expected))
10421042
{
10431043
yield return $"Type `{src}' pseudo attributes did not match expected";
10441044
}
@@ -1047,7 +1047,7 @@ protected virtual IEnumerable<string> VerifyPseudoAttributes (TypeDefinition src
10471047
protected virtual IEnumerable<string> VerifyPseudoAttributes (FieldDefinition src, FieldDefinition linked)
10481048
{
10491049
var expected = (FieldAttributes) GetExpectedPseudoAttributeValue (src, (uint) src.Attributes);
1050-
if(!linked.Attributes.Equals(expected))
1050+
if (!linked.Attributes.Equals(expected))
10511051
{
10521052
yield return $"Field `{src}' pseudo attributes did not match expected";
10531053
}
@@ -1056,7 +1056,7 @@ protected virtual IEnumerable<string> VerifyPseudoAttributes (FieldDefinition sr
10561056
protected virtual IEnumerable<string> VerifyPseudoAttributes (PropertyDefinition src, PropertyDefinition linked)
10571057
{
10581058
var expected = (PropertyAttributes) GetExpectedPseudoAttributeValue (src, (uint) src.Attributes);
1059-
if(!linked.Attributes.Equals(expected))
1059+
if (!linked.Attributes.Equals(expected))
10601060
{
10611061
yield return $"Property `{src}' pseudo attributes did not match expected";
10621062
}
@@ -1066,7 +1066,7 @@ protected virtual IEnumerable<string> VerifyPseudoAttributes (PropertyDefinition
10661066
protected virtual IEnumerable<string> VerifyPseudoAttributes (EventDefinition src, EventDefinition linked)
10671067
{
10681068
var expected = (EventAttributes) GetExpectedPseudoAttributeValue (src, (uint) src.Attributes);
1069-
if(!linked.Attributes.Equals(expected))
1069+
if (!linked.Attributes.Equals(expected))
10701070
{
10711071
yield return $"Event `{src}' pseudo attributes did not match expected";
10721072
}
@@ -1077,7 +1077,7 @@ protected virtual IEnumerable<string> VerifyCustomAttributes (ICustomAttributePr
10771077
var expectedAttrs = GetExpectedAttributes (src).ToList ();
10781078
var linkedAttrs = FilterLinkedAttributes (linked).ToList ();
10791079

1080-
if(!linkedAttrs.SequenceEqual(expectedAttrs))
1080+
if (!linkedAttrs.SequenceEqual(expectedAttrs))
10811081
{
10821082
yield return $"Custom attributes on `{src}' are not matching";
10831083
}
@@ -1091,7 +1091,7 @@ protected virtual IEnumerable<string> VerifySecurityAttributes (ICustomAttribute
10911091

10921092
var linkedAttrs = FilterLinkedSecurityAttributes (linked).ToList ();
10931093

1094-
if(!linkedAttrs.SequenceEqual(expectedAttrs))
1094+
if (!linkedAttrs.SequenceEqual(expectedAttrs))
10951095
{
10961096
yield return $"Security attributes on `{src}' are not matching";
10971097
}

src/coreclr/tools/cdac-build-tool/ComposeCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ internal sealed class ComposeCommand : CliCommand
1414
private readonly CliOption<string> outputFile = new("-o") { Arity = ArgumentArity.ExactlyOne, HelpName = "OUTPUT", Required = true, Description = "Output file" };
1515
private readonly CliOption<string[]> contractFile = new("-c") { Arity = ArgumentArity.ZeroOrMore, HelpName = "CONTRACT", Description = "Contract file (may be specified multiple times)" };
1616
private readonly CliOption<string> baselinePath = new("-b", "--baseline") { Arity = ArgumentArity.ExactlyOne, HelpName = "BASELINEPATH", Description = "Directory containing the baseline contracts"};
17-
private readonly CliOption<string> templateFile = new ("-i", "--input-template") { Arity = ArgumentArity.ExactlyOne, HelpName = "TEMPLATE", Description = "Contract descriptor template to be filled in" };
17+
private readonly CliOption<string> templateFile = new("-i", "--input-template") { Arity = ArgumentArity.ExactlyOne, HelpName = "TEMPLATE", Description = "Contract descriptor template to be filled in" };
1818
private readonly CliOption<bool> _verboseOption;
1919
public ComposeCommand(CliOption<bool> verboseOption) : base("compose")
2020
{

src/coreclr/tools/cdac-build-tool/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class Program
1010
{
1111
public static async Task<int> Main(string[] args)
1212
{
13-
CliRootCommand rootCommand = new ();
13+
CliRootCommand rootCommand = new();
1414
var verboseOption = new CliOption<bool>("-v", "--verbose") {Recursive = true, Description = "Verbose"};
1515
rootCommand.Add(verboseOption);
1616
rootCommand.Add(new DiagramDirective());

src/libraries/Common/src/Interop/Windows/Advapi32/Interop.PERF_INFO.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public readonly void Validate(int bufferSize)
116116
ByteLength > bufferSize ||
117117
NameOffset < 0 ||
118118
NameLength < 0 ||
119-
checked (NameOffset + NameLength) > ByteLength)
119+
checked(NameOffset + NameLength) > ByteLength)
120120
{
121121
ThrowInvalidOperationException(typeof(PERF_INSTANCE_DEFINITION));
122122
}

src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/DirectoryCatalog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ public void Refresh()
637637
// Lastly complete any changes added to the atomicComposition during the change event
638638
atomicComposition.Complete();
639639

640-
// Break out of the while(true)
640+
// Break out of the while (true)
641641
break;
642642
} // WriteLock
643643
} // AtomicComposition

src/libraries/System.Data.Common/src/System/Data/Common/DbDataAdapter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,7 @@ private void UpdateRowExecute(RowUpdatedEventArgs rowUpdatedEvent, IDbCommand da
15451545
}
15461546
finally
15471547
{
1548-
// using Close which can optimize its { while(dataReader.NextResult()); } loop
1548+
// using Close which can optimize its { while (dataReader.NextResult()); } loop
15491549
dataReader.Close();
15501550

15511551
// RecordsAffected is available after Close, but don't trust it after Dispose

src/libraries/System.Management/src/System/Management/ManagementObjectCollection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ IEnumerator IEnumerable.GetEnumerator()
367367
/// ManagementObjectCollection disks = diskClass.GetInstances();
368368
/// ManagementObjectCollection.ManagementObjectEnumerator disksEnumerator =
369369
/// disks.GetEnumerator();
370-
/// while(disksEnumerator.MoveNext()) {
370+
/// while (disksEnumerator.MoveNext()) {
371371
/// ManagementObject disk = (ManagementObject)disksEnumerator.Current;
372372
/// Console.WriteLine("Disk found: " + disk["deviceid"]);
373373
/// }

0 commit comments

Comments
 (0)