The following code incorrectly causes S1854: remove this useless assignment to local variable ‘x’
private int Bar() => 1;
public (int,int) Foo()
{
var x = Bar();
return (1, x);
}
This is with scanner version 8.3.0.14607
Hi @paulhickman,
We can confirm that a false positive is raised in this case (https://github.com/SonarSource/sonar-dotnet/issues/3094).
This was handled in the current sprint and will be fixed in the next version (8.4).
Thank you,
Costin
system
(system)
Closed
3
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.