Skip to content

Commit a65ba5f

Browse files
authored
Merge pull request kubernetes#72255 from krzyzacy/get-golint
Vendor golint in k/k, and use the vendor version in verify-golint check
2 parents fcdc365 + 6b7ccc9 commit a65ba5f

File tree

27 files changed

+5766
-19
lines changed

27 files changed

+5766
-19
lines changed

Godeps/Godeps.json

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Godeps/LICENSES

Lines changed: 140 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hack/godep-save.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ REQUIRED_BINS=(
6363
"github.com/bazelbuild/bazel-gazelle/cmd/gazelle"
6464
"github.com/kubernetes/repo-infra/kazel"
6565
"k8s.io/kube-openapi/cmd/openapi-gen"
66+
"golang.org/x/lint/golint"
6667
"./..."
6768
)
6869

hack/verify-golint.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,15 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
2323

2424
kube::golang::verify_go_version
2525

26-
if ! which golint > /dev/null; then
27-
echo 'Can not find golint, install with:'
28-
echo 'go get -u golang.org/x/lint/golint'
29-
exit 1
30-
fi
26+
27+
# Ensure that we find the binaries we build before anything else.
28+
export GOBIN="${KUBE_OUTPUT_BINPATH}"
29+
PATH="${GOBIN}:${PATH}"
30+
31+
# Install golint from vendor
32+
echo 'installing golint from vendor'
33+
go install k8s.io/kubernetes/vendor/golang.org/x/lint/golint
34+
3135

3236
cd "${KUBE_ROOT}"
3337

vendor/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ filegroup(
390390
"//vendor/golang.org/x/crypto/poly1305:all-srcs",
391391
"//vendor/golang.org/x/crypto/salsa20/salsa:all-srcs",
392392
"//vendor/golang.org/x/crypto/ssh:all-srcs",
393+
"//vendor/golang.org/x/lint:all-srcs",
393394
"//vendor/golang.org/x/net/context:all-srcs",
394395
"//vendor/golang.org/x/net/html:all-srcs",
395396
"//vendor/golang.org/x/net/http2:all-srcs",
@@ -417,6 +418,8 @@ filegroup(
417418
"//vendor/golang.org/x/tools/benchmark/parse:all-srcs",
418419
"//vendor/golang.org/x/tools/container/intsets:all-srcs",
419420
"//vendor/golang.org/x/tools/go/ast/astutil:all-srcs",
421+
"//vendor/golang.org/x/tools/go/gcexportdata:all-srcs",
422+
"//vendor/golang.org/x/tools/go/gcimporter15:all-srcs",
420423
"//vendor/golang.org/x/tools/go/vcs:all-srcs",
421424
"//vendor/golang.org/x/tools/imports:all-srcs",
422425
"//vendor/gonum.org/v1/gonum/blas:all-srcs",

vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/BUILD

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/gen/BUILD

Lines changed: 0 additions & 13 deletions
This file was deleted.

vendor/golang.org/x/lint/.travis.yml

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/lint/BUILD

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/lint/CONTRIBUTING.md

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)