Skip to content

Commit f9f2b13

Browse files
committed
Respond to comments.
1 parent ecc1a91 commit f9f2b13

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

VSDiagnostics/VSDiagnostics/VSDiagnostics/Diagnostics/General/ConditionIsConstant/ConditionIsConstant.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,16 @@ private void AnalyzeSymbol(SyntaxNodeAnalysisContext context)
4242
{
4343
context.ReportDiagnostic(Diagnostic.Create(Rule,
4444
ifStatement.Condition.GetLocation(),
45-
ImmutableDictionary.CreateRange(new[] { new KeyValuePair<string, string>("IsConditionTrue", "true") })));
45+
ImmutableDictionary.CreateRange(new[] { new KeyValuePair<string, string>("IsConditionTrue", "true") }),
46+
"true"));
4647
}
4748

4849
if (!(bool)constantValue.Value)
4950
{
5051
context.ReportDiagnostic(Diagnostic.Create(Rule,
5152
ifStatement.Condition.GetLocation(),
52-
ImmutableDictionary.CreateRange(new[] { new KeyValuePair<string, string>("IsConditionTrue", "false") })));
53+
ImmutableDictionary.CreateRange(new[] { new KeyValuePair<string, string>("IsConditionTrue", "false") }),
54+
"false"));
5355
}
5456
}
5557
}

VSDiagnostics/VSDiagnostics/VSDiagnostics/VSDiagnosticsResources.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

VSDiagnostics/VSDiagnostics/VSDiagnostics/VSDiagnosticsResources.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,13 +422,13 @@
422422
<value>Add Flags attribute</value>
423423
</data>
424424
<data name="ConditionIsConstantAnalyzerMessage" xml:space="preserve">
425-
<value>Condition is constant.</value>
425+
<value>Condition is always {0}.</value>
426426
</data>
427427
<data name="ConditionIsConstantAnalyzerTitle" xml:space="preserve">
428428
<value>Condition is constant.</value>
429429
</data>
430430
<data name="ConditionIsConstantCodeFixTitle" xml:space="preserve">
431-
<value>Remove condition and dead code.</value>
431+
<value>Remove condition and unreachable code.</value>
432432
</data>
433433
<data name="StringPlaceholdersInWrongOrderCodeFixTitle" xml:space="preserve">
434434
<value>Re-order placeholders</value>

0 commit comments

Comments
 (0)