mirror of
https://github.com/coredns/coredns.git
synced 2025-11-30 15:44:23 -05:00
Another thing we can test automatically, we sorta settled on using an uppercase letter in in t.Log and t.Fatal calls. Let's just check for this.
15 lines
463 B
Bash
Executable File
15 lines
463 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "** presubmit/$(basename $0)"
|
|
|
|
# Get the tests that call t.* without capitalizing the first char - seems we standardized on that.
|
|
if egrep -r 't\.Fatal.?\("[a-z]' "$@"; then
|
|
echo "** presubmit/$(basename $0): please start with an upper case letter when using t.Fatal*()"
|
|
exit 1
|
|
fi
|
|
|
|
if egrep -r 't\.Log.?\("[a-z]' "$@"; then
|
|
echo "** presubmit/$(basename $0): please start with an upper case letter when using t.Log*()"
|
|
exit 1
|
|
fi
|