podman/hack
W. Trevor King 7a5c376e63 Makefile: Use 'git diff' to show gofmt changes
This makes fixing errors easier.  Before this commit, errors looked
like [1]:

  $ make gofmt
  libpod/container_linux.go:1:⚠️ file is not gofmted with -s (gofmt)
  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/libpod/container_internal.go b/libpod/container_internal.go
  index df4de3fe..22b39870 100644
  --- a/libpod/container_internal.go
  +++ b/libpod/container_internal.go
  @@ -1,7 +1,7 @@
   package libpod

   import (
  -"bytes"
  +       "bytes"
          "context"
          "encoding/json"
          "fmt"
  make: *** [Makefile:87: 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>

Closes: #1038
Approved by: rhatdan
2018-07-03 10:39:54 +00:00
..
btrfs_installed_tag.sh Initial checkin from CRI-O repo 2017-11-01 11:24:59 -04:00
btrfs_tag.sh Initial checkin from CRI-O repo 2017-11-01 11:24:59 -04:00
libdm_tag.sh Initial checkin from CRI-O repo 2017-11-01 11:24:59 -04:00
ostree_tag.sh hack/ostree_tag.sh: Fill in OSTree dependencies 2018-06-18 19:16:08 +00:00
release.sh hack/release.sh: Add a guard against -dev suffixes for argv[2] 2018-06-10 10:51:11 +00:00
selinux_tag.sh Initial checkin from CRI-O repo 2017-11-01 11:24:59 -04:00