diff --git a/hound.go b/hound.go index babc93a..9561cc2 100644 --- a/hound.go +++ b/hound.go @@ -67,14 +67,14 @@ func (h *Hound) Sniff(fileName string, hunk *diff.Hunk, warnc chan string, failc if pattern, warned := h.MatchPatterns(h.Warns, line); warned { msg := color.YellowString(fmt.Sprintf( - "Warning: pattern `%s` match found for `%s` starting at line %d in %s\n", + "warning: pattern `%s` match found for `%s` starting at line %d in %s\n", pattern, line, hunk.NewStartLine, fileName)) warnc <- msg } if pattern, failed := h.MatchPatterns(h.Fails, line); failed { msg := color.RedString(fmt.Sprintf( - "Failure: pattern `%s` match found for `%s` starting at line %d in %s\n", + "failure: pattern `%s` match found for `%s` starting at line %d in %s\n", pattern, line, hunk.NewStartLine, fileName)) failc <- errors.New(msg) } diff --git a/hound_test.go b/hound_test.go index efafc70..0c04adf 100644 --- a/hound_test.go +++ b/hound_test.go @@ -101,7 +101,7 @@ index 000000..000000 000000 warnc := make(chan string) failc := make(chan error) donec := make(chan bool) - + go hound.Sniff(fileName, hunk, warnc, failc, donec) select { diff --git a/main.go b/main.go index 089ee24..b350ac8 100644 --- a/main.go +++ b/main.go @@ -66,7 +66,7 @@ func main() { } if failCount > 0 { - fmt.Printf("%d failures detected. Please fix them before you can commit.\n", failCount) + fmt.Printf("%d failures detected - please fix them before you can commit.\n", failCount) os.Exit(1) } }