Skip to content

Commit 0b486ad

Browse files
committed
Go: Autoformat
1 parent aadf7ae commit 0b486ad

File tree

37 files changed

+104
-51
lines changed

37 files changed

+104
-51
lines changed

go/ql/test/TestUtilities/InlineFlowTest.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ class InlineFlowTest extends InlineExpectationsTest {
7979
override predicate hasActualResult(Location location, string element, string tag, string value) {
8080
tag = "hasValueFlow" and
8181
exists(DataFlow::Node src, DataFlow::Node sink | getValueFlowConfig().hasFlow(src, sink) |
82-
sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
82+
sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(),
83+
location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
8384
element = sink.toString() and
8485
value = "\"" + sink.toString() + "\""
8586
)
@@ -88,7 +89,8 @@ class InlineFlowTest extends InlineExpectationsTest {
8889
exists(DataFlow::Node src, DataFlow::Node sink |
8990
getTaintFlowConfig().hasFlow(src, sink) and not getValueFlowConfig().hasFlow(src, sink)
9091
|
91-
sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
92+
sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(),
93+
location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
9294
element = sink.toString() and
9395
value = "\"" + sink.toString() + "\""
9496
)

go/ql/test/experimental/frameworks/CleverGo/HeaderWrite.ql

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ class HttpHeaderWriteTest extends InlineExpectationsTest {
1212
override predicate hasActualResult(Location location, string element, string tag, string value) {
1313
// Dynamic key-value header:
1414
exists(HTTP::HeaderWrite hw |
15-
hw.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
15+
hw.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(),
16+
location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
1617
(
1718
element = hw.getName().toString() and
1819
value = hw.getName().toString() and
@@ -26,7 +27,8 @@ class HttpHeaderWriteTest extends InlineExpectationsTest {
2627
or
2728
// Static key, dynamic value header:
2829
exists(HTTP::HeaderWrite hw |
29-
hw.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
30+
hw.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(),
31+
location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
3032
(
3133
element = hw.getHeaderName().toString() and
3234
value = hw.getHeaderName() and
@@ -40,7 +42,8 @@ class HttpHeaderWriteTest extends InlineExpectationsTest {
4042
or
4143
// Static key, static value header:
4244
exists(HTTP::HeaderWrite hw |
43-
hw.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
45+
hw.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(),
46+
location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
4447
(
4548
element = hw.getHeaderName().toString() and
4649
value = hw.getHeaderName() and

go/ql/test/experimental/frameworks/CleverGo/HttpRedirect.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ class HttpRedirectTest extends InlineExpectationsTest {
1010
override predicate hasActualResult(Location location, string element, string tag, string value) {
1111
tag = "redirectUrl" and
1212
exists(HTTP::Redirect rd |
13-
rd.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
13+
rd.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(),
14+
location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
1415
element = rd.getUrl().toString() and
1516
value = rd.getUrl().toString()
1617
)

go/ql/test/experimental/frameworks/CleverGo/HttpResponseBody.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ class HttpResponseBodyTest extends InlineExpectationsTest {
99

1010
override predicate hasActualResult(Location location, string element, string tag, string value) {
1111
exists(HTTP::ResponseBody rd |
12-
rd.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
12+
rd.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(),
13+
location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
1314
(
1415
element = rd.getAContentType().toString() and
1516
value = rd.getAContentType().toString() and

go/ql/test/experimental/frameworks/CleverGo/TaintTracking.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ class TaintTrackingTest extends InlineExpectationsTest {
2424
exists(DataFlow::Node sink | any(Configuration c).hasFlow(_, sink) |
2525
element = sink.toString() and
2626
value = "" and
27-
sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), location.getStartColumn(), location.getEndLine(), location.getEndColumn())
27+
sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(),
28+
location.getStartColumn(), location.getEndLine(), location.getEndColumn())
2829
)
2930
}
3031
}

go/ql/test/experimental/frameworks/CleverGo/UntrustedSources.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ class UntrustedFlowSourceTest extends InlineExpectationsTest {
1616
|
1717
element = arg.toString() and
1818
value = "" and
19-
arg.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), location.getStartColumn(), location.getEndLine(), location.getEndColumn())
19+
arg.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(),
20+
location.getStartColumn(), location.getEndLine(), location.getEndColumn())
2021
)
2122
}
2223
}

go/ql/test/experimental/frameworks/Fiber/HeaderWrite.ql

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ class HttpHeaderWriteTest extends InlineExpectationsTest {
1212
override predicate hasActualResult(Location location, string element, string tag, string value) {
1313
// Dynamic key-value header:
1414
exists(HTTP::HeaderWrite hw |
15-
hw.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
15+
hw.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(),
16+
location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
1617
(
1718
element = hw.getName().toString() and
1819
value = hw.getName().toString() and
@@ -26,7 +27,8 @@ class HttpHeaderWriteTest extends InlineExpectationsTest {
2627
or
2728
// Static key, dynamic value header:
2829
exists(HTTP::HeaderWrite hw |
29-
hw.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
30+
hw.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(),
31+
location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
3032
(
3133
element = hw.getHeaderName().toString() and
3234
value = hw.getHeaderName() and
@@ -40,7 +42,8 @@ class HttpHeaderWriteTest extends InlineExpectationsTest {
4042
or
4143
// Static key, static value header:
4244
exists(HTTP::HeaderWrite hw |
43-
hw.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
45+
hw.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(),
46+
location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
4447
(
4548
element = hw.getHeaderName().toString() and
4649
value = hw.getHeaderName() and

go/ql/test/experimental/frameworks/Fiber/Redirect.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ class HttpRedirectTest extends InlineExpectationsTest {
1010
override predicate hasActualResult(Location location, string element, string tag, string value) {
1111
tag = "redirectUrl" and
1212
exists(HTTP::Redirect rd |
13-
rd.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
13+
rd.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(),
14+
location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
1415
element = rd.getUrl().toString() and
1516
value = rd.getUrl().toString()
1617
)

go/ql/test/experimental/frameworks/Fiber/ResponseBody.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ class HttpResponseBodyTest extends InlineExpectationsTest {
99

1010
override predicate hasActualResult(Location location, string element, string tag, string value) {
1111
exists(HTTP::ResponseBody rd |
12-
rd.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
12+
rd.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(),
13+
location.getStartColumn(), location.getEndLine(), location.getEndColumn()) and
1314
(
1415
element = rd.getAContentType().toString() and
1516
value = rd.getAContentType().toString() and

go/ql/test/experimental/frameworks/Fiber/TaintTracking.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ class TaintTrackingTest extends InlineExpectationsTest {
2424
exists(DataFlow::Node sink | any(Configuration c).hasFlow(_, sink) |
2525
element = sink.toString() and
2626
value = "" and
27-
sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(), location.getStartColumn(), location.getEndLine(), location.getEndColumn())
27+
sink.hasLocationInfo(location.getFile().getAbsolutePath(), location.getStartLine(),
28+
location.getStartColumn(), location.getEndLine(), location.getEndColumn())
2829
)
2930
}
3031
}

0 commit comments

Comments
 (0)