Skip to content

The rule API should not only offer checks for accesses, but also for more generic dependencies in any way #69

Closed

Description

@codecholeric

The most typical violations of components / layers can be caught by using a rule like

noClasses().that()...should().accessClassesThat()...

However, there are different types of dependencies, that are not caught by this (annotations, declared fields that are never accessed, etc.). While it is possible to check for this with several rules, the rule API should offer an easy and extensive way to check for this. Proposal:

noClasses().that()...should().dependOnClassesThat()...

And likewise, it should be possible to check the other way around

classes().that()...should().onlyHaveDepedentClassesThat()...

I.e. the last rule checks that all classes depending on this class should satisfy some condition.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions