coredns/.presubmit/import-testing
Yong Tang ef8cb40688 Add presubmit to check if there are any files that have import "testing" (#2480)
The check is done through
```
if [[ $(go list -f '{{ join .Deps " "}}') == *" testing "* ]]; then
   error..
fi
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-01-21 07:36:46 +00:00

9 lines
257 B
Bash
Executable file

#!/bin/bash
echo "** presubmit/$(basename $0)"
# Check to make sure "testing" is not imported
if [[ $(go list -f '{{ join .Deps " "}}') == *" testing "* ]]; then
echo "** presubmit/$(basename $0): please remove any 'import \"testing\"'"
exit 1
fi