Skip to content

Commit 5ca663b

Browse files
committed
Update docs.
1 parent d8f1fdc commit 5ca663b

File tree

13 files changed

+35
-35
lines changed

13 files changed

+35
-35
lines changed

AspNetCoreAnalyzers.Tests/ASP001ParameterNameTests/CodeFix.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace AspNetCoreAnalyzers.Tests.ASP001ParameterNameTests
88
public class CodeFix
99
{
1010
private static readonly DiagnosticAnalyzer Analyzer = new AttributeAnalyzer();
11-
private static readonly ExpectedDiagnostic ExpectedDiagnostic = ExpectedDiagnostic.Create(ASP001ParameterName.Descriptor);
11+
private static readonly ExpectedDiagnostic ExpectedDiagnostic = ExpectedDiagnostic.Create(ASP001ParameterSymbolName.Descriptor);
1212
private static readonly CodeFixProvider Fix = new ParameterNameFix();
1313

1414
[TestCase("@\"{value}\"")]

AspNetCoreAnalyzers.Tests/ASP001ParameterNameTests/ValidCode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace AspNetCoreAnalyzers.Tests.ASP001ParameterNameTests
88
public class ValidCode
99
{
1010
private static readonly DiagnosticAnalyzer Analyzer = new AttributeAnalyzer();
11-
private static readonly DiagnosticDescriptor Descriptor = ASP001ParameterName.Descriptor;
11+
private static readonly DiagnosticDescriptor Descriptor = ASP001ParameterSymbolName.Descriptor;
1212

1313
[TestCase("@\"{value}\"")]
1414
[TestCase("\"{value}\"")]

AspNetCoreAnalyzers.Tests/ASP002MissingParameterTests/CodeFix.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace AspNetCoreAnalyzers.Tests.ASP002MissingParameterTests
88
public class CodeFix
99
{
1010
private static readonly DiagnosticAnalyzer Analyzer = new AttributeAnalyzer();
11-
private static readonly ExpectedDiagnostic ExpectedDiagnostic = ExpectedDiagnostic.Create(ASP002MissingParameter.Descriptor);
11+
private static readonly ExpectedDiagnostic ExpectedDiagnostic = ExpectedDiagnostic.Create(ASP007MissingParameter.Descriptor);
1212
private static readonly CodeFixProvider Fix = new TemplateTextFix();
1313

1414
[TestCase("\"api/{↓value}\"", "\"api/{text}\"")]

AspNetCoreAnalyzers.Tests/ASP002MissingParameterTests/Diagnostics.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace AspNetCoreAnalyzers.Tests.ASP002MissingParameterTests
77
public class Diagnostics
88
{
99
private static readonly DiagnosticAnalyzer Analyzer = new AttributeAnalyzer();
10-
private static readonly ExpectedDiagnostic ExpectedDiagnostic = ExpectedDiagnostic.Create(ASP002MissingParameter.Descriptor);
10+
private static readonly ExpectedDiagnostic ExpectedDiagnostic = ExpectedDiagnostic.Create(ASP007MissingParameter.Descriptor);
1111

1212
[Test]
1313
public void WhenNoParameter()

AspNetCoreAnalyzers/ASP001ParameterName.cs renamed to AspNetCoreAnalyzers/ASP001ParameterSymbolName.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ namespace AspNetCoreAnalyzers
22
{
33
using Microsoft.CodeAnalysis;
44

5-
internal static class ASP001ParameterName
5+
internal static class ASP001ParameterSymbolName
66
{
77
public const string DiagnosticId = "ASP001";
88

99
internal static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor(
1010
id: DiagnosticId,
11-
title: "The parameter name does not match the url parameter.",
12-
messageFormat: "The parameter name does not match the url parameter.",
11+
title: "Parameter name does not match the name specified by the route parameter.",
12+
messageFormat: "Parameter name does not match the name specified by the route parameter.",
1313
category: AnalyzerCategory.Routing,
1414
defaultSeverity: DiagnosticSeverity.Warning,
1515
isEnabledByDefault: true,
16-
description: "The parameter name does not match the url parameter.",
16+
description: "Parameter name does not match the name specified by the route parameter.",
1717
helpLinkUri: HelpLink.ForId(DiagnosticId));
1818
}
1919
}

AspNetCoreAnalyzers/ASP003ParameterSymbolType.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ internal static class ASP003ParameterSymbolType
88

99
internal static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor(
1010
id: DiagnosticId,
11-
title: "Parameter type does not match the type specified by the route parameter.",
12-
messageFormat: "Parameter type does not match the type specified by the route parameter.",
11+
title: "Parameter type does not match the type specified by the name specified by the route parameter.",
12+
messageFormat: "Parameter type does not match the type specified by the name specified by the route parameter.",
1313
category: AnalyzerCategory.Routing,
1414
defaultSeverity: DiagnosticSeverity.Warning,
1515
isEnabledByDefault: true,
16-
description: "Parameter type does not match the type specified by the route parameter.",
16+
description: "Parameter type does not match the type specified by the name specified by the route parameter.",
1717
helpLinkUri: HelpLink.ForId(DiagnosticId));
1818
}
1919
}

AspNetCoreAnalyzers/ASP002MissingParameter.cs renamed to AspNetCoreAnalyzers/ASP007MissingParameter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ namespace AspNetCoreAnalyzers
22
{
33
using Microsoft.CodeAnalysis;
44

5-
internal static class ASP002MissingParameter
5+
internal static class ASP007MissingParameter
66
{
77
public const string DiagnosticId = "ASP002";
88

AspNetCoreAnalyzers/Analyzers/AttributeAnalyzer.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ namespace AspNetCoreAnalyzers
1515
public class AttributeAnalyzer : DiagnosticAnalyzer
1616
{
1717
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
18-
ASP001ParameterName.Descriptor,
19-
ASP002MissingParameter.Descriptor,
18+
ASP001ParameterSymbolName.Descriptor,
19+
ASP007MissingParameter.Descriptor,
2020
ASP003ParameterSymbolType.Descriptor,
2121
ASP004RouteParameterType.Descriptor,
2222
ASP005ParameterSyntax.Descriptor,
@@ -44,15 +44,15 @@ context.ContainingSymbol is IMethodSymbol method &&
4444
{
4545
context.ReportDiagnostic(
4646
Diagnostic.Create(
47-
ASP001ParameterName.Descriptor,
47+
ASP001ParameterSymbolName.Descriptor,
4848
parameterSyntax.Identifier.GetLocation(),
4949
ImmutableDictionary<string, string>.Empty.Add(
5050
nameof(NameSyntax),
5151
templateParameter.Name.ToString())));
5252

5353
context.ReportDiagnostic(
5454
Diagnostic.Create(
55-
ASP002MissingParameter.Descriptor,
55+
ASP007MissingParameter.Descriptor,
5656
templateParameter.Name.GetLocation(),
5757
ImmutableDictionary<string, string>.Empty.Add(
5858
nameof(Text),
@@ -63,7 +63,7 @@ context.ContainingSymbol is IMethodSymbol method &&
6363
{
6464
context.ReportDiagnostic(
6565
Diagnostic.Create(
66-
ASP001ParameterName.Descriptor,
66+
ASP001ParameterSymbolName.Descriptor,
6767
methodDeclaration.ParameterList.GetLocation()));
6868
}
6969

@@ -72,7 +72,7 @@ context.ContainingSymbol is IMethodSymbol method &&
7272
{
7373
context.ReportDiagnostic(
7474
Diagnostic.Create(
75-
ASP002MissingParameter.Descriptor,
75+
ASP007MissingParameter.Descriptor,
7676
methodDeclaration.ParameterList.GetLocation()));
7777
}
7878

AspNetCoreAnalyzers/CodeFixes/ParameterNameFix.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace AspNetCoreAnalyzers
1616
public class ParameterNameFix : CodeFixProvider
1717
{
1818
public override ImmutableArray<string> FixableDiagnosticIds { get; } = ImmutableArray.Create(
19-
ASP001ParameterName.DiagnosticId);
19+
ASP001ParameterSymbolName.DiagnosticId);
2020

2121
public override FixAllProvider GetFixAllProvider() => WellKnownFixAllProviders.BatchFixer;
2222

AspNetCoreAnalyzers/CodeFixes/TemplateTextFix.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace AspNetCoreAnalyzers
1616
public class TemplateTextFix : CodeFixProvider
1717
{
1818
public override ImmutableArray<string> FixableDiagnosticIds { get; } = ImmutableArray.Create(
19-
ASP002MissingParameter.DiagnosticId,
19+
ASP007MissingParameter.DiagnosticId,
2020
ASP004RouteParameterType.DiagnosticId,
2121
ASP005ParameterSyntax.DiagnosticId,
2222
ASP006ParameterRegex.DiagnosticId);
@@ -54,7 +54,7 @@ private static string GetTitle(Diagnostic diagnostic)
5454
{
5555
switch (diagnostic.Id)
5656
{
57-
case ASP002MissingParameter.DiagnosticId:
57+
case ASP007MissingParameter.DiagnosticId:
5858
return "Rename parameter.";
5959
case ASP004RouteParameterType.DiagnosticId:
6060
return "Change type to match symbol.";

0 commit comments

Comments
 (0)