aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/gofmtcheck.sh
diff options
context:
space:
mode:
authorAlexandre Garand <alexandre.garand@fretlink.com>2019-06-28 11:23:27 +0200
committerAlexandre Garand <alexandre.garand@fretlink.com>2019-06-28 11:23:27 +0200
commite17f219ab8ff104f73e3c0f7515a7bb437b03d56 (patch)
treede70594e9645a382a3a4cb4addec966e96bf71eb /scripts/gofmtcheck.sh
parente2966ba7a0ba5e3f87787f0a276ca5f7f6b21bd7 (diff)
downloadterraform-provider-mailgun-e17f219ab8ff104f73e3c0f7515a7bb437b03d56.tar.gz
terraform-provider-mailgun-e17f219ab8ff104f73e3c0f7515a7bb437b03d56.tar.zst
terraform-provider-mailgun-e17f219ab8ff104f73e3c0f7515a7bb437b03d56.zip
add provider without ressources and makefile
Diffstat (limited to 'scripts/gofmtcheck.sh')
-rwxr-xr-xscripts/gofmtcheck.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/gofmtcheck.sh b/scripts/gofmtcheck.sh
new file mode 100755
index 0000000..1c05581
--- /dev/null
+++ b/scripts/gofmtcheck.sh
@@ -0,0 +1,13 @@
1#!/usr/bin/env bash
2
3# Check gofmt
4echo "==> Checking that code complies with gofmt requirements..."
5gofmt_files=$(gofmt -l `find . -name '*.go' | grep -v vendor`)
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