Commit Graph

39 Commits (c3fd33a18d695096478b641e59c12293c1db0cb7)

Author SHA1 Message Date
Tim Hockin efa76b72ae Run the build once during presubmit 2015-07-02 14:43:43 -07:00
nikhiljindal a89d2da249 Adding a script to verify that swagger spec is updated 2015-06-08 04:04:57 -07:00
Wojciech Tyczynski 33318f0162 Use generated DeepCopy methods. 2015-05-28 09:03:27 +02:00
Jeff Lowdermilk 3cf4d9b2e6 Delete fails on notfound errors.
If deleting multiple resources, command will continue on error and
report not found resources at the end.
2015-05-27 16:02:54 -07:00
Wojciech Tyczynski 2df11cea32 Automatically generate conversions 2015-05-20 17:11:18 +02:00
Tim Hockin 4e9d3f7700 Use color in pre-commit 2015-05-13 12:59:04 -07:00
Tim Hockin d0b2a418db Make git hooks print more nicely 2015-05-13 12:50:25 -07:00
Tim Hockin f11ba4a1b5 Switch git hooks to use pre-commit 2015-05-13 12:50:25 -07:00
Eric Paris b7365ccace Check if people copy, but do not update the boilerplate
We found in that someone just copied/pasted the boilerplate language into
their code. But the boilerplate contains 2014, not 2015. We have 2 ways
to fix this.

1) Update the boilerplate to 2015 so people would get the right one.
2) Update the boilerplate so it doesn't make sense and then warn when
people use it.

This PR takes the second option. While options #1 seems easier, it will
get wrong in 2016, 17, 18 and it's unlikely anyone remember why they
need to update the boilerplate text and the regex rewrite. So just
make the humans do a tiny bit more work now.
2015-05-12 21:26:44 -04:00
Eric Paris 71d54198ed Spelll extension gooder 2015-05-08 19:19:33 -04:00
Eric Paris b503214fee Fix boilerplate check crash if .go file has no comments
Clayton pointed out that if he created a file with no /* in it anywhere
the boilerplate logic would crash like:

$ hack/verify-boilerplate.sh
Traceback (most recent call last):
  File "hack/../hooks/boilerplate.py", line 87, in <module>
    sys.exit(main())
  File "hack/../hooks/boilerplate.py", line 83, in main
    if not file_passes(filename, extention, ref, p):
  File "hack/../hooks/boilerplate.py", line 38, in file_passes
    while data[0] != "/*\n":
IndexError: list index out of range

That is because we were just stripping everything before the first line
that contained exacly "/*".  If no such line existed it got to the end
and just kept going.

This does something smarter. We use a regex to look for one or more
lines which start // +build followed by a single newline and remove only
those.  This obviously found one place where the package name was above
the license and was being missed by both the old and the new checker.

It also fixed the python spew and just tells you your file fails.
2015-05-08 17:30:40 -04:00
Eric Paris c9cd50dc49 Check python files for valid license boilerplate 2015-05-04 18:37:47 -04:00
Eric Paris f4d0b8df3a Do all boilerplate checks in 1 python call
It's just a little bit faster.....

BEFORE:
$ time hack/verify-boilerplate.sh

real	0m9.378s
user	0m3.405s
sys	0m13.906s

AFTER:
$ time hack/verify-boilerplate.sh

real	0m0.181s
user	0m0.114s
sys	0m0.068s
2015-05-01 20:46:57 -04:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Eric Paris ddca8248fe Check v1beta3 description on git commit
v1beta3 is no longer a special little snowflake
2015-05-01 14:10:50 -04:00
nikhiljindal 7c99865c94 Fixing hooks/description to catch API fields without description tags 2015-04-28 18:32:15 -07:00
Vishnu Kannan 17446061b0 Turn on "description:" verification for v1beta3 API. 2015-03-06 23:53:35 +00:00
Tim Hockin 60e7002474 Fix errant error message from boilerplate check 2015-01-19 14:23:24 -08:00
Fumitoshi Ukai 54f498acd5 cloudprovider/gce: use golang.org/x/oauth2
code.google.com/p/goauth2 is deprecated.
use golang.org/x/oauth2 instead.

hooks/prepare-commit-msg ignore Godeps
for sh's boilerplate check.
2015-01-16 12:17:52 +09:00
Brendan Burns dc0d197c40 Fix a path in the error message. 2015-01-15 14:06:48 -08:00
Brendan Burns 718a563b1f Add a gendocs pre-submit hook. 2015-01-15 09:52:51 -08:00
Dawn Chen 9e99f9953a Fix the boilerplate issue for header with "Copyright 2015". 2015-01-05 13:27:30 -08:00
Brian Grant 2ac8400cb2 Add API documentation pre-commit hook. 2014-11-20 20:25:44 +00:00
Sam Ghods 98c3a00233 Adding files to Godeps should not trigger gofmt or boilerplate warnings 2014-09-03 17:00:30 -07:00
Clayton Coleman 693051c1ca Boilerplate should ignore Go build tags 2014-08-23 11:44:21 -04:00
derekwaynecarr 8c07a0f524 Fix verify-boilerplate 2014-08-15 13:12:01 -05:00
Daniel Smith 260af3017b Make boilerplate hook work for .sh files, too. 2014-06-25 17:11:48 -07:00
Daniel Smith e4c47f0219 Merge pull request #231 from brendandburns/hooks
Fixed the boilerplate hook to work on OS X, where apparently wc add's spaces
2014-06-24 15:12:25 -07:00
Daniel Smith 4f81008ab9 Merge pull request #230 from thockin/cleanups
Slightly friendlier pre-commit errors.
2014-06-24 15:11:08 -07:00
Brendan Burns 2c404aba0f Fixed the boilerplate hook to work on OS X, where apparently wc add's spaces 2014-06-24 15:02:48 -07:00
Tim Hockin b6d5faf276 Slightly friendlier pre-commit errors.
Make the pre-commit check spit out cut-and-paste commands and be more
obvious about errors.  Tested by making an invalid change and observing the
message generated.
2014-06-24 15:01:08 -07:00
Brendan Burns 20ba523266 Remove an erroneous debug statement. 2014-06-24 13:23:58 -07:00
Brendan Burns 5756189f0d Added a proxy server to cloudcfg 2014-06-24 11:15:08 -07:00
Daniel Smith 756ba6958d Add boilerplate checking to hook 2014-06-23 12:00:16 -07:00
Joe Beda d230625e1a Move third_party code under third_party/src so it can be used in $GOPATH. 2014-06-13 17:15:49 -07:00
Daniel Smith 701c34f701 Forgot to actually add -s to the gofmt call in the hook. 2014-06-12 22:03:00 -07:00
Daniel Smith 2328cad18b Improved commit hook 2014-06-12 21:23:04 -07:00
Daniel Smith 078451053b gofmt -s && change gofmt reminder to specify -s in prepare-commit-msg 2014-06-12 17:25:46 -07:00
Joe Beda 2c4b3a562c First commit 2014-06-06 16:40:48 -07:00