Skip to content

Commit 78816f0

Browse files
committed
Make QLDoc comments more concise too
1 parent 2ad12f1 commit 78816f0

File tree

1 file changed

+10
-30
lines changed

1 file changed

+10
-30
lines changed

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

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,14 @@ module Twirp {
3535
}
3636
}
3737

38-
/**
39-
* A type representing a protobuf message.
40-
*/
38+
/** A type representing a protobuf message. */
4139
class ProtobufMessageType extends Type {
4240
ProtobufMessageType() {
4341
this.hasLocationInfo(any(ProtobufGeneratedFile f).getAbsolutePath(), _, _, _, _)
4442
}
4543
}
4644

47-
/**
48-
* An interface type representing a Twirp service.
49-
*/
45+
/** An interface type representing a Twirp service. */
5046
class ServiceInterfaceType extends InterfaceType {
5147
NamedType namedType;
5248

@@ -55,20 +51,14 @@ module Twirp {
5551
namedType.hasLocationInfo(any(ServicesGeneratedFile f).getAbsolutePath(), _, _, _, _)
5652
}
5753

58-
/**
59-
* Gets the name of the interface.
60-
*/
54+
/** Gets the name of the interface. */
6155
override string getName() { result = namedType.getName() }
6256

63-
/**
64-
* Gets the named type on top of this interface type.
65-
*/
57+
/** Gets the named type on top of this interface type. */
6658
NamedType getNamedType() { result = namedType }
6759
}
6860

69-
/**
70-
* A Twirp client.
71-
*/
61+
/** A Twirp client. */
7262
class ServiceClientType extends NamedType {
7363
ServiceClientType() {
7464
exists(ServiceInterfaceType i, PointerType p |
@@ -80,9 +70,7 @@ module Twirp {
8070
}
8171
}
8272

83-
/**
84-
* A Twirp server.
85-
*/
73+
/** A Twirp server. */
8674
class ServiceServerType extends NamedType {
8775
ServiceServerType() {
8876
exists(ServiceInterfaceType i |
@@ -93,9 +81,7 @@ module Twirp {
9381
}
9482
}
9583

96-
/**
97-
* A Twirp function to construct a Client.
98-
*/
84+
/** A Twirp function to construct a Client. */
9985
class ClientConstructor extends Function {
10086
ClientConstructor() {
10187
this.getName().regexpMatch("(?i)new" + any(ServiceClientType c).getName()) and
@@ -118,9 +104,7 @@ module Twirp {
118104
}
119105
}
120106

121-
/**
122-
* An SSRF sink for the Client constructor.
123-
*/
107+
/** An SSRF sink for the Client constructor. */
124108
class ClientRequestUrlAsSink extends RequestForgery::Sink {
125109
ClientRequestUrlAsSink() {
126110
exists(DataFlow::CallNode call |
@@ -134,9 +118,7 @@ module Twirp {
134118
override string getKind() { result = "URL" }
135119
}
136120

137-
/**
138-
* A service handler.
139-
*/
121+
/** A service handler. */
140122
class ServiceHandler extends Method {
141123
ServiceHandler() {
142124
exists(DataFlow::CallNode call |
@@ -147,9 +129,7 @@ module Twirp {
147129
}
148130
}
149131

150-
/**
151-
* A request coming to the service handler.
152-
*/
132+
/** A request coming to the service handler. */
153133
class Request extends UntrustedFlowSource::Range instanceof DataFlow::ParameterNode {
154134
Request() {
155135
exists(ServiceHandler handler |

0 commit comments

Comments
 (0)