mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
Python: Disallow examples
This commit is contained in:
@@ -113,7 +113,8 @@ module NotExposed {
|
||||
|
||||
predicate isAllowedModule(Module mod) {
|
||||
// don't include anything found in site-packages
|
||||
exists(mod.getFile().getRelativePath())
|
||||
exists(mod.getFile().getRelativePath()) and
|
||||
not mod.getFile().getRelativePath().regexpMatch("(?i)(^|/)examples?/.*")
|
||||
}
|
||||
|
||||
predicate isTestCode(AstNode ast) {
|
||||
|
||||
Reference in New Issue
Block a user