Shared: include 'qltest%' and 'test-%'

This commit is contained in:
Jami Cogswell
2023-06-05 08:23:31 -04:00
parent 76508d17c6
commit 7b629f5d63
11 changed files with 56 additions and 33 deletions

View File

@@ -318,7 +318,6 @@ module ModelValidation {
or
exists(string kind, string msg | sinkModel(_, _, _, _, _, _, _, kind, _) |
not kind instanceof ValidSinkKind and
not kind.matches("qltest%") and
msg = "Invalid kind \"" + kind + "\" in sink model." and
// The part of this message that refers to outdated sink kinds can be deleted after June 1st, 2024.
if kind instanceof OutdatedSinkKind
@@ -328,7 +327,6 @@ module ModelValidation {
or
exists(string kind | sourceModel(_, _, _, _, _, _, _, kind, _) |
not kind instanceof ValidSourceKind and
not kind.matches("qltest%") and
result = "Invalid kind \"" + kind + "\" in source model."
)
or

View File

@@ -29,7 +29,7 @@ class ValidSinkKind extends string {
or
this.matches([
// shared
"encryption-%",
"encryption-%", "qltest%", "test-%",
// Java-only currently, but may be shared in the future
"regex-use%",
// JavaScript-only currently, but may be shared in the future
@@ -53,11 +53,15 @@ class ValidSourceKind extends string {
// C#
"file", "file-write",
// JavaScript
"database-access-result"
"database-access-result", "remote-flow"
]
or
// Swift
this.matches("%string-%length")
this.matches([
// shared
"qltest%", "test-%",
// Swift
"%string-%length"
])
}
}