From 18ce7f07ac78377b2674ad4a2714f0315d6fb381 Mon Sep 17 00:00:00 2001 From: Ajay Bhargav Baaskaran Date: Fri, 15 Dec 2017 17:27:10 -0800 Subject: [PATCH] Moved CSharpTokenizer errors out of legacy diagnostic --- .../Legacy/CSharpTokenizer.cs | 20 +++++-------- .../RazorDiagnosticFactory.cs | 28 ++++++++++++++--- .../DefaultRazorTagHelperBinderPhaseTest.cs | 21 ++++--------- .../Legacy/CSharpBlockTest.cs | 6 ++-- .../Legacy/CSharpDirectivesTest.cs | 30 ++++++++----------- .../Legacy/CSharpErrorTest.cs | 24 +++++---------- .../Legacy/TagHelperBlockRewriterTest.cs | 5 ++-- ...pleteDirectives_DesignTime.diagnostics.txt | 6 ++-- ...completeDirectives_Runtime.diagnostics.txt | 6 ++-- .../ParserError_DesignTime.diagnostics.txt | 2 +- .../ParserError_Runtime.diagnostics.txt | 2 +- 11 files changed, 69 insertions(+), 81 deletions(-) diff --git a/src/Microsoft.AspNetCore.Razor.Language/Legacy/CSharpTokenizer.cs b/src/Microsoft.AspNetCore.Razor.Language/Legacy/CSharpTokenizer.cs index 0b7816f2f6..a1943070f3 100644 --- a/src/Microsoft.AspNetCore.Razor.Language/Legacy/CSharpTokenizer.cs +++ b/src/Microsoft.AspNetCore.Razor.Language/Legacy/CSharpTokenizer.cs @@ -547,11 +547,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy else if (EndOfFile) { CurrentErrors.Add( - RazorDiagnostic.Create( - new RazorError( - LegacyResources.ParseError_Unterminated_String_Literal, - CurrentStart, - length: 1 /* end of file */))); + RazorDiagnosticFactory.CreateParsing_UnterminatedStringLiteral( + new SourceSpan(CurrentStart, contentLength: 1 /* end of file */))); } return Transition(CSharpTokenizerState.Data, EndSymbol(CSharpSymbolType.StringLiteral)); } @@ -577,10 +574,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy else if (EndOfFile || ParserHelpers.IsNewLine(CurrentCharacter)) { CurrentErrors.Add( - RazorDiagnostic.Create(new RazorError( - LegacyResources.ParseError_Unterminated_String_Literal, - CurrentStart, - length: 1 /* " */))); + RazorDiagnosticFactory.CreateParsing_UnterminatedStringLiteral( + new SourceSpan(CurrentStart, contentLength: 1 /* " */))); } else { @@ -596,10 +591,9 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy if (EndOfFile) { CurrentErrors.Add( - RazorDiagnostic.Create(new RazorError( - LegacyResources.ParseError_BlockComment_Not_Terminated, - CurrentStart, - length: 1 /* end of file */))); + RazorDiagnosticFactory.CreateParsing_BlockCommentNotTerminated( + new SourceSpan(CurrentStart, contentLength: 1 /* end of file */))); + return Transition(CSharpTokenizerState.Data, EndSymbol(CSharpSymbolType.Comment)); } if (CurrentCharacter == '*') diff --git a/src/Microsoft.AspNetCore.Razor.Language/RazorDiagnosticFactory.cs b/src/Microsoft.AspNetCore.Razor.Language/RazorDiagnosticFactory.cs index b291e23377..b3ff262373 100644 --- a/src/Microsoft.AspNetCore.Razor.Language/RazorDiagnosticFactory.cs +++ b/src/Microsoft.AspNetCore.Razor.Language/RazorDiagnosticFactory.cs @@ -14,10 +14,10 @@ namespace Microsoft.AspNetCore.Razor.Language // General Errors ID Offset = 0 internal static readonly RazorDiagnosticDescriptor Directive_BlockDirectiveCannotBeImported = - new RazorDiagnosticDescriptor( - $"{DiagnosticPrefix}0000", - () => Resources.BlockDirectiveCannotBeImported, - RazorDiagnosticSeverity.Error); + new RazorDiagnosticDescriptor( + $"{DiagnosticPrefix}0000", + () => Resources.BlockDirectiveCannotBeImported, + RazorDiagnosticSeverity.Error); public static RazorDiagnostic CreateDirective_BlockDirectiveCannotBeImported(string directive) { return RazorDiagnostic.Create(Directive_BlockDirectiveCannotBeImported, SourceSpan.Undefined, directive); @@ -29,6 +29,26 @@ namespace Microsoft.AspNetCore.Razor.Language // Language Errors ID Offset = 1000 + internal static readonly RazorDiagnosticDescriptor Parsing_UnterminatedStringLiteral = + new RazorDiagnosticDescriptor( + $"{DiagnosticPrefix}1000", + () => LegacyResources.ParseError_Unterminated_String_Literal, + RazorDiagnosticSeverity.Error); + public static RazorDiagnostic CreateParsing_UnterminatedStringLiteral(SourceSpan location) + { + return RazorDiagnostic.Create(Parsing_UnterminatedStringLiteral, location); + } + + internal static readonly RazorDiagnosticDescriptor Parsing_BlockCommentNotTerminated = + new RazorDiagnosticDescriptor( + $"{DiagnosticPrefix}1001", + () => LegacyResources.ParseError_BlockComment_Not_Terminated, + RazorDiagnosticSeverity.Error); + public static RazorDiagnostic CreateParsing_BlockCommentNotTerminated(SourceSpan location) + { + return RazorDiagnostic.Create(Parsing_BlockCommentNotTerminated, location); + } + #endregion #region Semantic Errors diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/DefaultRazorTagHelperBinderPhaseTest.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/DefaultRazorTagHelperBinderPhaseTest.cs index 968c12bde7..e4236e7743 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/DefaultRazorTagHelperBinderPhaseTest.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/DefaultRazorTagHelperBinderPhaseTest.cs @@ -27,11 +27,8 @@ namespace Microsoft.AspNetCore.Razor.Language }; var expectedDiagnostics = new[] { - RazorDiagnostic.Create( - new RazorError( - LegacyResources.ParseError_Unterminated_String_Literal, - new SourceLocation(14 + Environment.NewLine.Length, 1, 14), - length: 1)), + RazorDiagnosticFactory.CreateParsing_UnterminatedStringLiteral( + new SourceSpan(new SourceLocation(14 + Environment.NewLine.Length, 1, 14), contentLength: 1)), RazorDiagnostic.Create( new RazorError( Resources.FormatInvalidTagHelperLookupText("\""), @@ -72,11 +69,8 @@ namespace Microsoft.AspNetCore.Razor.Language }; var expectedDiagnostics = new[] { - RazorDiagnostic.Create( - new RazorError( - LegacyResources.ParseError_Unterminated_String_Literal, - new SourceLocation(17 + Environment.NewLine.Length, 1, 17), - length: 1)), + RazorDiagnosticFactory.CreateParsing_UnterminatedStringLiteral( + new SourceSpan(new SourceLocation(17 + Environment.NewLine.Length, 1, 17), contentLength: 1)), RazorDiagnostic.Create( new RazorError( Resources.FormatInvalidTagHelperLookupText("\""), @@ -117,11 +111,8 @@ namespace Microsoft.AspNetCore.Razor.Language }; var expectedDiagnostics = new[] { - RazorDiagnostic.Create( - new RazorError( - LegacyResources.ParseError_Unterminated_String_Literal, - new SourceLocation(17 + Environment.NewLine.Length, 1, 17), - length: 1)), + RazorDiagnosticFactory.CreateParsing_UnterminatedStringLiteral( + new SourceSpan(new SourceLocation(17 + Environment.NewLine.Length, 1, 17), contentLength: 1)), RazorDiagnostic.Create( new RazorError( Resources.FormatInvalidTagHelperPrefixValue("tagHelperPrefix", "\"", "\""), diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpBlockTest.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpBlockTest.cs index 352182184e..7a3ea59679 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpBlockTest.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpBlockTest.cs @@ -514,10 +514,8 @@ while(true);", BlockKindInternal.Statement, SpanKindInternal.Code, acceptedChara document, BlockKindInternal.Statement, SpanKindInternal.Code, - RazorDiagnostic.Create(new RazorError( - LegacyResources.ParseError_BlockComment_Not_Terminated, - new SourceLocation(24, 0, 24), - length: 1)), + RazorDiagnosticFactory.CreateParsing_BlockCommentNotTerminated( + new SourceSpan(new SourceLocation(24, 0, 24), contentLength: 1)), RazorDiagnostic.Create(new RazorError( LegacyResources.FormatParseError_Expected_EndOfBlock_Before_EOF("foreach", '}', '{'), SourceLocation.Zero, diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpDirectivesTest.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpDirectivesTest.cs index 0bbb88a40b..2b9c3dec9a 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpDirectivesTest.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpDirectivesTest.cs @@ -1093,9 +1093,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy // Arrange var expectedErrors = new[] { - RazorDiagnostic.Create(new RazorError( - LegacyResources.ParseError_Unterminated_String_Literal, - absoluteIndex: 17, lineIndex: 0, columnIndex: 17, length: 1)), + RazorDiagnosticFactory.CreateParsing_UnterminatedStringLiteral( + new SourceSpan(filePath: null, absoluteIndex: 17, lineIndex: 0, characterIndex: 17, length: 1)), RazorDiagnostic.Create(new RazorError( LegacyResources.FormatParseError_IncompleteQuotesAroundDirective(SyntaxConstants.CSharp.TagHelperPrefixKeyword), absoluteIndex: 17, lineIndex: 0, columnIndex: 17, length: 4)), @@ -1124,9 +1123,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy // Arrange var expectedErrors = new[] { - RazorDiagnostic.Create(new RazorError( - LegacyResources.ParseError_Unterminated_String_Literal, - absoluteIndex: 23, lineIndex: 0, columnIndex: 23, length: 1)), + RazorDiagnosticFactory.CreateParsing_UnterminatedStringLiteral( + new SourceSpan(filePath: null, absoluteIndex: 23, lineIndex: 0, characterIndex: 23, length: 1)), RazorDiagnostic.Create(new RazorError( LegacyResources.FormatParseError_IncompleteQuotesAroundDirective(SyntaxConstants.CSharp.TagHelperPrefixKeyword), absoluteIndex: 17, lineIndex: 0, columnIndex: 17, length: 7)), @@ -1308,9 +1306,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy // Arrange var expectedErrors = new[] { - RazorDiagnostic.Create(new RazorError( - LegacyResources.ParseError_Unterminated_String_Literal, - absoluteIndex: 17, lineIndex: 0, columnIndex: 17, length: 1)), + RazorDiagnosticFactory.CreateParsing_UnterminatedStringLiteral( + new SourceSpan(filePath: null, absoluteIndex: 17, lineIndex: 0, characterIndex: 17, length: 1)), RazorDiagnostic.Create(new RazorError( LegacyResources.FormatParseError_IncompleteQuotesAroundDirective(SyntaxConstants.CSharp.RemoveTagHelperKeyword), absoluteIndex: 17, lineIndex: 0, columnIndex: 17, length: 4)), @@ -1340,9 +1337,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy // Arrange var expectedErrors = new[] { - RazorDiagnostic.Create(new RazorError( - LegacyResources.ParseError_Unterminated_String_Literal, - absoluteIndex: 20, lineIndex: 0, columnIndex: 20, length: 1)), + RazorDiagnosticFactory.CreateParsing_UnterminatedStringLiteral( + new SourceSpan(new SourceLocation(absoluteIndex: 20, lineIndex: 0, characterIndex: 20), contentLength: 1)), RazorDiagnostic.Create(new RazorError( LegacyResources.FormatParseError_IncompleteQuotesAroundDirective(SyntaxConstants.CSharp.RemoveTagHelperKeyword), absoluteIndex: 17, lineIndex: 0, columnIndex: 17, length: 4)), @@ -1528,9 +1524,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy // Arrange var expectedErrors = new[] { - RazorDiagnostic.Create(new RazorError( - LegacyResources.ParseError_Unterminated_String_Literal, - absoluteIndex: 14, lineIndex: 0, columnIndex: 14, length: 1)), + RazorDiagnosticFactory.CreateParsing_UnterminatedStringLiteral( + new SourceSpan(filePath: null, absoluteIndex: 14, lineIndex: 0, characterIndex: 14, length: 1)), RazorDiagnostic.Create(new RazorError( LegacyResources.FormatParseError_IncompleteQuotesAroundDirective(SyntaxConstants.CSharp.AddTagHelperKeyword), absoluteIndex: 14, lineIndex: 0, columnIndex: 14, length: 4)), @@ -1560,9 +1555,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy // Arrange var expectedErrors = new[] { - RazorDiagnostic.Create(new RazorError( - LegacyResources.ParseError_Unterminated_String_Literal, - absoluteIndex: 17, lineIndex: 0, columnIndex: 17, length: 1)), + RazorDiagnosticFactory.CreateParsing_UnterminatedStringLiteral( + new SourceSpan(filePath: null, absoluteIndex: 17, lineIndex: 0, characterIndex: 17, length: 1)), RazorDiagnostic.Create(new RazorError( LegacyResources.FormatParseError_IncompleteQuotesAroundDirective(SyntaxConstants.CSharp.AddTagHelperKeyword), absoluteIndex: 14, lineIndex: 0, columnIndex: 14, length: 4)), diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpErrorTest.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpErrorTest.cs index b7ff9cc498..d6fb897c82 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpErrorTest.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpErrorTest.cs @@ -587,20 +587,16 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy + ";" + Environment.NewLine + "}", BlockKindInternal.Statement, SpanKindInternal.Code, - RazorDiagnostic.Create(new RazorError( - LegacyResources.ParseError_Unterminated_String_Literal, - new SourceLocation(21 + Environment.NewLine.Length, 1, 12), - length: 1))); + RazorDiagnosticFactory.CreateParsing_UnterminatedStringLiteral( + new SourceSpan(new SourceLocation(21 + Environment.NewLine.Length, 1, 12), contentLength: 1))); } [Fact] public void ParseBlockTerminatesNormalStringAtEndOfFile() { SingleSpanBlockTest("if(foo) { var foo = \"blah blah blah blah blah", BlockKindInternal.Statement, SpanKindInternal.Code, - RazorDiagnostic.Create(new RazorError( - LegacyResources.ParseError_Unterminated_String_Literal, - new SourceLocation(20, 0, 20), - length: 1)), + RazorDiagnosticFactory.CreateParsing_UnterminatedStringLiteral( + new SourceSpan(new SourceLocation(20, 0, 20), contentLength: 1)), RazorDiagnostic.Create(new RazorError( LegacyResources.FormatParseError_Expected_EndOfBlock_Before_EOF("if", '}', '{'), SourceLocation.Zero, @@ -616,10 +612,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy + "blah " + Environment.NewLine + "blah", BlockKindInternal.Statement, SpanKindInternal.Code, - RazorDiagnostic.Create(new RazorError( - LegacyResources.ParseError_Unterminated_String_Literal, - new SourceLocation(20, 0, 20), - length: 1)), + RazorDiagnosticFactory.CreateParsing_UnterminatedStringLiteral( + new SourceSpan(new SourceLocation(20, 0, 20), contentLength: 1)), RazorDiagnostic.Create(new RazorError( LegacyResources.FormatParseError_Expected_EndOfBlock_Before_EOF("if", '}', '{'), SourceLocation.Zero, @@ -647,10 +641,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy Factory.Markup(Environment.NewLine).Accepts(AcceptedCharactersInternal.None)), Factory.Code("}").AsStatement() ), - RazorDiagnostic.Create(new RazorError( - LegacyResources.ParseError_Unterminated_String_Literal, - new SourceLocation(23 + Environment.NewLine.Length, 1, 14), - length: 1))); + RazorDiagnosticFactory.CreateParsing_UnterminatedStringLiteral( + new SourceSpan(new SourceLocation(23 + Environment.NewLine.Length, 1, 14), contentLength: 1))); } [Fact] diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/TagHelperBlockRewriterTest.cs b/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/TagHelperBlockRewriterTest.cs index 67ef8fac0c..f0de083acf 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/TagHelperBlockRewriterTest.cs +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/TagHelperBlockRewriterTest.cs @@ -721,9 +721,8 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy RazorDiagnostic.Create(new RazorError( LegacyResources.FormatParseError_Expected_EndOfBlock_Before_EOF("do", "}", "{"), absoluteIndex: 11, lineIndex: 0, columnIndex: 11, length: 1)), - RazorDiagnostic.Create(new RazorError( - LegacyResources.ParseError_Unterminated_String_Literal, - absoluteIndex: 15, lineIndex: 0, columnIndex: 15, length: 1)) + RazorDiagnosticFactory.CreateParsing_UnterminatedStringLiteral( + new SourceSpan(filePath: null, absoluteIndex: 15, lineIndex: 0, characterIndex: 15, length: 1)) } }, { diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.diagnostics.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.diagnostics.txt index b9c22ace19..e418c499d1 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.diagnostics.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_DesignTime.diagnostics.txt @@ -2,18 +2,18 @@ TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cs TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(3,14): Error RZ9999: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,2): Error RZ9999: Directive 'addTagHelper' must have a value. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,15): Error RZ9999: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(5,15): Error RZ9999: 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 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 RZ9999: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(7,2): Error RZ9999: Directive 'removeTagHelper' must have a value. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(7,17): Error RZ9999: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(8,2): Error RZ9999: Directive 'removeTagHelper' must have a value. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(8,18): Error RZ9999: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(9,18): Error RZ9999: 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 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 RZ9999: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(11,2): Error RZ9999: Directive 'tagHelperPrefix' must have a value. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(12,2): Error RZ9999: Directive 'tagHelperPrefix' must have a value. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(12,1): Error RZ2001: The 'tagHelperPrefix' directive may only occur once per document. -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(13,18): Error RZ9999: 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(13,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(13,1): Error RZ2001: The 'tagHelperPrefix' directive may only occur once per document. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(13,18): Error RZ9999: Invalid tag helper directive 'tagHelperPrefix' value. '"' is not allowed in prefix '"'. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(15,10): Error RZ9999: The 'inherits' directive expects a type name. diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.diagnostics.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.diagnostics.txt index b9c22ace19..e418c499d1 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.diagnostics.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives_Runtime.diagnostics.txt @@ -2,18 +2,18 @@ TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cs TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(3,14): Error RZ9999: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,2): Error RZ9999: Directive 'addTagHelper' must have a value. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(4,15): Error RZ9999: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(5,15): Error RZ9999: 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 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 RZ9999: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(7,2): Error RZ9999: Directive 'removeTagHelper' must have a value. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(7,17): Error RZ9999: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(8,2): Error RZ9999: Directive 'removeTagHelper' must have a value. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(8,18): Error RZ9999: Invalid tag helper directive look up text ''. The correct look up text format is: "name, assemblyName". -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(9,18): Error RZ9999: 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 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 RZ9999: Invalid tag helper directive look up text '"'. The correct look up text format is: "name, assemblyName". TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(11,2): Error RZ9999: Directive 'tagHelperPrefix' must have a value. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(12,2): Error RZ9999: Directive 'tagHelperPrefix' must have a value. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(12,1): Error RZ2001: The 'tagHelperPrefix' directive may only occur once per document. -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(13,18): Error RZ9999: 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(13,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(13,1): Error RZ2001: The 'tagHelperPrefix' directive may only occur once per document. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(13,18): Error RZ9999: Invalid tag helper directive 'tagHelperPrefix' value. '"' is not allowed in prefix '"'. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/IncompleteDirectives.cshtml(15,10): Error RZ9999: The 'inherits' directive expects a type name. diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.diagnostics.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.diagnostics.txt index 2d6f4fb000..3c7606cc34 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.diagnostics.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_DesignTime.diagnostics.txt @@ -1,2 +1,2 @@ -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml(2,1): Error RZ9999: End of file was reached before the end of the block comment. All comments started with "/*" sequence must be terminated with a matching "*/" sequence. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml(2,1): Error RZ1001: End of file was reached before the end of the block comment. All comments started with "/*" sequence must be terminated with a matching "*/" sequence. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml(1,2): Error RZ9999: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup. diff --git a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.diagnostics.txt b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.diagnostics.txt index 2d6f4fb000..3c7606cc34 100644 --- a/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.diagnostics.txt +++ b/test/Microsoft.AspNetCore.Razor.Language.Test/TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError_Runtime.diagnostics.txt @@ -1,2 +1,2 @@ -TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml(2,1): Error RZ9999: End of file was reached before the end of the block comment. All comments started with "/*" sequence must be terminated with a matching "*/" sequence. +TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml(2,1): Error RZ1001: End of file was reached before the end of the block comment. All comments started with "/*" sequence must be terminated with a matching "*/" sequence. TestFiles/IntegrationTests/CodeGenerationIntegrationTest/ParserError.cshtml(1,2): Error RZ9999: The code block is missing a closing "}" character. Make sure you have a matching "}" character for all the "{" characters within this block, and that none of the "}" characters are being interpreted as markup.