test: Catch capitalized error messages in tests

This commit is contained in:
James Shubin
2019-08-24 01:08:33 -04:00
parent f1eedc7a01
commit 87572e8922
9 changed files with 95 additions and 95 deletions

View File

@@ -58,7 +58,7 @@ function lowercase-errors() {
if grep -E 'errors\.New\(\"[A-Z]' "$1"; then
return 1
fi
if grep -E 'fmt\.Errorf\(\"[A-Z]' "$1"; then
if grep -E 't\.Errorf\(\"[A-Z]' "$1"; then # t.Errorf or fmt.Errorf
return 1
fi
# TODO: add errwrap.Wrap* related matching