dotnet / roslynator

Roslynator is a set of code analysis tools for C#, powered by Roslyn.

Home Page:https://josefpihrt.github.io/docs/roslynator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RCS1060 doesn't work with file-scoped namespaces

amaltinsky opened this issue · comments

Product and Version Used:

Roslynator.Analyzers 4.10.0
Roslynator.Formatting.Analyzers 4.10.0
Roslynator.CodeAnalysis.Analyzers 4.10.0

The following code correctly produces an RCS1060 warning:

namespace TriggersRCS1060
{
    public class Class1
    {

    }

    public class Class2
    {

    }
}

However, this doesn't:

namespace ShouldTriggerRCS1060;

public class Class1
{

}

public class Class2
{

}

@josefpihrt Thank you for the quick fix. Much appreciated.

@amaltinsky You are welcome.