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

Commit d4eb5a2

Browse files
committed
Run codeformatter on codeformatter solution
1 parent 2dbd20c commit d4eb5a2

30 files changed

+120
-95
lines changed

src/CodeFormatter/Program.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private static int Main(string[] args)
5959
if (arg.StartsWith(FileSwitch, StringComparison.OrdinalIgnoreCase))
6060
{
6161
var all = arg.Substring(FileSwitch.Length);
62-
var files = all.Split(new[] { ','}, StringSplitOptions.RemoveEmptyEntries);
62+
var files = all.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
6363
fileNamesBuilder.AddRange(files);
6464
}
6565
else if (arg.StartsWith(ConfigSwitch, StringComparison.OrdinalIgnoreCase))
@@ -140,10 +140,10 @@ private static int Main(string[] args)
140140
}
141141

142142
private static async Task RunAsync(
143-
string projectOrSolutionPath,
144-
ImmutableArray<string> ruleTypes,
145-
ImmutableArray<string> fileNames,
146-
ImmutableArray<string[]> preprocessorConfigurations,
143+
string projectOrSolutionPath,
144+
ImmutableArray<string> ruleTypes,
145+
ImmutableArray<string> fileNames,
146+
ImmutableArray<string[]> preprocessorConfigurations,
147147
ImmutableArray<string> copyrightHeader,
148148
bool allowTables,
149149
bool convertUnicode,

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ void M()
248248
";
249249

250250
Verify(text, expected);
251-
252251
}
253252

254253
[Fact]

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

Lines changed: 4 additions & 3 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;
@@ -74,7 +77,6 @@ private void M()
7477
[Fact]
7578
public void FieldAssignment()
7679
{
77-
7880
var text = @"
7981
class C {
8082
int field;
@@ -263,7 +265,6 @@ private void M()
263265
}";
264266

265267
Verify(source, expected, runFormatter: false);
266-
267268
}
268269
}
269270
}

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

Lines changed: 4 additions & 7 deletions
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 System;
36
using System.Collections.Generic;
47
using System.Collections.Immutable;
@@ -33,7 +36,6 @@ class C
3336
{
3437
}";
3538
Verify(source, expected);
36-
3739
}
3840

3941
[Fact]
@@ -52,7 +54,6 @@ class C
5254
{
5355
}";
5456
Verify(source, expected);
55-
5657
}
5758

5859
[Fact]
@@ -71,7 +72,6 @@ class C
7172
{
7273
}";
7374
Verify(source, expected);
74-
7575
}
7676

7777
[Fact]
@@ -92,7 +92,6 @@ class C
9292
{
9393
}";
9494
Verify(source, expected);
95-
9695
}
9796

9897
[Fact]
@@ -127,7 +126,6 @@ class C
127126
{
128127
}";
129128
Verify(source, expected);
130-
131129
}
132130

133131
[Fact]
@@ -163,7 +161,6 @@ class C
163161
{
164162
}";
165163
Verify(source, expected);
166-
167164
}
168165

169166
[Fact]

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

Lines changed: 4 additions & 1 deletion
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;

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ internal override ILocalSemanticFormattingRule Rule
2020

2121
public sealed class CSharpTests : ExplicitVisibilityRuleTests
2222
{
23-
2423
[Fact]
2524
public void TestTypeVisibility()
2625
{
@@ -451,7 +450,6 @@ private static void M2() { }
451450
};";
452451

453452
Verify(text, expected);
454-
455453
}
456454

457455
[Fact]
@@ -486,7 +484,6 @@ private override void M2() { }
486484
};";
487485

488486
Verify(text, expected);
489-
490487
}
491488

492489
[Fact]
@@ -521,7 +518,6 @@ internal class C
521518
};";
522519

523520
Verify(text, expected);
524-
525521
}
526522

527523
[Fact]
@@ -556,7 +552,6 @@ private unsafe C(int p1, int p2) { }
556552
};";
557553

558554
Verify(text, expected);
559-
560555
}
561556

562557
public void CommentAttributeAndMultipleField()

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

Lines changed: 4 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;
@@ -151,6 +154,5 @@ class C { }
151154

152155
Verify(source, source);
153156
}
154-
155157
}
156158
}

src/Microsoft.DotNet.CodeFormatting/Filters/UsableFileFilter.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 System;
36
using System.Collections.Generic;
47
using System.ComponentModel.Composition;

src/Microsoft.DotNet.CodeFormatting/FormattingConstants.cs

Lines changed: 4 additions & 1 deletion
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.Collections.Immutable;
47
using System.Linq;

src/Microsoft.DotNet.CodeFormatting/FormattingEngineImplementation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public bool Verbose
7171
get { return _verbose; }
7272
set { _verbose = value; }
7373
}
74-
74+
7575
public bool ConvertUnicodeCharacters
7676
{
7777
get { return _options.ConvertUnicodeCharacters; }

0 commit comments

Comments
 (0)