Skip to content

Commit c6dbc0b

Browse files
authored
Merge pull request #1608 from LemonAppDev/KON-700-Allow-Layer-consecutive-dots-in-middle-of-package-name
KON-700 Allow Layer Consecutive Dots In Middle Of Package Name
2 parents 13f2763 + e4b1c32 commit c6dbc0b

File tree

2 files changed

+0
-18
lines changed
  • lib/src
    • main/kotlin/com/lemonappdev/konsist/api/architecture
    • test/kotlin/com/lemonappdev/konsist/api/architecture

2 files changed

+0
-18
lines changed

lib/src/main/kotlin/com/lemonappdev/konsist/api/architecture/Layer.kt

-8
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,6 @@ data class Layer(
8787
)
8888
}
8989

90-
// Check for consecutive dots in middle (excluding the start and end ..)
91-
if (effectivePackage.contains("..")) {
92-
throw IllegalArgumentException(
93-
"Invalid package definition for layer '$name'. " +
94-
"Package can only end with '..'. Current definition: $rootPackage",
95-
)
96-
}
97-
9890
// Split and validate segments
9991
val segments =
10092
effectivePackage

lib/src/test/kotlin/com/lemonappdev/konsist/api/architecture/LayerTest.kt

-10
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,6 @@ class LayerTest {
9090
"com.example\$#.."
9191
}
9292

93-
@Test
94-
fun `create Layer with consecutive dots in middle should throw exception`() {
95-
// when
96-
val func = { Layer(name = "name", rootPackage = "com..example..") }
97-
98-
// then
99-
func shouldThrow IllegalArgumentException::class withMessage
100-
"Invalid package definition for layer 'name'. Package can only end with '..'. Current definition: com..example.."
101-
}
102-
10393
@Test
10494
fun `create Layer with package starting with two dots should not throw exception`() {
10595
// when

0 commit comments

Comments
 (0)