From e1b808ceb4d52ceb3fab0a73a22c1bd6b6d43569 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Thu, 2 Nov 2023 18:23:36 +0100 Subject: [PATCH] Python: Don't include `docs/` folder --- .../ql/lib/semmle/python/frameworks/internal/SubclassFinder.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ql/lib/semmle/python/frameworks/internal/SubclassFinder.qll b/python/ql/lib/semmle/python/frameworks/internal/SubclassFinder.qll index a56737a4831..147dbb49c70 100644 --- a/python/ql/lib/semmle/python/frameworks/internal/SubclassFinder.qll +++ b/python/ql/lib/semmle/python/frameworks/internal/SubclassFinder.qll @@ -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)