From 019310abd323b17b630725934bce3cd08ab6ea72 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Fri, 8 Sep 2023 12:21:47 +0200 Subject: pkg/bisect: validate log() arguments I couldn't manage to add "pkg/bisect.env.log" to "govet"."settings"."printf"."funcs", so let's use another way suggested by govet documentation. Fix one instance of invalid arguments. --- pkg/bisect/bisect.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pkg/bisect') diff --git a/pkg/bisect/bisect.go b/pkg/bisect/bisect.go index 8d83b0737..270668e05 100644 --- a/pkg/bisect/bisect.go +++ b/pkg/bisect/bisect.go @@ -519,7 +519,7 @@ func (env *env) commitRangeForCause() (*vcs.Commit, *vcs.Commit, []*testResult, return nil, nil, nil, fmt.Errorf("no release tags before this commit") } pickedTags := pickReleaseTags(tags) - env.log("picked %d out of %d release tags", pickedTags) + env.log("picked %v out of %d release tags", pickedTags, len(tags)) lastBad := env.commit var results []*testResult @@ -1035,6 +1035,9 @@ func checkConfig(cfg *Config) error { } func (env *env) log(msg string, args ...interface{}) { + if false { + _ = fmt.Sprintf(msg, args...) // enable printf checker + } env.cfg.Trace.Log(msg, args...) } -- cgit mrf-deployment