From 09d647f7643dc09b5a32d497e24c3dcc90781c33 Mon Sep 17 00:00:00 2001 From: Chris Sienkiewicz Date: Wed, 23 Oct 2024 16:18:32 -0700 Subject: [PATCH 1/2] Update resource string --- .../src/Language/Resources.resx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Resources.resx b/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Resources.resx index d5fd1303f00..b15be70ec3e 100644 --- a/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Resources.resx +++ b/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/Resources.resx @@ -195,7 +195,7 @@ The '{0}' directive expects a type name. - The '{0}` directive must appear at the start of the line. + The '{0}' directive must appear at the start of the line. The '{0}' directives value(s) must be separated by whitespace. @@ -601,4 +601,4 @@ Adds the C# using directive to the generated view. - + \ No newline at end of file From 49c8ee8bcbb2786f8e1fef4575ce06d95f5d98cd Mon Sep 17 00:00:00 2001 From: Chris Sienkiewicz Date: Wed, 23 Oct 2024 16:59:42 -0700 Subject: [PATCH 2/2] Update baselines --- .../ParserDoesNotOutputErrorOtherNestedDirectives.diag.txt | 2 +- .../ParserOutputsErrorOnMultipleNestedSections.diag.txt | 4 ++-- .../ParserOutputsErrorOnNestedSections.diag.txt | 2 +- ...espacePreceedingToCodeIfThereIsNoMarkupOnThatLine.diag.txt | 2 +- .../ExtensibleDirectiveErrorsIfNotAtStartOfLine.diag.txt | 2 +- .../ParserDoesNotOutputErrorOtherNestedDirectives.diag.txt | 2 +- .../ParserOutputsErrorOnMultipleNestedSections.diag.txt | 4 ++-- .../ParserOutputsErrorOnNestedSections.diag.txt | 2 +- ...espacePreceedingToCodeIfThereIsNoMarkupOnThatLine.diag.txt | 2 +- .../ExtensibleDirectiveErrorsIfNotAtStartOfLine.diag.txt | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/CSharpSectionTest/ParserDoesNotOutputErrorOtherNestedDirectives.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/CSharpSectionTest/ParserDoesNotOutputErrorOtherNestedDirectives.diag.txt index 645bc7b72b8..666933aab24 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/CSharpSectionTest/ParserDoesNotOutputErrorOtherNestedDirectives.diag.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/CSharpSectionTest/ParserDoesNotOutputErrorOtherNestedDirectives.diag.txt @@ -1,2 +1,2 @@ -(1,17): Error RZ2005: The 'inherits` directive must appear at the start of the line. +(1,17): Error RZ2005: The 'inherits' directive must appear at the start of the line. (1,30): Error RZ1017: Unexpected literal following the 'inherits' directive. Expected 'line break'. diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnMultipleNestedSections.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnMultipleNestedSections.diag.txt index 996ed9560de..96aa714dc86 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnMultipleNestedSections.diag.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnMultipleNestedSections.diag.txt @@ -1,4 +1,4 @@ (1,16): Error RZ2002: Section blocks ("@section Header { ... }") cannot be nested. Only one level of section blocks are allowed. -(1,17): Error RZ2005: The 'section` directive must appear at the start of the line. +(1,17): Error RZ2005: The 'section' directive must appear at the start of the line. (1,42): Error RZ2002: Section blocks ("@section Header { ... }") cannot be nested. Only one level of section blocks are allowed. -(1,43): Error RZ2005: The 'section` directive must appear at the start of the line. +(1,43): Error RZ2005: The 'section' directive must appear at the start of the line. diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnNestedSections.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnNestedSections.diag.txt index 07c339447c3..10f25a65085 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnNestedSections.diag.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnNestedSections.diag.txt @@ -1,2 +1,2 @@ (1,16): Error RZ2002: Section blocks ("@section Header { ... }") cannot be nested. Only one level of section blocks are allowed. -(1,17): Error RZ2005: The 'section` directive must appear at the start of the line. +(1,17): Error RZ2005: The 'section' directive must appear at the start of the line. diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionContextGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionContextGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.diag.txt index 2c9c28677da..9a067c58a33 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionContextGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.diag.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionContextGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.diag.txt @@ -1 +1 @@ -(1,4): Error RZ2005: The 'section` directive must appear at the start of the line. +(1,4): Error RZ2005: The 'section' directive must appear at the start of the line. diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveErrorsIfNotAtStartOfLine.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveErrorsIfNotAtStartOfLine.diag.txt index ed92b44118b..86f474f4693 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveErrorsIfNotAtStartOfLine.diag.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/legacyTest/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveErrorsIfNotAtStartOfLine.diag.txt @@ -1 +1 @@ -(1,5): Error RZ2005: The 'custom` directive must appear at the start of the line. +(1,5): Error RZ2005: The 'custom' directive must appear at the start of the line. diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserDoesNotOutputErrorOtherNestedDirectives.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserDoesNotOutputErrorOtherNestedDirectives.diag.txt index 645bc7b72b8..666933aab24 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserDoesNotOutputErrorOtherNestedDirectives.diag.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserDoesNotOutputErrorOtherNestedDirectives.diag.txt @@ -1,2 +1,2 @@ -(1,17): Error RZ2005: The 'inherits` directive must appear at the start of the line. +(1,17): Error RZ2005: The 'inherits' directive must appear at the start of the line. (1,30): Error RZ1017: Unexpected literal following the 'inherits' directive. Expected 'line break'. diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnMultipleNestedSections.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnMultipleNestedSections.diag.txt index 996ed9560de..96aa714dc86 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnMultipleNestedSections.diag.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnMultipleNestedSections.diag.txt @@ -1,4 +1,4 @@ (1,16): Error RZ2002: Section blocks ("@section Header { ... }") cannot be nested. Only one level of section blocks are allowed. -(1,17): Error RZ2005: The 'section` directive must appear at the start of the line. +(1,17): Error RZ2005: The 'section' directive must appear at the start of the line. (1,42): Error RZ2002: Section blocks ("@section Header { ... }") cannot be nested. Only one level of section blocks are allowed. -(1,43): Error RZ2005: The 'section` directive must appear at the start of the line. +(1,43): Error RZ2005: The 'section' directive must appear at the start of the line. diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnNestedSections.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnNestedSections.diag.txt index 07c339447c3..10f25a65085 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnNestedSections.diag.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/CSharpSectionTest/ParserOutputsErrorOnNestedSections.diag.txt @@ -1,2 +1,2 @@ (1,16): Error RZ2002: Section blocks ("@section Header { ... }") cannot be nested. Only one level of section blocks are allowed. -(1,17): Error RZ2005: The 'section` directive must appear at the start of the line. +(1,17): Error RZ2005: The 'section' directive must appear at the start of the line. diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionContextGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionContextGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.diag.txt index 2c9c28677da..9a067c58a33 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionContextGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.diag.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/HtmlToCodeSwitchTest/SectionContextGivesWhitespacePreceedingToCodeIfThereIsNoMarkupOnThatLine.diag.txt @@ -1 +1 @@ -(1,4): Error RZ2005: The 'section` directive must appear at the start of the line. +(1,4): Error RZ2005: The 'section' directive must appear at the start of the line. diff --git a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveErrorsIfNotAtStartOfLine.diag.txt b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveErrorsIfNotAtStartOfLine.diag.txt index ed92b44118b..86f474f4693 100644 --- a/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveErrorsIfNotAtStartOfLine.diag.txt +++ b/src/Compiler/Microsoft.AspNetCore.Razor.Language/test/TestFiles/ParserTests/RazorDirectivesTest/ExtensibleDirectiveErrorsIfNotAtStartOfLine.diag.txt @@ -1 +1 @@ -(1,5): Error RZ2005: The 'custom` directive must appear at the start of the line. +(1,5): Error RZ2005: The 'custom' directive must appear at the start of the line.