Skip to content

Commit

Permalink
glide: Add tools.go and move to imports
Browse files Browse the repository at this point in the history
This moves tool dependencies to the `imports:` section of the
glide.yaml and adds a tools.go with blank imports of these dependencies.

This is needed to have all dependencies of these tools picked up
correcly. For example, BurntSushi/toml, which is now a dependency of
staticcheck, was not being picked up.

Note:
- kisielk/gotool was removed from the glide.yaml beacuse it wasn't being
  used directly.
- golang/protobuf was added because prometheus/client_model doesn't
  explicitly pin to it.
  • Loading branch information
abhinav committed Jan 15, 2019
1 parent f441039 commit 266fc65
Show file tree
Hide file tree
Showing 3 changed files with 150 additions and 29 deletions.
132 changes: 107 additions & 25 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import:
version: master
- package: github.com/gogo/protobuf
version: ^1
- package: github.com/golang/protobuf
version: ^1
- package: github.com/mattn/go-shellwords
version: ^1
- package: github.com/uber-go/mapdecode
Expand Down Expand Up @@ -59,18 +61,19 @@ import:
version: '>= 0.1, < 2.0'
- package: github.com/golang/mock
version: ^1
testImport:
- package: golang.org/x/lint
subpackages:
- golint
repo: https://github.com/golang/lint
- package: github.com/kisielk/errcheck
- package: github.com/kisielk/gotool
- package: go.uber.org/tools
version: master
subpackages:
- update-license
- package: honnef.co/go/tools
subpackages:
- cmd/staticcheck
testImport:
- package: github.com/stretchr/testify
# No version pin because some of our dependencies aren't pinning.
subpackages:
- assert
- require
36 changes: 36 additions & 0 deletions tools.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright (c) 2019 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

// +build tools

package yarpc

import (
// Tools we use during development.
_ "github.com/gogo/protobuf/protoc-gen-gogoslick"
_ "github.com/golang/mock/mockgen"
_ "github.com/kisielk/errcheck"
_ "github.com/uber/tchannel-go/thrift/thrift-gen"
_ "go.uber.org/thriftrw"
_ "go.uber.org/tools/update-license"
_ "golang.org/x/lint/golint"
_ "golang.org/x/tools/cmd/stringer"
_ "honnef.co/go/tools/cmd/staticcheck"
)

0 comments on commit 266fc65

Please sign in to comment.