Skip to content

Commit b73e5dd

Browse files
authored
Fix resources (#23438)
1 parent 27f8d6f commit b73e5dd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst/MakeConstAnalyzer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ private void AnalyzeNode(SyntaxNodeAnalysisContext context)
118118
}
119119

120120
// <SnippetReportDiagnostic>
121-
context.ReportDiagnostic(Diagnostic.Create(Rule, context.Node.GetLocation()));
121+
context.ReportDiagnostic(Diagnostic.Create(Rule, context.Node.GetLocation(), localDeclaration.Declaration.Variables.First().Identifier.ValueText));
122122
// </SnippetReportDiagnostic>
123123
}
124124
}

docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst/Resources.resx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,15 @@
118118
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120120
<data name="AnalyzerDescription" xml:space="preserve">
121-
<value>Make Constant.</value>
121+
<value>Variables that are not modified should be made constants.</value>
122122
<comment>An optional longer localizable description of the diagnostic.</comment>
123123
</data>
124124
<data name="AnalyzerMessageFormat" xml:space="preserve">
125-
<value>can be made constant</value>
125+
<value>Variable '{0}' can be made constant</value>
126126
<comment>The format-able message the diagnostic displays.</comment>
127127
</data>
128128
<data name="AnalyzerTitle" xml:space="preserve">
129-
<value>Variable can be made constant.</value>
129+
<value>Variable can be made constant</value>
130130
<comment>The title of the diagnostic.</comment>
131131
</data>
132132
</root>

0 commit comments

Comments
 (0)