Skip to content

Commit a67a453

Browse files
committed
Fix a few random minor code style violations
1 parent 180c990 commit a67a453

File tree

10 files changed

+13
-3
lines changed

10 files changed

+13
-3
lines changed

src/Shared/Microsoft.AspNetCore.Razor.Test.Common/Language/IntegrationTests/IntegrationTestBase.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ protected RazorProjectItem CreateProjectItemFromFile(
168168
{
169169
throw new XunitException($"The resource {sourceFileName} was not found.");
170170
}
171+
171172
var fileContent = testFile.ReadAllText();
172173

173174
var workingDirectory = Path.GetDirectoryName(fileName);
@@ -713,6 +714,7 @@ public override Syntax.SyntaxNode VisitCSharpStatementLiteral(CSharpStatementLit
713714
{
714715
CodeSpans.Add(node);
715716
}
717+
716718
return base.VisitCSharpStatementLiteral(node);
717719
}
718720

@@ -722,6 +724,7 @@ public override Syntax.SyntaxNode VisitCSharpExpressionLiteral(CSharpExpressionL
722724
{
723725
CodeSpans.Add(node);
724726
}
727+
725728
return base.VisitCSharpExpressionLiteral(node);
726729
}
727730

src/Shared/Microsoft.AspNetCore.Razor.Test.Common/Language/IntegrationTests/IntermediateNodeVerifier.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private void AssertNodeEquals(IntermediateNode node, IEnumerable<IntermediateNod
7878
throw new IntermediateNodeBaselineException(node, Ancestors.ToArray(), expected, actual, message);
7979
}
8080

81-
int charsVerified = 0;
81+
var charsVerified = 0;
8282
AssertNestingEqual(node, ancestors, expected, actual, ref charsVerified);
8383
AssertNameEqual(node, ancestors, expected, actual, ref charsVerified);
8484
AssertDelimiter(expected, actual, true, ref charsVerified);

src/Shared/Microsoft.AspNetCore.Razor.Test.Common/Language/IntegrationTests/RazorBaselineIntegrationTestBase.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ protected void AssertLinePragmas(RazorCodeDocument codeDocument)
215215
{
216216
Assert.NotNull(pragma.EndCharacterIndex);
217217
}
218+
218219
Assert.Equal(pragmasInDocument.Length, csharpDocument.SourceMappings.Length);
219220
}
220221
}
@@ -247,6 +248,7 @@ protected void AssertSequencePointsMatchBaseline(CompileToAssemblyResult result,
247248
}
248249
}
249250
}
251+
250252
var actualSequencePoints = builder.ToString().ReplaceLineEndings();
251253

252254
var baselineFilePath = GetBaselineFilePath(codeDocument, ".sp.txt", testName);

src/Shared/Microsoft.AspNetCore.Razor.Test.Common/Language/IntegrationTests/RazorIntegrationTestBase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ private static MemoryStream EmitCompilation(Compilation compilation)
379379
{
380380
throw new CompilationFailedException(compilation, emitResult.Diagnostics);
381381
}
382+
382383
peStream.Position = 0;
383384
return peStream;
384385
}

src/Shared/Microsoft.AspNetCore.Razor.Test.Common/Language/Intermediate/IntermediateNodeAssert.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ public static void EndInstrumentation(IntermediateNode node)
272272
Assert.Equal(TokenKind.CSharp, token.Kind);
273273
content.Append(token.Content);
274274
}
275+
275276
Assert.Equal("EndContext();", content.ToString());
276277
}
277278
catch (XunitException e)

src/Shared/Microsoft.AspNetCore.Razor.Test.Common/Language/Legacy/ClassifiedSpan/ClassifiedSpanWriter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ protected void WriteClassifiedSpan(ClassifiedSpanInternal span)
3333
Write($" (Accepts:{span.AcceptedCharacters})");
3434
#pragma warning restore CS0618 // Type or member is obsolete
3535
}
36+
3637
WriteSeparator();
3738
Write($"Parent: {span.BlockKind} block at {span.BlockSpan}");
3839
}

src/Shared/Microsoft.AspNetCore.Razor.Test.Common/Language/RazorCodeDocumentProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ public DocumentIntermediateNode GetDocumentNode()
6666
var documentNode = CodeDocument.GetDocumentNode();
6767
Assert.NotNull(documentNode);
6868

69-
return documentNode; ;
69+
return documentNode;
7070
}
7171
}

src/Shared/Microsoft.AspNetCore.Razor.Test.Common/Language/SyntaxTreeVerifier.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public static void Verify(RazorSyntaxTree syntaxTree, bool ensureFullFidelity =
3030
{
3131
builder.Append(sourceText[i]);
3232
}
33+
3334
var sourceString = builder.ToString();
3435

3536
// Make sure the syntax tree contains all of the text in the document.

src/Shared/Microsoft.AspNetCore.Razor.Test.Common/Language/TestProject.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ private static string SearchUp(string baseDirectory, string fileName)
9696
{
9797
return fileInfo.DirectoryName;
9898
}
99+
99100
directoryInfo = directoryInfo.Parent;
100101
}
101102
while (directoryInfo.Parent != null);

src/Shared/Microsoft.AspNetCore.Razor.Test.Common/TestCompilation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public static CSharpCompilation Create(Assembly assembly, SyntaxTree syntaxTree
7070
syntaxTrees = new[] { syntaxTree };
7171
}
7272

73-
if (!_referenceCache.TryGetValue(assembly, out IEnumerable<MetadataReference> metadataReferences))
73+
if (!_referenceCache.TryGetValue(assembly, out var metadataReferences))
7474
{
7575
metadataReferences = GetMetadataReferences(assembly);
7676
_referenceCache.TryAdd(assembly, metadataReferences);

0 commit comments

Comments
 (0)