Skip to content

Commit 3bf7178

Browse files
committed
Code style cleanup for consistency
1 parent fda8aa6 commit 3bf7178

4 files changed

Lines changed: 33 additions & 33 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,13 @@
243243
<Compile Include="MaintainabilityRules\SA1119UnitTests.cs" />
244244
<Compile Include="MaintainabilityRules\SA1400UnitTests.cs" />
245245
<Compile Include="MaintainabilityRules\SA1401UnitTests.cs" />
246-
<Compile Include="MaintainabilityRules\SA1402ForEnumUnitTests.cs" />
246+
<Compile Include="MaintainabilityRules\SA1402ForBlockDeclarationUnitTestsBase.cs" />
247+
<Compile Include="MaintainabilityRules\SA1402ForClassUnitTests.cs" />
247248
<Compile Include="MaintainabilityRules\SA1402ForDelegateUnitTests.cs" />
249+
<Compile Include="MaintainabilityRules\SA1402ForEnumUnitTests.cs" />
250+
<Compile Include="MaintainabilityRules\SA1402ForInterfaceUnitTests.cs" />
248251
<Compile Include="MaintainabilityRules\SA1402ForNonBlockDeclarationUnitTestsBase.cs" />
249252
<Compile Include="MaintainabilityRules\SA1402ForStructUnitTests.cs" />
250-
<Compile Include="MaintainabilityRules\SA1402ForInterfaceUnitTests.cs" />
251-
<Compile Include="MaintainabilityRules\SA1402ForClassUnitTests.cs" />
252-
<Compile Include="MaintainabilityRules\SA1402ForBlockDeclarationUnitTestsBase.cs" />
253253
<Compile Include="MaintainabilityRules\SA1402SettingsConfiguration.cs" />
254254
<Compile Include="MaintainabilityRules\SA1402SettingsConfigurationExtensions.cs" />
255255
<Compile Include="MaintainabilityRules\SA1403UnitTests.cs" />

StyleCop.Analyzers/StyleCop.Analyzers/Helpers/FileNameHelpers.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ internal static string GetConventionalFileName(MemberDeclarationSyntax declarati
3939

4040
switch (convention)
4141
{
42-
case FileNamingConvention.Metadata:
43-
return GetMetadataFileName(typeDeclaration);
42+
case FileNamingConvention.Metadata:
43+
return GetMetadataFileName(typeDeclaration);
4444

45-
default:
46-
return GetStyleCopFileName(typeDeclaration);
45+
default:
46+
return GetStyleCopFileName(typeDeclaration);
4747
}
4848
}
4949

StyleCop.Analyzers/StyleCop.Analyzers/Helpers/NamedTypeHelpers.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,19 @@ internal static string GetNameOrIdentifier(MemberDeclarationSyntax member)
8181
{
8282
switch (member.Kind())
8383
{
84-
case SyntaxKind.ClassDeclaration:
85-
case SyntaxKind.InterfaceDeclaration:
86-
case SyntaxKind.StructDeclaration:
87-
return ((TypeDeclarationSyntax)member).Identifier.Text;
84+
case SyntaxKind.ClassDeclaration:
85+
case SyntaxKind.InterfaceDeclaration:
86+
case SyntaxKind.StructDeclaration:
87+
return ((TypeDeclarationSyntax)member).Identifier.Text;
8888

89-
case SyntaxKind.EnumDeclaration:
90-
return ((EnumDeclarationSyntax)member).Identifier.Text;
89+
case SyntaxKind.EnumDeclaration:
90+
return ((EnumDeclarationSyntax)member).Identifier.Text;
9191

92-
case SyntaxKind.DelegateDeclaration:
93-
return ((DelegateDeclarationSyntax)member).Identifier.Text;
92+
case SyntaxKind.DelegateDeclaration:
93+
return ((DelegateDeclarationSyntax)member).Identifier.Text;
9494

95-
default:
96-
throw new ArgumentException("Unhandled declaration kind: " + member.Kind());
95+
default:
96+
throw new ArgumentException("Unhandled declaration kind: " + member.Kind());
9797
}
9898
}
9999

StyleCop.Analyzers/StyleCop.Analyzers/MaintainabilityRules/SA1402FileMayOnlyContainASingleType.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,21 @@ private static bool IsRelevantType(SyntaxNode node, StyleCopSettings settings)
109109

110110
switch (node.Kind())
111111
{
112-
case SyntaxKind.ClassDeclaration:
113-
isRelevant = topLevelTypes.Contains(TopLevelType.Class);
114-
break;
115-
case SyntaxKind.InterfaceDeclaration:
116-
isRelevant = topLevelTypes.Contains(TopLevelType.Interface);
117-
break;
118-
case SyntaxKind.StructDeclaration:
119-
isRelevant = topLevelTypes.Contains(TopLevelType.Struct);
120-
break;
121-
case SyntaxKind.EnumDeclaration:
122-
isRelevant = topLevelTypes.Contains(TopLevelType.Enum);
123-
break;
124-
case SyntaxKind.DelegateDeclaration:
125-
isRelevant = topLevelTypes.Contains(TopLevelType.Delegate);
126-
break;
112+
case SyntaxKind.ClassDeclaration:
113+
isRelevant = topLevelTypes.Contains(TopLevelType.Class);
114+
break;
115+
case SyntaxKind.InterfaceDeclaration:
116+
isRelevant = topLevelTypes.Contains(TopLevelType.Interface);
117+
break;
118+
case SyntaxKind.StructDeclaration:
119+
isRelevant = topLevelTypes.Contains(TopLevelType.Struct);
120+
break;
121+
case SyntaxKind.EnumDeclaration:
122+
isRelevant = topLevelTypes.Contains(TopLevelType.Enum);
123+
break;
124+
case SyntaxKind.DelegateDeclaration:
125+
isRelevant = topLevelTypes.Contains(TopLevelType.Delegate);
126+
break;
127127
}
128128

129129
return isRelevant;

0 commit comments

Comments
 (0)