-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from pjanotti/make-individual-pkgs
Make individual packages on the repo
- Loading branch information
Showing
10 changed files
with
619 additions
and
373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# GoLand IDEA | ||
/.idea/ | ||
|
||
# VS Code | ||
.vscode | ||
|
||
# Emacs | ||
*~ | ||
\#*\# | ||
|
||
# Miscellaneous files | ||
*.sw[op] | ||
*.DS_Store | ||
|
||
# Coverage | ||
coverage.txt | ||
coverage.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
EXPORTERS := $(wildcard exporter/*/.) | ||
|
||
.DEFAULT_GOAL := all | ||
|
||
.PHONY: all $(EXPORTERS) | ||
all: $(EXPORTERS) | ||
$(EXPORTERS): | ||
$(MAKE) -C $@ | ||
|
||
.PHONY: install-tools | ||
install-tools: | ||
GO111MODULE=on go install \ | ||
github.com/google/addlicense \ | ||
golang.org/x/lint/golint \ | ||
golang.org/x/tools/cmd/goimports \ | ||
github.com/client9/misspell/cmd/misspell \ | ||
honnef.co/go/tools/cmd/staticcheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# More exclusions can be added similar with: -not -path './vendor/*' | ||
ALL_SRC := $(shell find . -name '*.go' \ | ||
-not -path './vendor/*' \ | ||
-type f | sort) | ||
|
||
# All source code and documents. Used in spell check. | ||
ALL_SRC_AND_DOC := $(shell find . \( -name "*.md" -o -name "*.go" -o -name "*.yaml" \) \ | ||
-not -path './vendor/*' \ | ||
-type f | sort) | ||
|
||
# ALL_PKGS is used with 'go cover' | ||
ALL_PKGS := $(shell go list $(sort $(dir $(ALL_SRC)))) | ||
|
||
GOTEST_OPT?= -race -timeout 30s | ||
GOTEST_OPT_WITH_COVERAGE = $(GOTEST_OPT) -coverprofile=coverage.txt -covermode=atomic | ||
GOTEST=go test | ||
GOFMT=gofmt | ||
GOIMPORTS=goimports | ||
GOLINT=golint | ||
GOVET=go vet | ||
GOOS=$(shell go env GOOS) | ||
ADDLICENCESE= addlicense | ||
MISSPELL=misspell -error | ||
MISSPELL_CORRECTION=misspell -w | ||
STATICCHECK=staticcheck | ||
|
||
all-pkgs: | ||
@echo $(ALL_PKGS) | tr ' ' '\n' | sort | ||
|
||
all-srcs: | ||
@echo $(ALL_SRC) | tr ' ' '\n' | sort | ||
|
||
.DEFAULT_GOAL := addlicense-fmt-vet-lint-goimports-misspell-staticcheck-test | ||
|
||
.PHONY: addlicense-fmt-vet-lint-goimports-misspell-staticcheck-test | ||
addlicense-fmt-vet-lint-goimports-misspell-staticcheck-test: addlicense fmt vet lint goimports misspell staticcheck test | ||
|
||
.PHONY: test | ||
test: | ||
$(GOTEST) $(GOTEST_OPT) $(ALL_PKGS) | ||
|
||
.PHONY: addlicense | ||
addlicense: | ||
@ADDLICENCESEOUT=`$(ADDLICENCESE) -y 2019 -c 'OpenTelemetry Authors' $(ALL_SRC) 2>&1`; \ | ||
if [ "$$ADDLICENCESEOUT" ]; then \ | ||
echo "$(ADDLICENCESE) FAILED => add License errors:\n"; \ | ||
echo "$$ADDLICENCESEOUT\n"; \ | ||
exit 1; \ | ||
else \ | ||
echo "Add License finished successfully"; \ | ||
fi | ||
|
||
.PHONY: fmt | ||
fmt: | ||
@FMTOUT=`$(GOFMT) -s -l $(ALL_SRC) 2>&1`; \ | ||
if [ "$$FMTOUT" ]; then \ | ||
echo "$(GOFMT) FAILED => gofmt the following files:\n"; \ | ||
echo "$$FMTOUT\n"; \ | ||
exit 1; \ | ||
else \ | ||
echo "Fmt finished successfully"; \ | ||
fi | ||
|
||
.PHONY: lint | ||
lint: | ||
@LINTOUT=`$(GOLINT) $(ALL_PKGS) 2>&1`; \ | ||
if [ "$$LINTOUT" ]; then \ | ||
echo "$(GOLINT) FAILED => clean the following lint errors:\n"; \ | ||
echo "$$LINTOUT\n"; \ | ||
exit 1; \ | ||
else \ | ||
echo "Lint finished successfully"; \ | ||
fi | ||
|
||
.PHONY: goimports | ||
goimports: | ||
@IMPORTSOUT=`$(GOIMPORTS) -d . 2>&1`; \ | ||
if [ "$$IMPORTSOUT" ]; then \ | ||
echo "$(GOIMPORTS) FAILED => fix the following goimports errors:\n"; \ | ||
echo "$$IMPORTSOUT\n"; \ | ||
exit 1; \ | ||
else \ | ||
echo "Goimports finished successfully"; \ | ||
fi | ||
|
||
.PHONY: misspell | ||
misspell: | ||
$(MISSPELL) $(ALL_SRC_AND_DOC) | ||
|
||
.PHONY: misspell-correction | ||
misspell-correction: | ||
$(MISSPELL_CORRECTION) $(ALL_SRC_AND_DOC) | ||
|
||
.PHONY: staticcheck | ||
staticcheck: | ||
$(STATICCHECK) ./... | ||
|
||
.PHONY: vet | ||
vet: | ||
@$(GOVET) ./... | ||
@echo "Vet finished successfully" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ../../Makefile.Common |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module github.com/open-telemetry/opentelemetry-service-contrib/exporter/stackdriverexporter | ||
|
||
go 1.12 | ||
|
||
require ( | ||
contrib.go.opencensus.io/exporter/stackdriver v0.12.4 | ||
github.com/open-telemetry/opentelemetry-service v0.0.0-20190802182013-b39842ba580b | ||
github.com/stretchr/testify v1.3.0 | ||
go.opencensus.io v0.22.0 | ||
go.uber.org/zap v1.10.0 | ||
) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
module github.com/open-telemetry/opentelemetry-service-contrib | ||
module github.com/open-telemetry/opentelemetry-service-contrib/exporter | ||
|
||
go 1.12 | ||
|
||
require ( | ||
contrib.go.opencensus.io/exporter/stackdriver v0.12.2 | ||
github.com/open-telemetry/opentelemetry-service v0.0.0-20190726175643-11a0a2ab4e8b | ||
github.com/stretchr/testify v1.3.0 | ||
go.opencensus.io v0.22.0 | ||
go.uber.org/zap v1.10.0 | ||
github.com/client9/misspell v0.3.4 // indirect | ||
github.com/google/addlicense v0.0.0-20190510175307-22550fa7c1b0 // indirect | ||
golang.org/x/lint v0.0.0-20190409202823-959b441ac422 // indirect | ||
golang.org/x/tools v0.0.0-20190805165405-2756c524cc1c // indirect | ||
honnef.co/go/tools v0.0.1-2019.2.2 // indirect | ||
) |
Oops, something went wrong.