Skip to content

Commit

Permalink
Implement setup tools the same way we do here https://github.com/open…
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Sirianni authored May 26, 2021
1 parent 4aa956d commit d5631a3
Show file tree
Hide file tree
Showing 5 changed files with 1,116 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ ARTIFACTS = ${PROJECT_ROOT}/artifacts
ALL_MODULES := $(shell find . -type f -name "go.mod" -exec dirname {} \; | sort )


TOOLS_MOD_DIR := ./internal/tools
.PHONY: install-tools
install-tools:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
go install github.com/vektra/mockery/cmd/mockery@latest
cd $(TOOLS_MOD_DIR) && go install github.com/golangci/golangci-lint/cmd/golangci-lint
cd $(TOOLS_MOD_DIR) && go install github.com/vektra/mockery/cmd/mockery

.PHONY: test
test: vet test-only
Expand Down Expand Up @@ -44,7 +45,7 @@ listmod:

.PHONY: lint
lint:
golangci-lint run ./...
$$GOPATH/bin/golangci-lint run --timeout 2m0s --allow-parallel-runners ./...

.PHONY: vet
vet: check-missing-modules
Expand Down
15 changes: 15 additions & 0 deletions internal/tools/empty_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package tools
8 changes: 8 additions & 0 deletions internal/tools/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module github.com/bluemedora/bpagent/internal/tools

go 1.16

require (
github.com/golangci/golangci-lint v1.40.1
github.com/vektra/mockery v1.1.2
)
Loading

0 comments on commit d5631a3

Please sign in to comment.