зеркало из https://github.com/github/codeql.git
Python: Don't filter subclass tests away
This commit is contained in:
Родитель
a9a0216c43
Коммит
60b784a919
|
@ -113,6 +113,9 @@ module NotExposed {
|
|||
}
|
||||
|
||||
predicate isAllowedModule(Module mod) {
|
||||
// for tests
|
||||
mod.getName() = "find_subclass_test"
|
||||
or
|
||||
// don't include anything found in site-packages
|
||||
exists(mod.getFile().getRelativePath()) and
|
||||
not mod.getFile().getRelativePath().regexpMatch("(?i)((^|/)examples?|^docs)/.*") and
|
||||
|
|
|
@ -514,5 +514,9 @@ where
|
|||
) and
|
||||
fullyQualifiedToYamlFormat(newModelFullyQualified, type2, path) and
|
||||
not Extensions::typeModel(spec, type2, path) and
|
||||
not newModelFullyQualified.regexpMatch("(?i).*tests?_?.*")
|
||||
(
|
||||
not newModelFullyQualified.regexpMatch("(?i).*tests?_?.*")
|
||||
or
|
||||
type2 = "find_subclass_test"
|
||||
)
|
||||
select spec.(string), type2, path
|
||||
|
|
Загрузка…
Ссылка в новой задаче