File: check-fmt.sh

package info (click to toggle)
golang-github-zorkian-go-datadog-api 2.30.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,612 kB
  • sloc: makefile: 28; sh: 13
file content (9 lines) | stat: -rwxr-xr-x 241 bytes parent folder | download
1
2
3
4
5
6
7
8
9
#!/usr/bin/env bash

diff -u <(echo -n) <(gofmt -s -d $(find . -name '*.go' | grep -v vendor))

# See if contents have changed and error if they have
if [[ $? != 0 ]] ; then
    echo "Did you run 'make fmt' before committing?"
    exit 1
fi