mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
Python: Don't include docs/ folder
This commit is contained in:
@@ -115,7 +115,7 @@ module NotExposed {
|
|||||||
predicate isAllowedModule(Module mod) {
|
predicate isAllowedModule(Module mod) {
|
||||||
// don't include anything found in site-packages
|
// don't include anything found in site-packages
|
||||||
exists(mod.getFile().getRelativePath()) and
|
exists(mod.getFile().getRelativePath()) and
|
||||||
not mod.getFile().getRelativePath().regexpMatch("(?i)(^|/)examples?/.*") and
|
not mod.getFile().getRelativePath().regexpMatch("(?i)((^|/)examples?|^docs)/.*") and
|
||||||
// to counter things like `my-example/app/foo.py` being allowed under `app.foo`
|
// to counter things like `my-example/app/foo.py` being allowed under `app.foo`
|
||||||
forall(string part | part = mod.getFile().getParent().getRelativePath().splitAt("/") |
|
forall(string part | part = mod.getFile().getParent().getRelativePath().splitAt("/") |
|
||||||
legalShortName(part)
|
legalShortName(part)
|
||||||
|
|||||||
Reference in New Issue
Block a user