-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): general ci and tooling improvement (#498)
- Loading branch information
Showing
7 changed files
with
44 additions
and
32 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
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
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 |
---|---|---|
|
@@ -4,6 +4,16 @@ GO=go | |
LDFLAGS?=-s -w | ||
TESTFILE=_testok | ||
|
||
# go tools versions | ||
GOLANGCI=github.com/golangci/golangci-lint/cmd/[email protected] | ||
gofumpt=mvdan.cc/gofumpt@latest | ||
govulncheck=golang.org/x/vuln/cmd/govulncheck@latest | ||
goimports=golang.org/x/tools/cmd/goimports@latest | ||
mockgen=github.com/golang/mock/[email protected] | ||
gotestsum=gotest.tools/[email protected] | ||
protoc-gen-go=google.golang.org/protobuf/cmd/[email protected] | ||
protoc-gen-go-grpc=google.golang.org/grpc/cmd/[email protected] | ||
|
||
default: lint | ||
|
||
generate: install-tools | ||
|
@@ -54,17 +64,17 @@ help: ## Show the available commands | |
@grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' ./Makefile | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
install-tools: | ||
go install github.com/golang/mock/[email protected] | ||
go install mvdan.cc/gofumpt@latest | ||
go install gotest.tools/[email protected] | ||
go install golang.org/x/tools/cmd/goimports@latest | ||
bash ./internal/scripts/install-golangci-lint.sh v1.55.2 | ||
$(GO) install $(gotestsum) | ||
$(GO) install $(mockgen) | ||
$(GO) install $(protoc-gen-go) | ||
$(GO) install $(protoc-gen-go-grpc) | ||
|
||
.PHONY: lint | ||
lint: fmt ## Run linters on all go files | ||
golangci-lint run -v --timeout 5m | ||
$(GO) run $(GOLANGCI) run -v | ||
|
||
.PHONY: fmt | ||
fmt: install-tools ## Formats all go files | ||
gofumpt -l -w -extra . | ||
find . -type f -name '*.go' -exec grep -L -E 'Code generated by .*\. DO NOT EDIT.' {} + | xargs goimports -format-only -w -local=github.com/rudderlabs | ||
$(GO) run $(govulncheck) ./... | ||
$(GO) run $(gofumpt) -l -w -extra . | ||
find . -type f -name '*.go' -exec grep -L -E 'Code generated by .*\. DO NOT EDIT.' {} + | xargs $(GO) run $(goimports) -format-only -w -local=github.com/rudderlabs |
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,6 +1,6 @@ | ||
module github.com/rudderlabs/rudder-go-kit | ||
|
||
go 1.21 | ||
go 1.22.3 | ||
|
||
require ( | ||
cloud.google.com/go/storage v1.41.0 | ||
|
This file was deleted.
Oops, something went wrong.