Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1dd808d1e |
@@ -28,6 +28,9 @@ var DefaultIgnores = []string{
|
||||
".idea",
|
||||
".vscode",
|
||||
"dependency-reduced-pom.xml",
|
||||
"__pycache__",
|
||||
"venv",
|
||||
"env",
|
||||
}
|
||||
|
||||
var DefaultExts = []string{
|
||||
@@ -43,6 +46,7 @@ var DefaultExts = []string{
|
||||
".jar",
|
||||
".war",
|
||||
".ear",
|
||||
".pyc", ".pyo",
|
||||
}
|
||||
|
||||
var FrontendExts = []string{
|
||||
|
||||
@@ -99,6 +99,16 @@ func isTestFile(path, name string) bool {
|
||||
}
|
||||
slashPath := filepath.ToSlash(path)
|
||||
return strings.Contains(slashPath, "/src/test/")
|
||||
case ".py":
|
||||
lower := strings.ToLower(name)
|
||||
if strings.HasPrefix(lower, "test_") || strings.HasSuffix(lower, "_test.py") {
|
||||
return true
|
||||
}
|
||||
if strings.EqualFold(name, "conftest.py") {
|
||||
return true
|
||||
}
|
||||
slashPath := filepath.ToSlash(path)
|
||||
return strings.Contains(slashPath, "/tests/")
|
||||
}
|
||||
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user