TNG / ArchUnit

A Java architecture test library, to specify and assert architecture rules in plain Java
http://archunit.org
Apache License 2.0
3.13k stars 284 forks source link

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

Closed codecholeric closed 3 months ago

codecholeric commented 3 months ago

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.