From 77152fcd52c72578a032f6d48a6ded9e82dffe55 Mon Sep 17 00:00:00 2001 From: Beatriz Vieira Date: Sat, 31 Jul 2021 16:37:15 -0300 Subject: [PATCH] refactor: fix printf-like lint --- cmd/git-sv/handlers.go | 6 +++--- cmd/git-sv/log.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/git-sv/handlers.go b/cmd/git-sv/handlers.go index cd8c79b..90290eb 100644 --- a/cmd/git-sv/handlers.go +++ b/cmd/git-sv/handlers.go @@ -454,12 +454,12 @@ func validateCommitMessageHandler(git sv.Git, messageProcessor sv.MessageProcess detached, derr := git.IsDetached() if messageProcessor.SkipBranch(branch, derr == nil && detached) { - warn("commit message validation skipped, branch in ignore list or detached...") + warnf("commit message validation skipped, branch in ignore list or detached...") return nil } if source := c.String("source"); source == "merge" { - warn("commit message validation skipped, ignoring source: %s...", source) + warnf("commit message validation skipped, ignoring source: %s...", source) return nil } @@ -476,7 +476,7 @@ func validateCommitMessageHandler(git sv.Git, messageProcessor sv.MessageProcess msg, err := messageProcessor.Enhance(branch, commitMessage) if err != nil { - warn("could not enhance commit message, %s", err.Error()) + warnf("could not enhance commit message, %s", err.Error()) return nil } if msg == "" { diff --git a/cmd/git-sv/log.go b/cmd/git-sv/log.go index 932f7fb..69b0feb 100644 --- a/cmd/git-sv/log.go +++ b/cmd/git-sv/log.go @@ -2,6 +2,6 @@ package main import "fmt" -func warn(format string, values ...interface{}) { +func warnf(format string, values ...interface{}) { fmt.Printf("WARN: "+format+"\n", values...) }