Fix S2178 Rule message: Mention extracting right operand if applicable #8559
Labels
Area: C#
C# rules related issues.
Area: VB.NET
VB.NET rules related issues.
Sprint: Hardening
Fix FPs/FNs/improvements
Milestone
S2178's message as defined in RSPEC:
Correct this "x" to "xx" [and extract the right operand to a variable if it should always be evaluated].
Our analyzer does not implement the optional part. This can lead developers into a trap, changing the behavior of their code without noticing.
Our analyzer should detect if the right operand is constant or a pure method, and if it is not, use the extended message.
The text was updated successfully, but these errors were encountered: