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 is not raised when declaring types in a file-scoped namespace

Arthri opened this issue · comments

Product and Version Used: Roslynator.Analyzers version 4.7.0

Steps to Reproduce:
Have the following declarations and statements

namespace Z;

public class X {}

public class Y {}

Actual Behavior:
RCS1060 "declare each type in a separate file" is not raised

Expected Behavior:
RCS1060 is raised.

Furthermore, declaring them in the global namespace does raise RCS1060,

public class X {}

public class Y {}

and declaring them in a block-scope namespace also raises RCS1060

namespace Z
{
    public class X {}

    public class Y {}
}

Apologies for the duplicate issue. This is fixed on 4.12.3