Skip to content

Commit 662af6e

Browse files
committed
Update test expectations
1 parent da8ae84 commit 662af6e

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

Diff for: go/ql/test/library-tests/semmle/go/concepts/LoggerCall/glog.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ func glogTest() {
3131
glog.Warningln(text) // $ logger=text
3232

3333
// components corresponding to the format specifier "%T" are not considered vulnerable
34-
glog.Errorf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text
35-
glog.Exitf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text
36-
glog.Fatalf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text
37-
glog.Infof("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text
38-
glog.Warningf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text
34+
glog.Errorf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text type-logger=v
35+
glog.Exitf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text type-logger=v
36+
glog.Fatalf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text type-logger=v
37+
glog.Infof("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text type-logger=v
38+
glog.Warningf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text type-logger=v
3939

4040
klog.Error(text) // $ logger=text
4141
klog.ErrorDepth(0, text) // $ logger=text
@@ -59,9 +59,9 @@ func glogTest() {
5959
klog.Warningln(text) // $ logger=text
6060

6161
// components corresponding to the format specifier "%T" are not considered vulnerable
62-
klog.Errorf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text
63-
klog.Exitf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text
64-
klog.Fatalf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text
65-
klog.Infof("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text
66-
klog.Warningf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text
62+
klog.Errorf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text type-logger=v
63+
klog.Exitf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text type-logger=v
64+
klog.Fatalf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text type-logger=v
65+
klog.Infof("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text type-logger=v
66+
klog.Warningf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text type-logger=v
6767
}

Diff for: go/ql/test/library-tests/semmle/go/concepts/LoggerCall/logrus.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ func logrusCalls() {
3434
logrus.FatalFn(fn) // $ logger=fn
3535

3636
// components corresponding to the format specifier "%T" are not considered vulnerable
37-
logrus.Infof("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text
38-
logrus.Fatalf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text
37+
logrus.Infof("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text type-logger=v
38+
logrus.Fatalf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text type-logger=v
3939
}

Diff for: go/ql/test/library-tests/semmle/go/concepts/LoggerCall/stdlib.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ func stdlib() {
1818
logger.Println(text) // $ logger=text
1919

2020
// components corresponding to the format specifier "%T" are not considered vulnerable
21-
logger.Fatalf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text
22-
logger.Panicf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text
23-
logger.Printf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text
21+
logger.Fatalf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text type-logger=v
22+
logger.Panicf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text type-logger=v
23+
logger.Printf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text type-logger=v
2424

2525
log.SetPrefix("prefix: ")
2626
log.Fatal(text) // $ logger=text
@@ -34,7 +34,7 @@ func stdlib() {
3434
log.Println(text) // $ logger=text
3535

3636
// components corresponding to the format specifier "%T" are not considered vulnerable
37-
log.Fatalf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text
38-
log.Panicf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text
39-
log.Printf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text
37+
log.Fatalf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text type-logger=v
38+
log.Panicf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text type-logger=v
39+
log.Printf("%s: found type %T", text, v) // $ logger="%s: found type %T" logger=text type-logger=v
4040
}

0 commit comments

Comments
 (0)