Skip to content
This repository was archived by the owner on Jul 12, 2022. It is now read-only.

Commit 2ef01d7

Browse files
committed
Merge pull request #10 from jaredpar/format-code
Formatted the formatting tool source with the formatting tool.
2 parents da37746 + ba02438 commit 2ef01d7

File tree

7 files changed

+16
-11
lines changed

7 files changed

+16
-11
lines changed

src/Microsoft.DotNet.CodeFormatting.Tests/Rules/ExplicitVisibilityRuleTests.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using System;
1+
// Copyright (c) Microsoft. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
4+
using System;
25
using System.Collections.Generic;
36
using System.Linq;
47
using System.Text;
@@ -109,7 +112,7 @@ internal interface I
109112
}
110113
";
111114

112-
Verify(text, expected, runFormatter: false);
115+
Verify(text, expected, runFormatter: false);
113116
}
114117

115118
[Fact]

src/Microsoft.DotNet.CodeFormatting.Tests/Rules/UsesXunitForTestsFormattingRuleTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Microsoft.DotNet.CodeFormatting.Tests
1313
{
14-
1514
public class UsesXunitForTestsFormattingRuleTests : CodeFormattingTestBase
1615
{
1716
[Fact]

src/Microsoft.DotNet.CodeFormatting/IFormattingFilter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace Microsoft.DotNet.CodeFormatting
1010
{
11-
interface IFormattingFilter
11+
internal interface IFormattingFilter
1212
{
1313
Task<bool> ShouldBeProcessedAsync(Document document);
1414
}

src/Microsoft.DotNet.CodeFormatting/RuleTypeConstants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace Microsoft.DotNet.CodeFormatting
1212
{
13-
static class RuleTypeConstants
13+
internal static class RuleTypeConstants
1414
{
1515
public const string PartMetadataKey = "RuleType";
1616
public const string ConvertTestsRuleType = "ConvertTests";

src/Microsoft.DotNet.CodeFormatting/Rules/ExplicitVisibilityRule.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using Microsoft.CodeAnalysis;
1+
// Copyright (c) Microsoft. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
4+
using Microsoft.CodeAnalysis;
25
using Microsoft.CodeAnalysis.CSharp;
36
using Microsoft.CodeAnalysis.CSharp.Syntax;
47
using System;

src/Microsoft.DotNet.CodeFormatting/Rules/NonAsciiCharactersAreEscapedInLiteralsRule.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
1+
// Copyright (c) Microsoft. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
23
// Licensed under MIT. See LICENSE in the project root for license information.
4+
35
using System;
46
using System.ComponentModel.Composition;
57
using System.Diagnostics;
@@ -48,7 +50,7 @@ public override SyntaxNode VisitLiteralExpression(LiteralExpressionSyntax node)
4850
return RewriteCharacterLiteralExpression(node);
4951
}
5052

51-
return base.Visit(node);
53+
return base.Visit(node);
5254
}
5355

5456
private static SyntaxNode RewriteStringLiteralExpression(LiteralExpressionSyntax node)
@@ -120,7 +122,6 @@ private static string EscapeNonAsciiCharacters(string oldValue)
120122

121123
return sb.ToString();
122124
}
123-
124125
}
125126
}
126127
}

src/Microsoft.DotNet.CodeFormatting/Rules/UsesXunitForTestsFormattingRule.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,10 +309,9 @@ private static bool LoadMSTestNamespaces()
309309
_mstestNamespaces = new HashSet<string>(lines);
310310
return true;
311311
}
312-
313312
}
314313

315-
class TransformationTracker
314+
private class TransformationTracker
316315
{
317316
private Dictionary<SyntaxAnnotation, Func<CompilationUnitSyntax, IEnumerable<SyntaxNode>, Dictionary<SyntaxNode, SyntaxNode>, CompilationUnitSyntax>> _annotationToTransformation = new Dictionary<SyntaxAnnotation, Func<CompilationUnitSyntax, IEnumerable<SyntaxNode>, Dictionary<SyntaxNode, SyntaxNode>, CompilationUnitSyntax>>();
318317
private Dictionary<SyntaxNode, List<SyntaxAnnotation>> _nodeToAnnotations = new Dictionary<SyntaxNode, List<SyntaxAnnotation>>();

0 commit comments

Comments
 (0)