Skip to content

Commit

Permalink
Update file_filter.go
Browse files Browse the repository at this point in the history
fix filepath
  • Loading branch information
wuwen5 authored May 20, 2023
1 parent f74d64b commit 6975ae3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/adapter/cocafile/file_filter.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
package cocafile

import "strings"
import (
"path/filepath"
"strings"
)

var isJavaTestFile = func(path string) bool {
return strings.HasSuffix(path, "Test.java") || strings.HasSuffix(path, "Tests.java")
}

var isJavaTestPackage = func(path string) bool {
path = filepath.ToSlash(path)
return strings.Contains(path, "src/test/java/")
}

Expand Down

0 comments on commit 6975ae3

Please sign in to comment.