Skip to content

Commit 560de15

Browse files
committed
Fix all violations of SA1649 (FileNameMustMatchTypeName)
1 parent f8ac5fa commit 560de15

6 files changed

Lines changed: 38 additions & 30 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.Test/Helpers/DiagnosticResult.cs

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,6 @@ namespace TestHelper
66
using System;
77
using Microsoft.CodeAnalysis;
88

9-
/// <summary>
10-
/// Location where the diagnostic appears, as determined by path, line number, and column number.
11-
/// </summary>
12-
public struct DiagnosticResultLocation
13-
{
14-
public string Path;
15-
public int Line;
16-
public int Column;
17-
18-
public DiagnosticResultLocation(string path, int line, int column)
19-
{
20-
if (line < 0 && column < 0)
21-
{
22-
throw new ArgumentOutOfRangeException("At least one of line and column must be > 0");
23-
}
24-
25-
if (line < -1 || column < -1)
26-
{
27-
throw new ArgumentOutOfRangeException("Both line and column must be >= -1");
28-
}
29-
30-
this.Path = path;
31-
this.Line = line;
32-
this.Column = column;
33-
}
34-
}
35-
369
/// <summary>
3710
/// Structure that stores information about a <see cref="Diagnostic"/> appearing in a source.
3811
/// </summary>
@@ -177,4 +150,4 @@ public DiagnosticResult WithLineOffset(int offset)
177150
return result;
178151
}
179152
}
180-
}
153+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
2+
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
3+
4+
namespace TestHelper
5+
{
6+
using System;
7+
8+
/// <summary>
9+
/// Location where the diagnostic appears, as determined by path, line number, and column number.
10+
/// </summary>
11+
public struct DiagnosticResultLocation
12+
{
13+
public string Path;
14+
public int Line;
15+
public int Column;
16+
17+
public DiagnosticResultLocation(string path, int line, int column)
18+
{
19+
if (line < 0 && column < 0)
20+
{
21+
throw new ArgumentOutOfRangeException("At least one of line and column must be > 0");
22+
}
23+
24+
if (line < -1 || column < -1)
25+
{
26+
throw new ArgumentOutOfRangeException("Both line and column must be >= -1");
27+
}
28+
29+
this.Path = path;
30+
this.Line = line;
31+
this.Column = column;
32+
}
33+
}
34+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@
168168
<Compile Include="ExportCodeFixProviderAttributeNameTest.cs" />
169169
<Compile Include="Helpers\CodeFixVerifier.Helper.cs" />
170170
<Compile Include="Helpers\DiagnosticResult.cs" />
171+
<Compile Include="Helpers\DiagnosticResultLocation.cs" />
171172
<Compile Include="Helpers\DiagnosticVerifier.Helper.cs" />
172173
<Compile Include="Helpers\ExclusionTestAnalyzer.cs" />
173174
<Compile Include="Helpers\TestDiagnosticProvider.cs" />

StyleCop.Analyzers/StyleCop.Analyzers/Helpers/DocumentationCommentExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace StyleCop.Analyzers.Helpers
1111
using Microsoft.CodeAnalysis.CSharp.Syntax;
1212
using StyleCop.Analyzers.SpacingRules;
1313

14-
internal static class DocumentationSyntaxExtensions
14+
internal static class DocumentationCommentExtensions
1515
{
1616
public static DocumentationCommentTriviaSyntax GetDocumentationCommentTriviaSyntax(this SyntaxNode node)
1717
{

StyleCop.Analyzers/StyleCop.Analyzers/Helpers/TokenHelpers.cs renamed to StyleCop.Analyzers/StyleCop.Analyzers/Helpers/TokenHelper.cs

File renamed without changes.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
<Compile Include="Helpers\Requires.cs" />
138138
<Compile Include="Helpers\SpecializedTasks.cs" />
139139
<Compile Include="Helpers\SyntaxTreeHelpers.cs" />
140-
<Compile Include="Helpers\TokenHelpers.cs" />
140+
<Compile Include="Helpers\TokenHelper.cs" />
141141
<Compile Include="Helpers\TriviaHelper.cs" />
142142
<Compile Include="Helpers\UsingDirectiveSyntaxHelpers.cs" />
143143
<Compile Include="Helpers\XmlCommentHelper.cs" />

0 commit comments

Comments
 (0)