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:
@@ -72,7 +72,7 @@ done
|
|||||||
|
|
||||||
# loop through individual *.go files
|
# loop through individual *.go files
|
||||||
for file in `find . -maxdepth 3 -type f -name '*.go' -not -path './old/*' -not -path './tmp/*'`; do
|
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 simplify-gocase "$file"
|
||||||
run-test token-coloncheck "$file"
|
run-test token-coloncheck "$file"
|
||||||
run-test naked-error "$file"
|
run-test naked-error "$file"
|
||||||
|
|||||||
Reference in New Issue
Block a user