From 5e582510269569897504aca460dda44fb9073997 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Fri, 1 Mar 2019 12:17:27 -0500 Subject: [PATCH] test: Improve govet log newline check We don't match for log.Fatalf but we shouldn't really be using that. --- test/test-govet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-govet.sh b/test/test-govet.sh index 91b4364f..4865d8fe 100755 --- a/test/test-govet.sh +++ b/test/test-govet.sh @@ -72,7 +72,7 @@ done # loop through individual *.go files for file in `find . -maxdepth 3 -type f -name '*.go' -not -path './old/*' -not -path './tmp/*'`; do - run-test grep 'log.' "$file" | grep '\\n"' && fail_test 'no newline needed in log.Printf()' # no \n needed in log.Printf() + run-test grep 'log.Print' "$file" | grep '\\n"' && fail_test 'no newline needed in log.Print*()' # no \n needed in log.Printf or log.Println run-test simplify-gocase "$file" run-test token-coloncheck "$file" run-test naked-error "$file"