Skip to content

Commit

Permalink
fix: fix suffix is a path issue
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Mar 24, 2022
1 parent 9356093 commit 84d8f1f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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")
Expand Down

0 comments on commit 84d8f1f

Please # to comment.