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))