Hi,
When I have a local function with an if/else branch an redundant empty line is inserted after it when the document is formatted (see MyMethod2 in code below and attached screenshot).
This results in Stylecop errors.
C#public class Program
{
public static void Main(string[] args)
{
}
public void MyMethod1()
{
MyInnerMethod();
void MyInnerMethod()
{
}
}
public void MyMethod2()
{
MyInnerMethod();
void MyInnerMethod()
{
if (true)
{
// do something
}
else
{
// do something else
}
}
}
}
Hi,
Thank you for pointing out the problem. I have reproduced this issue locally. We will fix it in our future builds.