Skip to content

Commit

Permalink
chore(model)!: Remove findPathExcludes() that is only used in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Mar 20, 2024
1 parent a23c650 commit 7c0717f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
5 changes: 0 additions & 5 deletions model/src/main/kotlin/config/Excludes.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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].
*/
Expand Down
13 changes: 0 additions & 13 deletions model/src/test/kotlin/config/ExcludesTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 7c0717f

Please sign in to comment.