Skip to content

Exclude self from violations of onlyAccessedBy(..) by default #3

@codecholeric

Description

@codecholeric

When checking

classes()...should().onlyBeAccessedBy()...

it would make sense to ignore violations by self access by default. Often usecases look like

classes().that().resideInAPackage("..bar..").should().onlyBeAccessedByAnyPackage("..foo..", "..bar..")

because otherwise a ton of violations of '..bar..' calling itself would be reported.
It seems to never make sense, to report self-accesses, so this should be excluded by default, making rules easier to specify.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions