Skip to content

Commit d47b0a6

Browse files
committed
exclude tests from ql/missing-security-metadata
1 parent 2442bea commit d47b0a6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ql/ql/src/queries/style/MissingSecurityMetadata.ql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ predicate missingSecurityTag(QLDoc doc) {
4141
from TopLevel t, string msg
4242
where
4343
t.getLocation().getFile().getBaseName().matches("%.ql") and
44-
not t.getLocation().getFile().getRelativePath().matches(["%/experimental/%", "%/examples/%"]) and
44+
not t.getLocation()
45+
.getFile()
46+
.getRelativePath()
47+
.matches("%/" + ["experimental", "examples", "test"] + "/%") and
4548
(
4649
missingSecuritySeverity(t.getQLDoc()) and
4750
msg = "This query file is missing a `@security-severity` tag."

0 commit comments

Comments
 (0)