mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #8012 from erik-krogh/db-in-upgrade
QL: allow raw db types in upgrade/downgrade scripts
This commit is contained in:
@@ -10,10 +10,13 @@
|
||||
|
||||
import ql
|
||||
|
||||
/** Gets a folder that may contain raw DB types. */
|
||||
string folderWithDbTypes() { result = ["lib", "downgrades", "upgrades"] }
|
||||
|
||||
from TypeExpr te
|
||||
where
|
||||
te.isDBType() and
|
||||
not te.getLocation().getFile().getAbsolutePath().matches("%/lib/%") and
|
||||
not te.getLocation().getFile().getAbsolutePath().matches("%/" + folderWithDbTypes() + "/%") and
|
||||
exists(File f | f.getAbsolutePath().matches("%/lib/%")) and
|
||||
// it is needed in one case.
|
||||
not te = any(Class c | c.getName() = "SuppressionScope").getASuperType() and
|
||||
|
||||
Reference in New Issue
Block a user