Skip to content

Commit

Permalink
analyzer: bail out early if sprintf1 is false
Browse files Browse the repository at this point in the history
  • Loading branch information
catenacyber committed Nov 29, 2023
1 parent 06b78c0 commit cbf57a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions analyzer/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ func (n *perfSprint) run(pass *analysis.Pass) (interface{}, error) {
fn = "fmt.Sprintf"
verb = "%s"
value = call.Args[0]
} else {
return
}

case calledObj == fmtSprintfObj && len(call.Args) == 2:
Expand Down

0 comments on commit cbf57a6

Please sign in to comment.