cri-o/hack
W. Trevor King 8dbc2d1fff Makefile: Use 'git diff' to show gofmt changes
This makes fixing errors easier.  Before this commit, errors looked
like [1]:

  $ make gofmt
  !!! 'gofmt -s' needs to be run on the following files:
  ./lib/config.go
  make: *** [gofmt] Error 1

But that's not very helpful when your local gofmt thinks the file is
fine.  With this commit, errors will look like:

  $ make gofmt
  find . -name '*.go' ! -path './vendor/*' -exec gofmt -s -w {} \+
  git diff --exit-code
  diff --git a/lib/config.go b/lib/config.go
  index 1acca8c7..6a63b2b0 100644
  --- a/lib/config.go
  +++ b/lib/config.go
  @@ -2,7 +2,7 @@ package lib

   import (
          "bytes"
  -"io/ioutil"
  +       "io/ioutil"

          "github.com/BurntSushi/toml"
          "github.com/kubernetes-incubator/cri-o/oci"
  make: *** [Makefile:68: gofmt] Error 1

(or whatever, I just stuffed in a formatting error for demonstration
purposes).

Also remove the helper script in favor of direct Makefile calls,
because with Git handling difference reporting and exit status, this
becomes a simpler check.  find's -exec, !, and -path arguments are
specified in POSIX [2].

[1]: https://travis-ci.org/kubernetes-incubator/cri-o/jobs/331949394#L1075
[2]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-01-22 16:47:09 -08:00
..
validate drop crioctl source code 2017-11-29 21:07:50 +08:00
btrfs_installed_tag.sh Skip building btrfs support if library isn't installed 2017-10-03 13:18:36 -07:00
btrfs_tag.sh Add build tags for integration tests 2016-12-19 11:44:32 -05:00
find-godeps.sh Fix bug in find-godeps 2017-07-19 16:49:22 -04:00
libdm_installed.sh hack/libdm_installed: Add a test for libdevmapper.h 2018-01-19 11:43:24 -08:00
libdm_no_deferred_remove_tag.sh hack/libdm_installed: Add a test for libdevmapper.h 2018-01-19 11:43:24 -08:00
ostree_tag.sh Change buildtags based on installed environment. 2017-10-19 17:34:24 +00:00
selinux_tag.sh Change buildtags based on installed environment. 2017-10-19 17:34:24 +00:00