0
0
mirror of https://github.com/thegeeklab/git-sv.git synced 2024-11-21 22:10:39 +00:00

refactor: fix printf-like lint

This commit is contained in:
Beatriz Vieira 2021-07-31 16:37:15 -03:00
parent dcba256903
commit 77152fcd52
2 changed files with 4 additions and 4 deletions

View File

@ -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 == "" {

View File

@ -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...)
}