Commit Graph

8 Commits

Author SHA1 Message Date
Alyx
14b0792bf7 Update shebangs for environmentally finding Bash -- Compatibility update to provide support for platforms that do not ship Bash in their /bin (#2841) 2019-05-27 10:45:38 +01:00
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
Miek Gieben
6e1c02c4ac Make presubmit actually fail the build (#2013)
The exit code wasn't properly acted upon in the makefile.
Make filename-hyphen actually return an non-zero exit code.

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-07-29 23:41:52 -07:00
Miek Gieben
4083852b70 Remove trailing whitespace (#1955)
Prevent future; "remove trailing whitespace" PR, but adding a simple
presubmit that checks for this.

This presubmit flagged quite some offenders, remove all trailing
whitespace from. Apart from that there aren't any other changes.

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-07-09 08:08:02 -04:00
Miek Gieben
22c0b30d5f presubmit: Check errorf as well (#1845)
Uppercase all these test errors as well. And extend the presubmit to
check for these in the future. Also do a slightly smarter grep to only
get t.<something>. as (because dump regexp) this also grep over non test
files.
2018-06-02 11:48:39 -07:00
Miek Gieben
3994d3a5a7 Add presubmit check for hyphens in filenames. (#1847)
No other fixes; this only adds the check.
2018-06-01 13:25:36 -07:00
Miek Gieben
643550eabe presubmit: check for uppercase (#1774)
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.
2018-05-07 23:47:25 +02:00
Miek Gieben
c9b5cedbe9 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
2018-04-23 08:45:49 -07:00