Skip to content

Commit 4fa57bf

Browse files
committed
Use set literal instead of regex comparison
1 parent a9f297c commit 4fa57bf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import go
22

33
from Type t
4-
where t.getPackage().getName().regexpMatch("main|pkg1|pkg2")
4+
where t.getPackage().getName() = ["main", "pkg1", "pkg2"]
55
select t.pp(), strictcount(t.getMethod(_))
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import go
22

33
from Type t, string m
4-
where t.getPackage().getName().regexpMatch("main|pkg1|pkg2")
4+
where t.getPackage().getName() = ["main", "pkg1", "pkg2"]
55
select t.pp(), m, t.getMethod(m)

0 commit comments

Comments
 (0)