Skip to content

Commit d472dfe

Browse files
committed
Fix QLDocs
1 parent 489a87f commit d472dfe

File tree

1 file changed

+26
-61
lines changed

1 file changed

+26
-61
lines changed
Lines changed: 26 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,52 @@
1-
/**
2-
* Provides classes for modeling the `github.com/rs/cors` package.
3-
*/
1+
/** Provides classes for modeling the `github.com/rs/cors` package. */
42

53
import go
64

7-
/**
8-
* An abstract class for modeling the Go CORS handler model origin write.
9-
*/
5+
/** An abstract class for modeling the Go CORS handler model origin write. */
106
abstract class UniversalOriginWrite extends DataFlow::ExprNode {
11-
/**
12-
* Get config variable holding header values
13-
*/
7+
/** Gets the config variable holding header values. */
148
abstract DataFlow::Node getBase();
159

16-
/**
17-
* Get config variable holding header values
18-
*/
10+
/** Gets the config variable holding header values. */
1911
abstract Variable getConfig();
2012
}
2113

2214
/**
23-
* An abstract class for modeling the Go CORS handler model allow all origins write.
15+
* An abstract class for modeling the Go CORS handler model allow all origins
16+
* write.
2417
*/
2518
abstract class UniversalAllowAllOriginsWrite extends DataFlow::ExprNode {
26-
/**
27-
* Get config variable holding header values
28-
*/
19+
/** Gets the config variable holding header values. */
2920
abstract DataFlow::Node getBase();
3021

31-
/**
32-
* Get config variable holding header values
33-
*/
22+
/** Gets the config variable holding header values. */
3423
abstract Variable getConfig();
3524
}
3625

3726
/**
38-
* An abstract class for modeling the Go CORS handler model allow credentials write.
27+
* An abstract class for modeling the Go CORS handler model allow credentials
28+
* write.
3929
*/
4030
abstract class UniversalAllowCredentialsWrite extends DataFlow::ExprNode {
41-
/**
42-
* Get config struct holding header values
43-
*/
31+
/** Gets the config struct holding header values. */
4432
abstract DataFlow::Node getBase();
4533

46-
/**
47-
* Get config variable holding header values
48-
*/
34+
/** Gets the config variable holding header values. */
4935
abstract Variable getConfig();
5036
}
5137

52-
/**
53-
* Provides classes for modeling the `github.com/rs/cors` package.
54-
*/
38+
/** Provides classes for modeling the `github.com/rs/cors` package. */
5539
module RsCors {
5640
/** Gets the package name `github.com/gin-gonic/gin`. */
5741
string packagePath() { result = package("github.com/rs/cors", "") }
5842

59-
/**
60-
* A new function create a new rs Handler
61-
*/
43+
/** The `New` function that creates a new rs Handler. */
6244
class New extends Function {
6345
New() { exists(Function f | f.hasQualifiedName(packagePath(), "New") | this = f) }
6446
}
6547

6648
/**
67-
* A write to the value of Access-Control-Allow-Credentials header
49+
* A write to the value of Access-Control-Allow-Credentials header.
6850
*/
6951
class AllowCredentialsWrite extends UniversalAllowCredentialsWrite {
7052
DataFlow::Node base;
@@ -77,14 +59,10 @@ module RsCors {
7759
)
7860
}
7961

80-
/**
81-
* Get options struct holding header values
82-
*/
62+
/** Gets the options struct holding header values. */
8363
override DataFlow::Node getBase() { result = base }
8464

85-
/**
86-
* Get options variable holding header values
87-
*/
65+
/** Gets the options variable holding header values. */
8866
override RsOptions getConfig() {
8967
exists(RsOptions gc |
9068
(
@@ -97,9 +75,7 @@ module RsCors {
9775
}
9876
}
9977

100-
/**
101-
* A write to the value of Access-Control-Allow-Origins header
102-
*/
78+
/** A write to the value of Access-Control-Allow-Origins header. */
10379
class AllowOriginsWrite extends UniversalOriginWrite {
10480
DataFlow::Node base;
10581

@@ -111,14 +87,10 @@ module RsCors {
11187
)
11288
}
11389

114-
/**
115-
* Get options struct holding header values
116-
*/
90+
/** Gets the options struct holding header values. */
11791
override DataFlow::Node getBase() { result = base }
11892

119-
/**
120-
* Get options variable holding header values
121-
*/
93+
/** Gets the options variable holding header values. */
12294
override RsOptions getConfig() {
12395
exists(RsOptions gc |
12496
(
@@ -132,7 +104,8 @@ module RsCors {
132104
}
133105

134106
/**
135-
* A write to the value of Access-Control-Allow-Origins of value "*", overriding AllowOrigins
107+
* A write to the value of Access-Control-Allow-Origins of value "*",
108+
* overriding `AllowOrigins`.
136109
*/
137110
class AllowAllOriginsWrite extends UniversalAllowAllOriginsWrite {
138111
DataFlow::Node base;
@@ -145,14 +118,10 @@ module RsCors {
145118
)
146119
}
147120

148-
/**
149-
* Get options struct holding header values
150-
*/
121+
/** Gets the options struct holding header values. */
151122
override DataFlow::Node getBase() { result = base }
152123

153-
/**
154-
* Get options variable holding header values
155-
*/
124+
/** Gets options variable holding header values. */
156125
override RsOptions getConfig() {
157126
exists(RsOptions gc |
158127
(
@@ -165,9 +134,7 @@ module RsCors {
165134
}
166135
}
167136

168-
/**
169-
* A variable of type Options that holds the headers to be set.
170-
*/
137+
/** A variable of type Options that holds the headers to be set. */
171138
class RsOptions extends Variable {
172139
SsaWithFields v;
173140

@@ -176,9 +143,7 @@ module RsCors {
176143
v.getType().hasQualifiedName(packagePath(), "Options")
177144
}
178145

179-
/**
180-
* Get variable declaration of Options
181-
*/
146+
/** Gets the SSA variable declaration of Options. */
182147
SsaWithFields getV() { result = v }
183148
}
184149
}

0 commit comments

Comments
 (0)