Skip to content

VisibleMembers should allow defining the surface of a subtree #10

Description

@realvizu

At the moment, with Allowed/VisibleMembers you can define the surface of only a single namespace. (The To namespace can not be a subtree.)
Eg.

    <Allowed From="Codartis.NsDepCop.Core.Factory" To="Codartis.NsDepCop.Core.Implementation.Analysis.NRefactory">
        <VisibleMembers>
            <Type Name="NRefactoryDependencyAnalyzer" />
        </VisibleMembers>
    </Allowed>

It should be allowed to define the surface of a subtree as well.
Eg.

    <Allowed From="Codartis.NsDepCop.Core.Factory" To="Codartis.NsDepCop.Core.Implementation.*">
        <VisibleMembers>
            <Type RelativeName="Analysis.ConfiguredAnalyzer" />
            <Type RelativeName="Analysis.IAnalyzerFactory" />
            <Type RelativeName="Analysis.NRefactory.NRefactoryDependencyAnalyzer" />
            <Type RelativeName="Analysis.Roslyn.RoslynDependencyAnalyzer" />
            <Type RelativeName="Config.XmlFileConfigProvider" />
        </VisibleMembers>
    </Allowed>

In this case the Type elements must describe not only the type name but also its relative namespace path.

The same should apply to VisibleMembers elements with the OfNamespace attribute.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions