Skip to content

DoNotDependOnAny() does verify inheritance #438

@Floopy-Doo

Description

@Floopy-Doo

With the update to version 0.13 we run into a problem that DoNotDependOnAny no longer checks on the inheritance of a class.

Our Test:

Classes()
    .That()
    .AreNotAbstract()
    .And()
    .DoNotHaveAnyAttributes(typeof(CompilerGeneratedAttribute)) // Excludes all blazor components
    .And()
    .DoNotDependOnAny(typeof(ComponentBase))
    .And()
    .DoNotHaveName(nameof(_Imports)) // Excludes all _Imports of blazor
    .Should()
    .BeSealed()
    .Check(OurArchitecture)

All classes inherit from component base are with the update no longer excluded from the test.

I did not see anything in the change notes that would indicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions