From c855d00659feaad2d558517a9699c79742f3827d Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Sun, 8 Sep 2024 22:52:41 +0200 Subject: [PATCH] Do not do architecture tests for test classes --- .../java/org/jabref/architecture/MainArchitectureTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/jabref/architecture/MainArchitectureTest.java b/src/test/java/org/jabref/architecture/MainArchitectureTest.java index d9f29798d92..6bfb5ae791d 100644 --- a/src/test/java/org/jabref/architecture/MainArchitectureTest.java +++ b/src/test/java/org/jabref/architecture/MainArchitectureTest.java @@ -5,6 +5,7 @@ import org.jabref.logic.importer.fileformat.ImporterTestEngine; import com.tngtech.archunit.core.domain.JavaClasses; +import com.tngtech.archunit.core.importer.ImportOption; import com.tngtech.archunit.junit.AnalyzeClasses; import com.tngtech.archunit.junit.ArchTest; import com.tngtech.archunit.library.GeneralCodingRules; @@ -13,9 +14,11 @@ import static com.tngtech.archunit.library.Architectures.layeredArchitecture; /** - * This class checks JabRef's shipped classes for architecture quality + * This class checks JabRef's shipped classes for architecture quality. + * + * Does not analyze test classes. Hint from StackOverflow */ -@AnalyzeClasses(packages = "org.jabref") +@AnalyzeClasses(packages = "org.jabref", importOptions = ImportOption.DoNotIncludeTests.class) class MainArchitectureTest { public static final String CLASS_ORG_JABREF_GLOBALS = "org.jabref.gui.Globals";