From 50b96564f52079f68c7546f7ae1a5c7597f4a5d4 Mon Sep 17 00:00:00 2001 From: Eric Chiang Date: Wed, 24 Oct 2018 14:16:49 -0700 Subject: [PATCH] *: vendor golint to prevent upstream changes from breaking the build golint has updated or dropped support for old Go versions several times, causing breaks in our build. Vendor it locally to prevent this. --- .travis.yml | 1 - Makefile | 7 +++++-- glide.lock | 14 ++++++++++++-- glide.yaml | 13 +++++++++++++ 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9b68aa03..934e32e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,6 @@ env: - DEX_POSTGRES_DATABASE=postgres DEX_POSTGRES_USER=postgres DEX_POSTGRES_HOST="localhost" DEX_ETCD_ENDPOINTS=http://localhost:2379 DEX_LDAP_TESTS=1 DEBIAN_FRONTEND=noninteractive install: - - go get -u golang.org/x/lint/golint - sudo -E apt-get install -y --force-yes slapd time ldap-utils - sudo /etc/init.d/slapd stop - docker run -d --net=host gcr.io/etcd-development/etcd:v3.2.9 diff --git a/Makefile b/Makefile index 4a9dfbf7..f2b2dde2 100644 --- a/Makefile +++ b/Makefile @@ -51,9 +51,9 @@ vet: fmt: @./scripts/gofmt $(shell go list ./... | grep -v '/vendor/') -lint: +lint: bin/golint @for package in $(shell go list ./... | grep -v '/vendor/' | grep -v '/api' | grep -v '/server/internal'); do \ - golint -set_exit_status $$package $$i || exit 1; \ + ./bin/golint -set_exit_status $$package $$i || exit 1; \ done .PHONY: docker-image @@ -75,6 +75,9 @@ bin/protoc: scripts/get-protoc bin/protoc-gen-go: @go install -v $(REPO_PATH)/vendor/github.com/golang/protobuf/protoc-gen-go +bin/golint: + @go install -v $(REPO_PATH)/vendor/golang.org/x/lint/golint + clean: @rm -rf bin/ diff --git a/glide.lock b/glide.lock index d646231b..74ce7428 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: 12d0ad2fc0df4ab221e45c1ba7821708b908033c82741e250cc46dcd445b67eb -updated: 2018-09-30T14:07:57.901347233-04:00 +hash: fe29de07f5c1580c51de0e78796bce522d933602d88a4c397b586bd88ca7ca76 +updated: 2018-10-24T14:58:32.448481302-07:00 imports: - name: github.com/beevik/etree version: 4cd0dd976db869f817248477718071a28e978df0 @@ -111,6 +111,10 @@ imports: - ed25519 - ed25519/internal/edwards25519 - pbkdf2 +- name: golang.org/x/lint + version: 1baf3a9d7d675b3c7e974b7a00ded54b88a88379 + subpackages: + - golint - name: golang.org/x/net version: 5602c733f70afc6dcec6766be0d5034d4c4f14de subpackages: @@ -138,6 +142,12 @@ imports: - transform - unicode/bidi - unicode/norm +- name: golang.org/x/tools + version: a2dc47679d30b6c496245bafc6a166b46c5fe318 + subpackages: + - go/ast/astutil + - go/gcexportdata + - go/internal/gcimporter - name: google.golang.org/appengine version: 267c27e7492265b84fc6719503b14a1e17975d79 subpackages: diff --git a/glide.yaml b/glide.yaml index bde92ea2..efe8ac3b 100644 --- a/glide.yaml +++ b/glide.yaml @@ -97,6 +97,19 @@ import: - diff - pretty +# Changes to golint have broken our build enough that it's worth vendoring. +- package: golang.org/x/lint + version: 1baf3a9d7d675b3c7e974b7a00ded54b88a88379 + subpackages: + - golint +- package: golang.org/x/tools + version: a2dc47679d30b6c496245bafc6a166b46c5fe318 + subpackages: + - go/ast/astutil + - go/gcexportdata + - go/internal/gcimporter + + # SQL drivers - package: github.com/mattn/go-sqlite3 version: 3fb7a0e792edd47bf0cf1e919dfc14e2be412e15