diff options
author | 2018-04-23 16:45:49 +0100 | |
---|---|---|
committer | 2018-04-23 08:45:49 -0700 | |
commit | c9b5cedbe9f103862c2ff519c7c491f5373a75e6 (patch) | |
tree | 79f2eb36bdcf27757ad866c329c11806db22e110 /.presubmit | |
parent | 582f91f3f3aa0b956c152b72ad9c95b8f597a2b0 (diff) | |
download | coredns-c9b5cedbe9f103862c2ff519c7c491f5373a75e6.tar.gz coredns-c9b5cedbe9f103862c2ff519c7c491f5373a75e6.tar.zst coredns-c9b5cedbe9f103862c2ff519c7c491f5373a75e6.zip |
Presubmit (#1719)
* build: add presubmits
We didn't have a way to encode presubmit; with this hack we can just
run a bunch of script on the build; this allows us to automatically
capture things like using the wrong context and maybe other fluff.
This allows us to cut down on code reviews and just have the build fail.
* hook it up
* put presubmit in checks; so we do it for tests as well
* Add explicit exit 1 if things fails
Diffstat (limited to '.presubmit')
-rwxr-xr-x | .presubmit/context | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/.presubmit/context b/.presubmit/context new file mode 100755 index 000000000..b7d6ef971 --- /dev/null +++ b/.presubmit/context @@ -0,0 +1,8 @@ +#!/bin/bash + +echo "** presubmit/$(basename $0)" + +if grep -lr "golang.org/x/net/context" "$@"; then + echo "** presubmit/$(basename $0): please use std lib's 'context' instead" + exit 1 +fi |