Skip to content

Commit

Permalink
Move PathFilters to detekt-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
BraisGabin committed Apr 6, 2024
1 parent 655813f commit 65a2ae2
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions detekt-cli/build.gradle.kts
Expand Up @@ -22,6 +22,7 @@ val pluginsJarFiles by configurations.resolvable("pluginsJarFiles") {
dependencies {
implementation(libs.jcommander)
implementation(projects.detektTooling)
implementation(projects.detektUtils)
implementation(libs.kotlin.compilerEmbeddable) {
version {
strictly(libs.versions.kotlin.get())
Expand Down
Expand Up @@ -2,9 +2,9 @@ package io.gitlab.arturbosch.detekt.cli

import io.github.detekt.tooling.api.spec.ProcessingSpec
import io.github.detekt.tooling.api.spec.RulesSpec
import io.github.detekt.utils.PathFilters
import io.gitlab.arturbosch.detekt.api.Rule
import io.gitlab.arturbosch.detekt.api.RuleSet
import io.gitlab.arturbosch.detekt.api.internal.PathFilters
import java.nio.file.Path
import kotlin.io.path.ExperimentalPathApi
import kotlin.io.path.absolute
Expand Down
Expand Up @@ -2,8 +2,8 @@ package io.gitlab.arturbosch.detekt.core.util

import io.github.detekt.psi.absolutePath
import io.github.detekt.psi.basePath
import io.github.detekt.utils.PathFilters
import io.gitlab.arturbosch.detekt.api.Config
import io.gitlab.arturbosch.detekt.api.internal.PathFilters
import org.jetbrains.kotlin.psi.KtFile
import kotlin.io.path.Path
import kotlin.io.path.relativeTo
Expand Down
@@ -1,4 +1,4 @@
package io.gitlab.arturbosch.detekt.api.internal
package io.github.detekt.utils

import java.nio.file.Path
import java.nio.file.PathMatcher
Expand Down
@@ -1,4 +1,4 @@
package io.gitlab.arturbosch.detekt.api.internal
package io.github.detekt.utils

import java.nio.file.FileSystem
import java.nio.file.FileSystems
Expand All @@ -9,7 +9,7 @@ import java.nio.file.PathMatcher
* We only support the "glob:" syntax to stay os independently.
* Internally a globbing pattern is transformed to a regex respecting the Windows file system.
*/
fun pathMatcher(pattern: String): PathMatcher {
internal fun pathMatcher(pattern: String): PathMatcher {
val result = when (pattern.substringBefore(":")) {
"glob" -> pattern
"regex" -> throw IllegalArgumentException(USE_GLOB_MSG)
Expand Down
@@ -1,4 +1,4 @@
package io.gitlab.arturbosch.detekt.api.internal
package io.github.detekt.utils

import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
Expand Down
@@ -1,4 +1,4 @@
package io.gitlab.arturbosch.detekt.api.internal
package io.github.detekt.utils

import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.Assertions.assertThatThrownBy
Expand Down

0 comments on commit 65a2ae2

Please sign in to comment.