Skip to content

Commit 58fcdbc

Browse files
committed
QL: remove some benign results from ql/abstract-class-import
1 parent 81ce8ac commit 58fcdbc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ql/ql/src/queries/performance/AbstractClassImport.ql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ predicate alert(Class ab, string msg, Class sub, Class sub2) {
9797
)
9898
) and
9999
// exclude results in experimental
100-
not experimentalFile(sub.getLocation().getFile())
100+
not experimentalFile(sub.getLocation().getFile()) and
101+
// exclude trivially empty classes
102+
not sub.getCharPred().getBody() instanceof NoneCall and
103+
// exclude test/example queries
104+
not sub.getLocation().getFile().getRelativePath().matches("%/" + ["examples", "test"] + "/%.ql")
101105
}
102106

103107
from Class ab, string msg, Class sub, Class sub2

0 commit comments

Comments
 (0)