Skip to content

Conversation

@wakingrufus
Copy link

@wakingrufus wakingrufus commented Jan 19, 2026

there is not a good way to craft such a condition with current Public APIs

the use case I want this for is:

noClasses()
.should(
  haveAnyDependenciesThat(
    not(resideInSamePackage())
      .and(dependencyTarget(annotatedWith(Deprecated.class)))
    )
  )

where resideInSamePackage() is a DescribedPredicate which requires comparing the target and the owner in the same condition

Signed-off-by: John Burns <wakingrufus@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant