Call goimports as well as gofmt when doing a `make fmt` (#7148)

Closes #7147
This commit is contained in:
Jeff Mitchell 2019-07-18 21:04:56 -04:00 committed by GitHub
parent 6acaa8a288
commit 7b8c0b58f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 4 deletions

View File

@ -12,7 +12,7 @@ EXTERNAL_TOOLS=\
github.com/mitchellh/gox \
github.com/kardianos/govendor \
github.com/client9/misspell/cmd/misspell
GOFMT_FILES?=$$(find . -name '*.go' | grep -v vendor)
GOFMT_FILES?=$$(find . -name '*.go' | grep -v pb.go | grep -v vendor)
GO_VERSION_MIN=1.11
CGO_ENABLED?=0
@ -194,6 +194,7 @@ fmtcheck:
#@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"
fmt:
goimports -w $(GOFMT_FILES)
gofmt -w $(GOFMT_FILES)
assetcheck:

View File

@ -5,11 +5,12 @@ import (
"crypto/sha256"
"encoding/json"
"fmt"
"github.com/go-test/deep"
"reflect"
"testing"
"time"
"github.com/go-test/deep"
"github.com/hashicorp/vault/sdk/helper/certutil"
"github.com/hashicorp/vault/sdk/helper/salt"
"github.com/hashicorp/vault/sdk/helper/wrapping"

View File

@ -7,11 +7,12 @@ import (
"encoding/base64"
"encoding/pem"
"fmt"
"github.com/hashicorp/vault/sdk/helper/certutil"
"reflect"
"strings"
"time"
"github.com/hashicorp/vault/sdk/helper/certutil"
"github.com/hashicorp/errwrap"
"github.com/hashicorp/vault/sdk/framework"
"github.com/hashicorp/vault/sdk/helper/errutil"

View File

@ -4,11 +4,12 @@ import (
"bytes"
"encoding/json"
"fmt"
"strings"
"github.com/armon/go-metrics"
"github.com/hashicorp/vault/sdk/logical"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/expfmt"
"strings"
)
const (

View File

@ -8,6 +8,7 @@ import (
"io/ioutil"
"os"
"testing"
"time"
"github.com/hashicorp/errwrap"
log "github.com/hashicorp/go-hclog"