Skip to content
This repository was archived by the owner on Nov 7, 2022. It is now read-only.

Commit bf83eb9

Browse files
author
Paulo Janotti
authored
Follow golang/wiki recommendation for tool dependencies and reduce install tools set (#578)
* Reduce `install-tools` Keeping only go get golang.org/x/lint/golint * Follow golang/wiki recommendation for tool dependencies This ensures that everyone is using the same version of golint, we will have to manually update it when appropriate. * Exclude tools/ from sources to avoid error msg
1 parent 3f272ca commit bf83eb9

File tree

4 files changed

+30
-10
lines changed

4 files changed

+30
-10
lines changed

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# More exclusions can be added similar with: -not -path './vendor/*'
22
ALL_SRC := $(shell find . -name '*.go' \
33
-not -path './vendor/*' \
4+
-not -path './tools/*' \
45
-type f | sort)
56

67
# ALL_PKGS is used with 'go cover'
@@ -78,11 +79,7 @@ vet:
7879

7980
.PHONY: install-tools
8081
install-tools:
81-
go get -u golang.org/x/lint/golint
82-
go get -u github.com/google/go-cmp/cmp
83-
go get contrib.go.opencensus.io/exporter/[email protected]
84-
go get contrib.go.opencensus.io/exporter/prometheus
85-
go get contrib.go.opencensus.io/exporter/zipkin
82+
go install golang.org/x/lint/golint
8683

8784
.PHONY: agent
8885
agent:

go.mod

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,7 @@ require (
5757
go.uber.org/atomic v1.3.2 // indirect
5858
go.uber.org/multierr v1.1.0 // indirect
5959
go.uber.org/zap v1.9.1
60-
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 // indirect
61-
golang.org/x/lint v0.0.0-20190409202823-959b441ac422 // indirect
62-
golang.org/x/net v0.0.0-20190611141213-3f473d35a33a // indirect
63-
golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae // indirect
64-
golang.org/x/tools v0.0.0-20190612180059-59534d075a87 // indirect
60+
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3
6561
google.golang.org/api v0.5.0
6662
google.golang.org/grpc v1.21.0
6763
gopkg.in/DataDog/dd-trace-go.v1 v1.12.1 // indirect

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL
420420
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
421421
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
422422
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
423+
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 h1:XQyxROzUlZH+WIQwySDgnISgOivlhjIEwaQaJEJrrN0=
423424
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
424425
golang.org/x/lint v0.0.0-20190409202823-959b441ac422 h1:QzoH/1pFpZguR8NrRHLcO6jKqfv2zpuSqZLgdm7ZmjI=
425426
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
@@ -487,6 +488,7 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm
487488
golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
488489
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
489490
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
491+
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138 h1:H3uGjxCR/6Ds0Mjgyp7LMK81+LvmbvWWEnJhzk1Pi9E=
490492
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
491493
golang.org/x/tools v0.0.0-20190612180059-59534d075a87 h1:RZgRBvCwrKVLcEd+O/QbyISA6RAPPLTYHdPw4Nk0Wz0=
492494
golang.org/x/tools v0.0.0-20190612180059-59534d075a87/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=

tools/tools.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright 2019, OpenCensus Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
16+
// +build tools
17+
18+
// Package tools follows the recommendation at
19+
// https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
20+
// on how to add tooling dependencies.
21+
package tools
22+
23+
import (
24+
_ "golang.org/x/lint/golint"
25+
)

0 commit comments

Comments
 (0)