mirror of
https://github.com/github/codeql.git
synced 2026-04-25 08:45:14 +02:00
Python: Don't filter subclass tests away
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user