mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
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>
This commit is contained in:
9
.presubmit/import-testing
Executable file
9
.presubmit/import-testing
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user