-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to exclude libraries and external classes from violations #841
Comments
By specifying The problem you're facing is that Anyway, to solve your problem at hand there are 2 ways:
We should maybe think about changing the behavior of |
Hey @codecholeric, thanks for the prompt solution! Your first suggestion worked well for me, using a more generic arg:
To your other points, the "scope" of the checks could prob be made clearer, but I can see why it is the way it is. However for I may want some test cases that focus on my own code (as highlighted in this issue), and others that check external dependencies, for which existing behavior will prob work well. |
Yes, this is similar to the |
When leveraging the layeredArchitectures rule set, I get violations due to Kotlin and JDK classes.
Using JUnit5, in a Kotlin only codebase, as follows:
Dependency:
com.tngtech.archunit:archunit-junit5:0.23.1
Here are the types of errors I get:
for test 1:
for test 2:
Excluding JARs or Archives results in the layers being empty so that didn't solve it either. I'm sure all other non-example usages of this lib leverage libraries so wondering how ppl get around this? Is this a Kotlin only issue somehow?
Thanks in advance :)
The text was updated successfully, but these errors were encountered: