Skip to content

Commit 22e0e38

Browse files
format code
1 parent 8587e2f commit 22e0e38

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

ConfigureAwaitAnalyzer/ConfigureAwaitAnalyzer.Test/ConfigureAwaitAnalyzerUnitTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ static void Main()
271271
VerifyCSharpDiagnostic(test, expected1, expected2);
272272
}
273273

274-
274+
275275
[TestMethod]
276276
public void WhenThereIsCodeToFix_ThenItGetFixed()
277277
{
@@ -318,7 +318,7 @@ static void Main(string[] args)
318318
}
319319
}
320320
";
321-
321+
322322

323323
var fixtest = @"
324324
using System;

ConfigureAwaitAnalyzer/ConfigureAwaitAnalyzer/ConfigureAwaitAnalyzer.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ private static void AnalyzeNode(SyntaxNodeAnalysisContext context, INamedTypeSym
4141

4242
bool isAspNetCore = !(aspNetCoreMvcControllerType is null);
4343

44-
if(isAspNetCore && IsAspNetCoreControllerContext(context, aspNetCoreMvcControllerType))
44+
if (isAspNetCore && IsAspNetCoreControllerContext(context, aspNetCoreMvcControllerType))
4545
return;
4646

4747
var node = (AwaitExpressionSyntax)context.Node;
@@ -71,16 +71,16 @@ private static void AnalyzeNode(SyntaxNodeAnalysisContext context, INamedTypeSym
7171

7272
if (Equals(typeWithoutGenerics, AwaiterConfiguredType))
7373
return;
74-
74+
7575
context.ReportDiagnostic(Diagnostic.Create(Rule, node.GetLocation(), node.ToString()));
7676
}
7777

7878
private static bool IsAspNetCoreControllerContext(SyntaxNodeAnalysisContext context, INamedTypeSymbol aspNetCoreMvcControllerType)
7979
{
80-
var node = context.Node;
81-
while(!(node is null) && !(node is ClassDeclarationSyntax))
80+
var node = context.Node;
81+
while (!(node is null) && !(node is ClassDeclarationSyntax))
8282
node = node.Parent;
83-
83+
8484
var parentClass = node as ClassDeclarationSyntax;
8585

8686
var baseTypes = parentClass.BaseList?.Types.Select(t => t.Type) ?? Enumerable.Empty<TypeSyntax>();
@@ -89,10 +89,10 @@ private static bool IsAspNetCoreControllerContext(SyntaxNodeAnalysisContext cont
8989
{
9090
var baseTypeSymbol = context.SemanticModel.GetTypeInfo(baseType).Type;
9191

92-
if(baseTypeSymbol is null || baseTypeSymbol.TypeKind == TypeKind.Interface)
92+
if (baseTypeSymbol is null || baseTypeSymbol.TypeKind == TypeKind.Interface)
9393
continue;
9494

95-
if(InheritsFrom(baseTypeSymbol, aspNetCoreMvcControllerType))
95+
if (InheritsFrom(baseTypeSymbol, aspNetCoreMvcControllerType))
9696
return true;
9797
}
9898

0 commit comments

Comments
 (0)