Skip to content
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

fix @ArchIgnore not being fully respected by JUnit 4 support #1277

Conversation

codecholeric
Copy link
Collaborator

In the case of inheritance we were looking at the wrong class for an @ArchIgnore. I.e. rule declarations in base classes would only be ignored if the base class was annotated with @ArchIgnore, not the actual class. We now check the actual class for the annotation instead. If the base class is annotated with @ArchIgnore we ignore it for now, since this is a corner case and one could argue for both, either ignoring all subclasses or not ignoring subclasses.

@codecholeric codecholeric force-pushed the fix-junit-4-support-not-respecting-ArchIgnore-on-child-class branch 3 times, most recently from d312d8f to be3f3be Compare March 26, 2024 12:55
@codecholeric codecholeric requested a review from hankem April 7, 2024 21:07
In the case of inheritance we were looking at the wrong class for an `@ArchIgnore`.
I.e. rule declarations in base classes would only be ignored if the base class
was annotated with `@ArchIgnore`, not the actual class.
We now check the actual class for the annotation instead.
If the base class is annotated with `@ArchIgnore` we ignore it for now,
since this is a corner case and one could argue for both,
either ignoring all subclasses or not ignoring subclasses.

Signed-off-by: Peter Gafert <peter.gafert@archunit.org>
@codecholeric codecholeric force-pushed the fix-junit-4-support-not-respecting-ArchIgnore-on-child-class branch from fb2ce54 to ce6a69d Compare April 9, 2024 21:53
@codecholeric codecholeric merged commit e680f88 into main Apr 9, 2024
21 checks passed
@codecholeric codecholeric deleted the fix-junit-4-support-not-respecting-ArchIgnore-on-child-class branch April 9, 2024 22:17
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.

2 participants