Skip to content

Commit

Permalink
Remove unused interface (jraska#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
jraska authored Jul 26, 2024
1 parent 700349b commit ec48fa5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package com.jraska.module.graph
class RegexpDependencyMatcher(
private val matchingRegex: Regex,
private val divider: String
) : DependencyMatcher {
) {

override fun matches(dependency: Pair<String, String>): Boolean {
fun matches(dependency: Pair<String, String>): Boolean {
val dependencyToMatch = "${dependency.first}$divider${dependency.second}"
return matchingRegex.matches(dependencyToMatch)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.jraska.module.graph.assertion

import com.jraska.module.graph.DependencyGraph
import com.jraska.module.graph.DependencyMatcher
import com.jraska.module.graph.Parse
import com.jraska.module.graph.RegexpDependencyMatcher
import org.gradle.api.GradleException

class RestrictedDependenciesAssert(
Expand All @@ -24,7 +24,7 @@ class RestrictedDependenciesAssert(
}
}

private fun buildErrorMessage(failedDependencies: List<Pair<ModuleDependency, List<DependencyMatcher>>>): String {
private fun buildErrorMessage(failedDependencies: List<Pair<ModuleDependency, List<RegexpDependencyMatcher>>>): String {
return failedDependencies.map {
val violatedRules = it.second.map { "'$it'" }.joinToString(", ")
"Dependency '${it.first.assertDisplayText()} violates: $violatedRules"
Expand Down

0 comments on commit ec48fa5

Please sign in to comment.