add python support

This commit is contained in:
2026-08-29 21:58:16 +01:00
parent d247095e87
commit b1dd808d1e
2 changed files with 14 additions and 0 deletions
+10
View File
@@ -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