github.com/skyscape-cloud-services/terraform@v0.9.2-0.20170609144644-7ece028a1747/scripts/errcheck.sh (about) 1 #!/usr/bin/env bash 2 3 # Check gofmt 4 echo "==> Checking AWS provider for unchecked errors..." 5 echo "==> NOTE: at this time we only look for uncheck errors in the AWS package" 6 7 if ! which errcheck > /dev/null; then 8 echo "==> Installing errcheck..." 9 go get -u github.com/kisielk/errcheck 10 fi 11 12 err_files=$(errcheck -ignoretests -ignore \ 13 'github.com/hashicorp/terraform/helper/schema:Set' \ 14 -ignore 'bytes:.*' \ 15 -ignore 'io:Close|Write' \ 16 ./builtin/providers/aws/...) 17 18 if [[ -n ${err_files} ]]; then 19 echo 'Unchecked errors found in the following places:' 20 echo "${err_files}" 21 echo "Please handle returned errors. You can check directly with \`make errcheck\`" 22 exit 1 23 fi 24 25 exit 0