mirror of
https://github.com/gotson/komga.git
synced 2025-01-07 03:07:16 +08:00
test: ignore aot test files in ArchUnit
This commit is contained in:
parent
f79113f264
commit
5a74244b58
@ -10,7 +10,7 @@ import com.tngtech.archunit.library.GeneralCodingRules.NO_CLASSES_SHOULD_USE_JAV
|
||||
import com.tngtech.archunit.library.GeneralCodingRules.NO_CLASSES_SHOULD_USE_JODATIME
|
||||
import org.gotson.komga.Application
|
||||
|
||||
@AnalyzeClasses(packagesOf = [Application::class], importOptions = [ImportOption.DoNotIncludeTests::class])
|
||||
@AnalyzeClasses(packagesOf = [Application::class], importOptions = [ImportOption.DoNotIncludeTests::class, DoNotIncludeAotTests::class])
|
||||
class CodingRulesTest {
|
||||
|
||||
@ArchTest
|
||||
|
@ -0,0 +1,10 @@
|
||||
package org.gotson.komga.architecture
|
||||
|
||||
import com.tngtech.archunit.core.importer.ImportOption
|
||||
import com.tngtech.archunit.core.importer.Location
|
||||
|
||||
class DoNotIncludeAotTests : ImportOption {
|
||||
override fun includes(location: Location): Boolean {
|
||||
return !location.contains("/aotTest")
|
||||
}
|
||||
}
|
@ -8,7 +8,7 @@ import com.tngtech.archunit.lang.syntax.ArchRuleDefinition.classes
|
||||
import com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses
|
||||
import org.gotson.komga.Application
|
||||
|
||||
@AnalyzeClasses(packagesOf = [Application::class], importOptions = [ImportOption.DoNotIncludeTests::class])
|
||||
@AnalyzeClasses(packagesOf = [Application::class], importOptions = [ImportOption.DoNotIncludeTests::class, DoNotIncludeAotTests::class])
|
||||
class DomainDrivenDesignRulesTest {
|
||||
|
||||
@ArchTest
|
||||
|
@ -10,7 +10,7 @@ import org.gotson.komga.Application
|
||||
import org.springframework.stereotype.Controller
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@AnalyzeClasses(packagesOf = [Application::class], importOptions = [ImportOption.DoNotIncludeTests::class])
|
||||
@AnalyzeClasses(packagesOf = [Application::class], importOptions = [ImportOption.DoNotIncludeTests::class, DoNotIncludeAotTests::class])
|
||||
class NamingConventionTest {
|
||||
|
||||
@ArchTest
|
||||
|
@ -7,7 +7,7 @@ import com.tngtech.archunit.lang.ArchRule
|
||||
import com.tngtech.archunit.library.dependencies.SlicesRuleDefinition.slices
|
||||
import org.gotson.komga.Application
|
||||
|
||||
@AnalyzeClasses(packagesOf = [Application::class], importOptions = [ImportOption.DoNotIncludeTests::class])
|
||||
@AnalyzeClasses(packagesOf = [Application::class], importOptions = [ImportOption.DoNotIncludeTests::class, DoNotIncludeAotTests::class])
|
||||
class SlicesIsolationRulesTest {
|
||||
@ArchTest
|
||||
val interfaces_should_only_use_their_own_slice: ArchRule =
|
||||
|
Loading…
Reference in New Issue
Block a user