Python: Don't include docs/ folder

This commit is contained in:
Rasmus Wriedt Larsen
2023-11-02 18:23:36 +01:00
parent 004bb50ef2
commit dc90411809

View File

@@ -115,7 +115,7 @@ module NotExposed {
predicate isAllowedModule(Module mod) {
// don't include anything found in site-packages
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`
forall(string part | part = mod.getFile().getParent().getRelativePath().splitAt("/") |
legalShortName(part)