test: Catch capitalized error messages in tests
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user