diff --git a/chapi-application/src/main/kotlin/chapi/app/analyser/filter/FileFilter.kt b/chapi-application/src/main/kotlin/chapi/app/analyser/filter/FileFilter.kt index a7a79bad..4502d0db 100644 --- a/chapi-application/src/main/kotlin/chapi/app/analyser/filter/FileFilter.kt +++ b/chapi-application/src/main/kotlin/chapi/app/analyser/filter/FileFilter.kt @@ -2,6 +2,7 @@ package chapi.app.analyser.filter import chapi.app.analyser.config.ChapiConfig import chapi.app.analyser.config.Language +import java.io.File open class FileFilter { companion object { @@ -10,6 +11,10 @@ open class FileFilter { return config.filterRule.toRegex().matches(path) } + if (!File(path).isFile) { + return false; + } + return when (config.language) { "java" -> { path.endsWith(".java")