aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/stretchr/testify/.ci.gofmt.sh
blob: 3f2e5d329fe8acf2e6d5253e670e39a76e244578 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

if [ -n "$(gofmt -l .)" ]; then
  echo "Go code is not formatted:"
  gofmt -d .
  exit 1
fi

go generate ./...
if [ -n "$(git status -s -uno)" ]; then
  echo "Go generate output does not match commit."
  echo "Did you forget to run go generate ./... ?"
  exit 1
fi