From 7c0717f5e1e07ebbd2b432c0c8f78e7a7392f04f Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Wed, 20 Mar 2024 18:40:08 +0100 Subject: [PATCH] chore(model)!: Remove `findPathExcludes()` that is only used in tests Signed-off-by: Sebastian Schuberth --- model/src/main/kotlin/config/Excludes.kt | 5 ----- model/src/test/kotlin/config/ExcludesTest.kt | 13 ------------- 2 files changed, 18 deletions(-) diff --git a/model/src/main/kotlin/config/Excludes.kt b/model/src/main/kotlin/config/Excludes.kt index 6f9a6d78cf3a6..e03f2236fd970 100644 --- a/model/src/main/kotlin/config/Excludes.kt +++ b/model/src/main/kotlin/config/Excludes.kt @@ -49,11 +49,6 @@ data class Excludes( val EMPTY = Excludes() } - /** - * Return the [PathExclude]s matching the provided [path]. - */ - fun findPathExcludes(path: String) = paths.filter { it.matches(path) } - /** * Return the [PathExclude]s matching the [definitionFilePath][Project.definitionFilePath]. */ diff --git a/model/src/test/kotlin/config/ExcludesTest.kt b/model/src/test/kotlin/config/ExcludesTest.kt index 6b48605a11de3..7806bdc4aaab9 100644 --- a/model/src/test/kotlin/config/ExcludesTest.kt +++ b/model/src/test/kotlin/config/ExcludesTest.kt @@ -94,19 +94,6 @@ class ExcludesTest : WordSpec() { init { "findPathExcludes" should { - "find the correct path excludes for a path" { - val excludes = Excludes(paths = listOf(pathExclude1, pathExclude2, pathExclude3, pathExclude4)) - - with(excludes) { - findPathExcludes("") should beEmpty() - findPathExcludes("path1") should containExactly(pathExclude1) - findPathExcludes("path2") should containExactly(pathExclude2) - findPathExcludes("test.ext") should containExactly(pathExclude3) - findPathExcludes("directory/test.ext") should containExactly(pathExclude3) - findPathExcludes("directory/file.ext") should containExactly(pathExclude3, pathExclude4) - } - } - "find the correct path excludes for a project" { val excludes = Excludes(paths = listOf(pathExclude1, pathExclude2, pathExclude3, pathExclude4))