test: Improve govet log newline check

We don't match for log.Fatalf but we shouldn't really be using that.
This commit is contained in:
James Shubin
2019-03-01 12:17:27 -05:00
parent 4f4091a9bd
commit 5e58251026

View File

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