Removed duplocate Id for a RazorDiagnostic

This commit is contained in:
Ajay Bhargav Baaskaran 2018-10-29 10:50:17 -07:00
Родитель 25a895123e
Коммит 8674dd9236
17 изменённых файлов: 36 добавлений и 36 удалений

Просмотреть файл

@ -240,16 +240,6 @@ namespace Microsoft.AspNetCore.Razor.Language
return RazorDiagnostic.Create(Parsing_InvalidTagHelperPrefixValue, location, directiveName, character, prefix);
}
internal static readonly RazorDiagnosticDescriptor Parsing_InvalidTagHelperLookupText =
new RazorDiagnosticDescriptor(
$"{DiagnosticPrefix}1020",
() => Resources.InvalidTagHelperLookupText,
RazorDiagnosticSeverity.Error);
public static RazorDiagnostic CreateParsing_InvalidTagHelperLookupText(SourceSpan location, string lookupText)
{
return RazorDiagnostic.Create(Parsing_InvalidTagHelperLookupText, location, lookupText);
}
internal static readonly RazorDiagnosticDescriptor Parsing_MarkupBlockMustStartWithTag =
new RazorDiagnosticDescriptor(
$"{DiagnosticPrefix}1021",
@ -417,6 +407,16 @@ namespace Microsoft.AspNetCore.Razor.Language
return diagnostic;
}
internal static readonly RazorDiagnosticDescriptor Parsing_InvalidTagHelperLookupText =
new RazorDiagnosticDescriptor(
$"{DiagnosticPrefix}1036",
() => Resources.InvalidTagHelperLookupText,
RazorDiagnosticSeverity.Error);
public static RazorDiagnostic CreateParsing_InvalidTagHelperLookupText(SourceSpan location, string lookupText)
{
return RazorDiagnostic.Create(Parsing_InvalidTagHelperLookupText, location, lookupText);
}
#endregion
#region Semantic Errors

Просмотреть файл

@ -1,15 +1,15 @@
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(3,2): Error RZ1018: Directive 'addTagHelper' must have a value.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(3,14): Error RZ1020: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(3,14): Error RZ1036: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,2): Error RZ1018: Directive 'addTagHelper' must have a value.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,15): Error RZ1020: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,15): Error RZ1036: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(5,15): Error RZ1000: Unterminated string literal. Strings that start with a quotation mark (") must be terminated before the end of the line. However, strings that start with @ and a quotation mark (@") can span multiple lines.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(5,15): Error RZ1020: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(5,15): Error RZ1036: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(7,2): Error RZ1018: Directive 'removeTagHelper' must have a value.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(7,17): Error RZ1020: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(7,17): Error RZ1036: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(8,2): Error RZ1018: Directive 'removeTagHelper' must have a value.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(8,18): Error RZ1020: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(8,18): Error RZ1036: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(9,18): Error RZ1000: Unterminated string literal. Strings that start with a quotation mark (") must be terminated before the end of the line. However, strings that start with @ and a quotation mark (@") can span multiple lines.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(9,18): Error RZ1020: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(9,18): Error RZ1036: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(11,2): Error RZ1018: Directive 'tagHelperPrefix' must have a value.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(12,2): Error RZ1018: Directive 'tagHelperPrefix' must have a value.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(12,1): Error RZ2001: The 'tagHelperPrefix' directive may only occur once per document.

Просмотреть файл

@ -1,15 +1,15 @@
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(3,2): Error RZ1018: Directive 'addTagHelper' must have a value.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(3,14): Error RZ1020: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(3,14): Error RZ1036: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,2): Error RZ1018: Directive 'addTagHelper' must have a value.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,15): Error RZ1020: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,15): Error RZ1036: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(5,15): Error RZ1000: Unterminated string literal. Strings that start with a quotation mark (") must be terminated before the end of the line. However, strings that start with @ and a quotation mark (@") can span multiple lines.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(5,15): Error RZ1020: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(5,15): Error RZ1036: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(7,2): Error RZ1018: Directive 'removeTagHelper' must have a value.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(7,17): Error RZ1020: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(7,17): Error RZ1036: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(8,2): Error RZ1018: Directive 'removeTagHelper' must have a value.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(8,18): Error RZ1020: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(8,18): Error RZ1036: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(9,18): Error RZ1000: Unterminated string literal. Strings that start with a quotation mark (") must be terminated before the end of the line. However, strings that start with @ and a quotation mark (@") can span multiple lines.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(9,18): Error RZ1020: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(9,18): Error RZ1036: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName".
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(11,2): Error RZ1018: Directive 'tagHelperPrefix' must have a value.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(12,2): Error RZ1018: Directive 'tagHelperPrefix' must have a value.
TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(12,1): Error RZ2001: The 'tagHelperPrefix' directive may only occur once per document.

Просмотреть файл

@ -5,6 +5,6 @@ Directive block - Gen<None> - 18 - (0:0,0)
CSharpTokenType.Identifier;[addTagHelper];
Markup span - Gen<None> - [ ] - SpanEditHandler;Accepts:None - (13:0,13) - Tokens:1
CSharpTokenType.WhiteSpace;[ ];
Code span - Gen<AddTagHelper:{Foo";Foo";;} [RZ1000(17:0,17 [1] ), RZ1019(14:0,14 [4] ), RZ1020(14:0,14 [4] )]> - [Foo"] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:2
Code span - Gen<AddTagHelper:{Foo";Foo";;} [RZ1000(17:0,17 [1] ), RZ1019(14:0,14 [4] ), RZ1036(14:0,14 [4] )]> - [Foo"] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:2
CSharpTokenType.Identifier;[Foo];
CSharpTokenType.StringLiteral;["];RZ1000(17:0,17 [1] )

Просмотреть файл

@ -5,5 +5,5 @@ Directive block - Gen<None> - 17 - (0:0,0)
CSharpTokenType.Identifier;[addTagHelper];
Markup span - Gen<None> - [ ] - SpanEditHandler;Accepts:None - (13:0,13) - Tokens:1
CSharpTokenType.WhiteSpace;[ ];
Code span - Gen<AddTagHelper:{Foo;Foo;;} [RZ1020(14:0,14 [3] )]> - [Foo] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1
Code span - Gen<AddTagHelper:{Foo;Foo;;} [RZ1036(14:0,14 [3] )]> - [Foo] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1
CSharpTokenType.Identifier;[Foo];

Просмотреть файл

@ -5,5 +5,5 @@ Directive block - Gen<None> - 16 - (0:0,0)
CSharpTokenType.Identifier;[addTagHelper];
Markup span - Gen<None> - [ ] - SpanEditHandler;Accepts:None - (13:0,13) - Tokens:1
CSharpTokenType.WhiteSpace;[ ];
Code span - Gen<AddTagHelper:{"";;;} [RZ1020(15:0,15 [1] )]> - [""] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1
Code span - Gen<AddTagHelper:{"";;;} [RZ1036(15:0,15 [1] )]> - [""] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1
CSharpTokenType.StringLiteral;[""];

Просмотреть файл

@ -5,5 +5,5 @@ Directive block - Gen<None> - 14 - (0:0,0)
CSharpTokenType.Identifier;[addTagHelper];
Markup span - Gen<None> - [ ] - SpanEditHandler;Accepts:None - (13:0,13) - Tokens:1
CSharpTokenType.WhiteSpace;[ ];
Code span - Gen<AddTagHelper:{;;;} [RZ1018(1:0,1 [12] ), RZ1020(14:0,14 [1] )]> - [] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1
Code span - Gen<AddTagHelper:{;;;} [RZ1018(1:0,1 [12] ), RZ1036(14:0,14 [1] )]> - [] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1
CSharpTokenType.Unknown;[];

Просмотреть файл

@ -5,5 +5,5 @@ Directive block - Gen<None> - 22 - (0:0,0)
CSharpTokenType.Identifier;[addTagHelper];
Markup span - Gen<None> - [ ] - SpanEditHandler;Accepts:None - (13:0,13) - Tokens:1
CSharpTokenType.WhiteSpace;[ ];
Code span - Gen<AddTagHelper:{'*, Foo';'*, Foo';;} [RZ1020(14:0,14 [8] )]> - ['*, Foo'] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1
Code span - Gen<AddTagHelper:{'*, Foo';'*, Foo';;} [RZ1036(14:0,14 [8] )]> - ['*, Foo'] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1
CSharpTokenType.CharacterLiteral;['*, Foo'];

Просмотреть файл

@ -5,5 +5,5 @@ Directive block - Gen<None> - 18 - (0:0,0)
CSharpTokenType.Identifier;[addTagHelper];
Markup span - Gen<None> - [ ] - SpanEditHandler;Accepts:None - (13:0,13) - Tokens:1
CSharpTokenType.WhiteSpace;[ ];
Code span - Gen<AddTagHelper:{"Foo;"Foo;;} [RZ1000(14:0,14 [1] ), RZ1019(14:0,14 [4] ), RZ1020(14:0,14 [4] )]> - ["Foo] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1
Code span - Gen<AddTagHelper:{"Foo;"Foo;;} [RZ1000(14:0,14 [1] ), RZ1019(14:0,14 [4] ), RZ1036(14:0,14 [4] )]> - ["Foo] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1
CSharpTokenType.StringLiteral;["Foo];RZ1000(14:0,14 [1] )

Просмотреть файл

@ -5,5 +5,5 @@ Directive block - Gen<None> - 19 - (0:0,0)
CSharpTokenType.Identifier;[addTagHelper];
Markup span - Gen<None> - [ ] - SpanEditHandler;Accepts:None - (13:0,13) - Tokens:1
CSharpTokenType.WhiteSpace;[ ];
Code span - Gen<AddTagHelper:{"Foo";Foo;;} [RZ1020(15:0,15 [3] )]> - ["Foo"] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1
Code span - Gen<AddTagHelper:{"Foo";Foo;;} [RZ1036(15:0,15 [3] )]> - ["Foo"] - SpanEditHandler;Accepts:AnyExceptNewline - (14:0,14) - Tokens:1
CSharpTokenType.StringLiteral;["Foo"];

Просмотреть файл

@ -5,6 +5,6 @@ Directive block - Gen<None> - 21 - (0:0,0)
CSharpTokenType.Identifier;[removeTagHelper];
Markup span - Gen<None> - [ ] - SpanEditHandler;Accepts:None - (16:0,16) - Tokens:1
CSharpTokenType.WhiteSpace;[ ];
Code span - Gen<RemoveTagHelper:{Foo";Foo";;} [RZ1000(20:0,20 [1] ), RZ1019(17:0,17 [4] ), RZ1020(17:0,17 [4] )]> - [Foo"] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:2
Code span - Gen<RemoveTagHelper:{Foo";Foo";;} [RZ1000(20:0,20 [1] ), RZ1019(17:0,17 [4] ), RZ1036(17:0,17 [4] )]> - [Foo"] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:2
CSharpTokenType.Identifier;[Foo];
CSharpTokenType.StringLiteral;["];RZ1000(20:0,20 [1] )

Просмотреть файл

@ -5,5 +5,5 @@ Directive block - Gen<None> - 20 - (0:0,0)
CSharpTokenType.Identifier;[removeTagHelper];
Markup span - Gen<None> - [ ] - SpanEditHandler;Accepts:None - (16:0,16) - Tokens:1
CSharpTokenType.WhiteSpace;[ ];
Code span - Gen<RemoveTagHelper:{Foo;Foo;;} [RZ1020(17:0,17 [3] )]> - [Foo] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1
Code span - Gen<RemoveTagHelper:{Foo;Foo;;} [RZ1036(17:0,17 [3] )]> - [Foo] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1
CSharpTokenType.Identifier;[Foo];

Просмотреть файл

@ -5,5 +5,5 @@ Directive block - Gen<None> - 19 - (0:0,0)
CSharpTokenType.Identifier;[removeTagHelper];
Markup span - Gen<None> - [ ] - SpanEditHandler;Accepts:None - (16:0,16) - Tokens:1
CSharpTokenType.WhiteSpace;[ ];
Code span - Gen<RemoveTagHelper:{"";;;} [RZ1020(18:0,18 [1] )]> - [""] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1
Code span - Gen<RemoveTagHelper:{"";;;} [RZ1036(18:0,18 [1] )]> - [""] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1
CSharpTokenType.StringLiteral;[""];

Просмотреть файл

@ -5,5 +5,5 @@ Directive block - Gen<None> - 17 - (0:0,0)
CSharpTokenType.Identifier;[removeTagHelper];
Markup span - Gen<None> - [ ] - SpanEditHandler;Accepts:None - (16:0,16) - Tokens:1
CSharpTokenType.WhiteSpace;[ ];
Code span - Gen<RemoveTagHelper:{;;;} [RZ1018(1:0,1 [15] ), RZ1020(17:0,17 [1] )]> - [] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1
Code span - Gen<RemoveTagHelper:{;;;} [RZ1018(1:0,1 [15] ), RZ1036(17:0,17 [1] )]> - [] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1
CSharpTokenType.Unknown;[];

Просмотреть файл

@ -5,5 +5,5 @@ Directive block - Gen<None> - 25 - (0:0,0)
CSharpTokenType.Identifier;[removeTagHelper];
Markup span - Gen<None> - [ ] - SpanEditHandler;Accepts:None - (16:0,16) - Tokens:1
CSharpTokenType.WhiteSpace;[ ];
Code span - Gen<RemoveTagHelper:{'*, Foo';'*, Foo';;} [RZ1020(17:0,17 [8] )]> - ['*, Foo'] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1
Code span - Gen<RemoveTagHelper:{'*, Foo';'*, Foo';;} [RZ1036(17:0,17 [8] )]> - ['*, Foo'] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1
CSharpTokenType.CharacterLiteral;['*, Foo'];

Просмотреть файл

@ -5,5 +5,5 @@ Directive block - Gen<None> - 21 - (0:0,0)
CSharpTokenType.Identifier;[removeTagHelper];
Markup span - Gen<None> - [ ] - SpanEditHandler;Accepts:None - (16:0,16) - Tokens:1
CSharpTokenType.WhiteSpace;[ ];
Code span - Gen<RemoveTagHelper:{"Foo;"Foo;;} [RZ1000(17:0,17 [1] ), RZ1019(17:0,17 [4] ), RZ1020(17:0,17 [4] )]> - ["Foo] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1
Code span - Gen<RemoveTagHelper:{"Foo;"Foo;;} [RZ1000(17:0,17 [1] ), RZ1019(17:0,17 [4] ), RZ1036(17:0,17 [4] )]> - ["Foo] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1
CSharpTokenType.StringLiteral;["Foo];RZ1000(17:0,17 [1] )

Просмотреть файл

@ -5,5 +5,5 @@ Directive block - Gen<None> - 22 - (0:0,0)
CSharpTokenType.Identifier;[removeTagHelper];
Markup span - Gen<None> - [ ] - SpanEditHandler;Accepts:None - (16:0,16) - Tokens:1
CSharpTokenType.WhiteSpace;[ ];
Code span - Gen<RemoveTagHelper:{"Foo";Foo;;} [RZ1020(18:0,18 [3] )]> - ["Foo"] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1
Code span - Gen<RemoveTagHelper:{"Foo";Foo;;} [RZ1036(18:0,18 [3] )]> - ["Foo"] - SpanEditHandler;Accepts:AnyExceptNewline - (17:0,17) - Tokens:1
CSharpTokenType.StringLiteral;["Foo"];