New Rule T0035: Do not use var for this deconstruction
Opened this issue · 0 comments
pavel-mikula-sonarsource commented
Coding style:
var pattern o is { P: var p } can be used only where o can be null and p is used at least 3 times.
if(something is { P: var p} // Noncompliant, used only twice
&& p > 0
&& p < 100)
The null
requires SE knowledge. While we could implement it easily, it is probably too hard to plug ourselves into SE at the moment due to possible version mismatch.