From 1bd0205e4929efbd264c5a099d52e4f6c6a23bce Mon Sep 17 00:00:00 2001 From: James Bardin Date: Mon, 12 Jun 2017 10:54:04 -0400 Subject: [PATCH] remove errcheck The existing harness was only for aws, which fails now that aws is gone. --- Makefile | 7 ++----- scripts/errcheck.sh | 25 ------------------------- 2 files changed, 2 insertions(+), 30 deletions(-) delete mode 100755 scripts/errcheck.sh diff --git a/Makefile b/Makefile index 0eba369dc..984c5d85f 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ plugin-dev: generate mv $(GOPATH)/bin/$(PLUGIN) $(GOPATH)/bin/terraform-$(PLUGIN) # test runs the unit tests -test: fmtcheck errcheck generate +test: fmtcheck generate go test -i $(TEST) || exit 1 echo $(TEST) | \ xargs -t -n4 go test $(TESTARGS) -timeout=60s -parallel=4 @@ -98,9 +98,6 @@ fmt: fmtcheck: @sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'" -errcheck: - @sh -c "'$(CURDIR)/scripts/errcheck.sh'" - vendor-status: @govendor status @@ -109,4 +106,4 @@ vendor-status: # under parallel conditions. .NOTPARALLEL: -.PHONY: bin core-dev core-test cover default dev errcheck fmt fmtcheck generate plugin-dev quickdev test-compile test testacc testrace tools vendor-status vet +.PHONY: bin core-dev core-test cover default dev fmt fmtcheck generate plugin-dev quickdev test-compile test testacc testrace tools vendor-status vet diff --git a/scripts/errcheck.sh b/scripts/errcheck.sh deleted file mode 100755 index 6c7ea99d2..000000000 --- a/scripts/errcheck.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash - -# Check gofmt -echo "==> Checking AWS provider for unchecked errors..." -echo "==> NOTE: at this time we only look for uncheck errors in the AWS package" - -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' \ - ./builtin/providers/aws/...) - -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