Skip to content

Commit 893534e

Browse files
committed
Fix pre-existing whitespace issues in go test files
1 parent 4f6575a commit 893534e

4 files changed

Lines changed: 24 additions & 22 deletions

File tree

go/ql/test/query-tests/InconsistentCode/WhitespaceContradictsPrecedence/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func ok3(x int) int {
2121
func ok4(x int, y int, z int) int {
2222
return x + y + z;
2323
}
24-
24+
2525
func ok5(x int, y int, z int) int {
2626
return x + y+z;
2727
}
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
#select
2-
| StringBreak.go:14:47:14:57 | versionJSON | StringBreak.go:10:2:10:40 | ... := ...[0] | StringBreak.go:14:47:14:57 | versionJSON | If this $@ contains a single quote, it could break out of the enclosing quotes. | StringBreak.go:10:2:10:40 | ... := ...[0] | JSON value |
3-
| StringBreakMismatched.go:17:26:17:32 | escaped | StringBreakMismatched.go:12:2:12:40 | ... := ...[0] | StringBreakMismatched.go:17:26:17:32 | escaped | If this $@ contains a single quote, it could break out of the enclosing quotes. | StringBreakMismatched.go:12:2:12:40 | ... := ...[0] | JSON value |
4-
| StringBreakMismatched.go:29:27:29:33 | escaped | StringBreakMismatched.go:24:2:24:40 | ... := ...[0] | StringBreakMismatched.go:29:27:29:33 | escaped | If this $@ contains a double quote, it could break out of the enclosing quotes. | StringBreakMismatched.go:24:2:24:40 | ... := ...[0] | JSON value |
2+
| StringBreak.go:15:47:15:57 | versionJSON | StringBreak.go:11:2:11:40 | ... := ...[0] | StringBreak.go:15:47:15:57 | versionJSON | If this $@ contains a single quote, it could break out of the enclosing quotes. | StringBreak.go:11:2:11:40 | ... := ...[0] | JSON value |
3+
| StringBreakMismatched.go:18:26:18:32 | escaped | StringBreakMismatched.go:13:2:13:40 | ... := ...[0] | StringBreakMismatched.go:18:26:18:32 | escaped | If this $@ contains a single quote, it could break out of the enclosing quotes. | StringBreakMismatched.go:13:2:13:40 | ... := ...[0] | JSON value |
4+
| StringBreakMismatched.go:30:27:30:33 | escaped | StringBreakMismatched.go:25:2:25:40 | ... := ...[0] | StringBreakMismatched.go:30:27:30:33 | escaped | If this $@ contains a double quote, it could break out of the enclosing quotes. | StringBreakMismatched.go:25:2:25:40 | ... := ...[0] | JSON value |
55
edges
6-
| StringBreak.go:10:2:10:40 | ... := ...[0] | StringBreak.go:14:47:14:57 | versionJSON | provenance | |
7-
| StringBreakMismatched.go:12:2:12:40 | ... := ...[0] | StringBreakMismatched.go:13:29:13:47 | type conversion | provenance | |
8-
| StringBreakMismatched.go:13:13:13:62 | call to Replace | StringBreakMismatched.go:17:26:17:32 | escaped | provenance | |
9-
| StringBreakMismatched.go:13:29:13:47 | type conversion | StringBreakMismatched.go:13:13:13:62 | call to Replace | provenance | MaD:1 |
10-
| StringBreakMismatched.go:24:2:24:40 | ... := ...[0] | StringBreakMismatched.go:25:29:25:47 | type conversion | provenance | |
11-
| StringBreakMismatched.go:25:13:25:61 | call to Replace | StringBreakMismatched.go:29:27:29:33 | escaped | provenance | |
12-
| StringBreakMismatched.go:25:29:25:47 | type conversion | StringBreakMismatched.go:25:13:25:61 | call to Replace | provenance | MaD:1 |
6+
| StringBreak.go:11:2:11:40 | ... := ...[0] | StringBreak.go:15:47:15:57 | versionJSON | provenance | |
7+
| StringBreakMismatched.go:13:2:13:40 | ... := ...[0] | StringBreakMismatched.go:14:29:14:47 | type conversion | provenance | |
8+
| StringBreakMismatched.go:14:13:14:62 | call to Replace | StringBreakMismatched.go:18:26:18:32 | escaped | provenance | |
9+
| StringBreakMismatched.go:14:29:14:47 | type conversion | StringBreakMismatched.go:14:13:14:62 | call to Replace | provenance | MaD:1 |
10+
| StringBreakMismatched.go:25:2:25:40 | ... := ...[0] | StringBreakMismatched.go:26:29:26:47 | type conversion | provenance | |
11+
| StringBreakMismatched.go:26:13:26:61 | call to Replace | StringBreakMismatched.go:30:27:30:33 | escaped | provenance | |
12+
| StringBreakMismatched.go:26:29:26:47 | type conversion | StringBreakMismatched.go:26:13:26:61 | call to Replace | provenance | MaD:1 |
1313
models
1414
| 1 | Summary: strings; ; false; Replace; ; ; Argument[0]; ReturnValue; taint; manual |
1515
nodes
16-
| StringBreak.go:10:2:10:40 | ... := ...[0] | semmle.label | ... := ...[0] |
17-
| StringBreak.go:14:47:14:57 | versionJSON | semmle.label | versionJSON |
18-
| StringBreakMismatched.go:12:2:12:40 | ... := ...[0] | semmle.label | ... := ...[0] |
19-
| StringBreakMismatched.go:13:13:13:62 | call to Replace | semmle.label | call to Replace |
20-
| StringBreakMismatched.go:13:29:13:47 | type conversion | semmle.label | type conversion |
21-
| StringBreakMismatched.go:17:26:17:32 | escaped | semmle.label | escaped |
22-
| StringBreakMismatched.go:24:2:24:40 | ... := ...[0] | semmle.label | ... := ...[0] |
23-
| StringBreakMismatched.go:25:13:25:61 | call to Replace | semmle.label | call to Replace |
24-
| StringBreakMismatched.go:25:29:25:47 | type conversion | semmle.label | type conversion |
25-
| StringBreakMismatched.go:29:27:29:33 | escaped | semmle.label | escaped |
16+
| StringBreak.go:11:2:11:40 | ... := ...[0] | semmle.label | ... := ...[0] |
17+
| StringBreak.go:15:47:15:57 | versionJSON | semmle.label | versionJSON |
18+
| StringBreakMismatched.go:13:2:13:40 | ... := ...[0] | semmle.label | ... := ...[0] |
19+
| StringBreakMismatched.go:14:13:14:62 | call to Replace | semmle.label | call to Replace |
20+
| StringBreakMismatched.go:14:29:14:47 | type conversion | semmle.label | type conversion |
21+
| StringBreakMismatched.go:18:26:18:32 | escaped | semmle.label | escaped |
22+
| StringBreakMismatched.go:25:2:25:40 | ... := ...[0] | semmle.label | ... := ...[0] |
23+
| StringBreakMismatched.go:26:13:26:61 | call to Replace | semmle.label | call to Replace |
24+
| StringBreakMismatched.go:26:29:26:47 | type conversion | semmle.label | type conversion |
25+
| StringBreakMismatched.go:30:27:30:33 | escaped | semmle.label | escaped |
2626
subpaths

go/ql/test/query-tests/Security/CWE-089/StringBreak.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package main
33
import (
44
"encoding/json"
55
"fmt"
6+
67
sq "github.com/Masterminds/squirrel"
78
)
89

go/ql/test/query-tests/Security/CWE-089/StringBreakMismatched.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ package main
22

33
import (
44
"encoding/json"
5-
sq "github.com/Masterminds/squirrel"
65
"strings"
6+
7+
sq "github.com/Masterminds/squirrel"
78
)
89

910
// Bad because quote characters are removed before concatenation,

0 commit comments

Comments
 (0)