]> git.immae.eu Git - github/fretlink/terraform-provider-mailgun.git/blame - scripts/gofmtcheck.sh
add shellcheck to the makeffile and .travis.yml and fix the scripts to have no error...
[github/fretlink/terraform-provider-mailgun.git] / scripts / gofmtcheck.sh
CommitLineData
e17f219a
AG
1#!/usr/bin/env bash
2
3# Check gofmt
4echo "==> Checking that code complies with gofmt requirements..."
065bf5d7 5gofmt_files=$(gofmt -l "$(find . -name '*.go' | grep -v vendor)")
e17f219a
AG
6if [[ -n ${gofmt_files} ]]; then
7 echo 'gofmt needs running on the following files:'
8 echo "${gofmt_files}"
9 echo "You can use the command: \`make fmt\` to reformat code."
10 exit 1
11fi
12
13exit 0