mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
exclude tests from ql/missing-security-metadata
This commit is contained in:
@@ -41,7 +41,10 @@ predicate missingSecurityTag(QLDoc doc) {
|
||||
from TopLevel t, string msg
|
||||
where
|
||||
t.getLocation().getFile().getBaseName().matches("%.ql") and
|
||||
not t.getLocation().getFile().getRelativePath().matches(["%/experimental/%", "%/examples/%"]) and
|
||||
not t.getLocation()
|
||||
.getFile()
|
||||
.getRelativePath()
|
||||
.matches("%/" + ["experimental", "examples", "test"] + "/%") and
|
||||
(
|
||||
missingSecuritySeverity(t.getQLDoc()) and
|
||||
msg = "This query file is missing a `@security-severity` tag."
|
||||
|
||||
Reference in New Issue
Block a user