Initial Commit

This commit is contained in:
Gavin Bunney
2019-10-08 10:12:21 -07:00
commit 1251ea9a0b
17 changed files with 1647 additions and 0 deletions

24
scripts/errcheck.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# Check gofmt
echo "==> Checking for unchecked errors..."
if ! which errcheck > /dev/null; then
echo "==> Installing errcheck..."
go get -u github.com/kisielk/errcheck
fi
err_files=$(errcheck -ignoretests \
-ignore 'github.com/hashicorp/terraform/helper/schema:Set' \
-ignore 'bytes:.*' \
-ignore 'io:Close|Write' \
$(go list ./...| grep -v /vendor/))
if [[ -n ${err_files} ]]; then
echo 'Unchecked errors found in the following places:'
echo "${err_files}"
echo "Please handle returned errors. You can check directly with \`make errcheck\`"
exit 1
fi
exit 0