Skip to content

Commit e31cce5

Browse files
GeekMasherowen-mc
andauthored
Update go/ql/lib/semmle/go/frameworks/GoMicro.qll
Co-authored-by: Owen Mansel-Chan <[email protected]>
1 parent e951720 commit e31cce5

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

go/ql/lib/semmle/go/frameworks/GoMicro.qll

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,9 @@ module GoMicro {
9797
*/
9898
class ServiceRegisterHandler extends Function {
9999
ServiceRegisterHandler() {
100-
exists(ServiceServerType c, GoMicroServerType s |
101-
this.getName().regexpMatch("(?i)register" + c.getName()) and
102-
this.getParameterType(0) = s and
103-
this.getDeclaration().getLocation().getFile() instanceof ProtocGeneratedFile
104-
)
100+
this.getName().regexpMatch("(?i)register" + any(ServiceServerType c).getName()) and
101+
this.getParameterType(0) instanceof GoMicroServerType and
102+
this.hasLocationInfo(any(ProtocGeneratedFile f).getAbsolutePath(), _, _, _, _)
105103
}
106104
}
107105

0 commit comments

Comments
 (0)