Adam_Dove
(Adam Dove)
1
- SonarAnalyzer (C#)
- csharpsquid:S1481
- According to documentation for (Unused local variables should be removed)-
using(var t = new TestTimer()) // t never used, but compliant.
{
//...
}
BUT when using c# 8 syntax without curly braces -
using var t = new TestTimer()
//...
the rule is triggered
Hi @Adam_Dove,
Thank you for reporting this case. We can confirm this as False Positive. We already have this issue to track it.
system
(system)
Closed
3
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.