diff options
| author | Kubernetes Prow Robot <k8s-ci-robot@users.noreply.github.com> | 2019-07-28 15:27:53 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-28 15:27:53 -0700 |
| commit | 5c65f0bcaa3c1206804d53b094448a1e0f2a89e3 (patch) | |
| tree | 32abc43a6798dc3e1602f5f478573f3099849bec /hack | |
| parent | b54798bdeb2afd80f836753384b6b9905cca4b93 (diff) | |
| parent | 91632198e4a71da70ab1448ef895cf2e77b59e75 (diff) | |
Merge pull request #3934 from cblecker/delete-vendor
Use modules exclusively; delete vendor
Diffstat (limited to 'hack')
| -rwxr-xr-x | hack/verify-spelling.sh | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/hack/verify-spelling.sh b/hack/verify-spelling.sh index 1831f8ba..f615a323 100755 --- a/hack/verify-spelling.sh +++ b/hack/verify-spelling.sh @@ -19,19 +19,15 @@ set -o nounset set -o pipefail export KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. +export GO111MODULE=on +export GOPROXY="${GOPROXY:-https://proxy.golang.org}" -# Install tools we need, but only from vendor/... -cd ${KUBE_ROOT} -go install ./vendor/github.com/client9/misspell/cmd/misspell -if ! which misspell >/dev/null 2>&1; then - echo "Can't find misspell - is your GOPATH 'bin' in your PATH?" >&2 - echo " GOPATH: ${GOPATH}" >&2 - echo " PATH: ${PATH}" >&2 - exit 1 -fi +# Pick out version of misspell from go.mod +go mod download +misspell="$(go list -m -f '{{.Dir}}' github.com/client9/misspell)" # Spell checking # All the skipping files are defined in hack/.spelling_failures skipping_file="${KUBE_ROOT}/hack/.spelling_failures" failing_packages=$(echo `cat ${skipping_file}` | sed "s| | -e |g") -git ls-files | grep -v -e ${failing_packages} | xargs misspell -i "" -error -o stderr +git ls-files | grep -v -e ${failing_packages} | xargs go run "${misspell}/cmd/misspell" -i "" -error -o stderr |
