-
Notifications
You must be signed in to change notification settings - Fork 832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tune linters #3848
Merged
Merged
Tune linters #3848
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ bins: temporal-server temporal-cassandra-tool temporal-sql-tool tdbg | |
all: update-tools clean proto bins check test | ||
|
||
# Used by Buildkite. | ||
ci-build: bins build-tests update-tools shell-check check proto go-generate gomodtidy ensure-no-changes | ||
ci-build: bins build-tests ci-update-tools shell-check copyright-check proto go-generate gomodtidy ensure-no-changes | ||
|
||
# Delete all build artifacts | ||
clean: clean-bins clean-test-results | ||
|
@@ -108,13 +108,13 @@ SQL_PASSWORD ?= temporal | |
INTEGRATION_TEST_COVERPKG := -coverpkg="$(MODULE_ROOT)/common/persistence/...,$(MODULE_ROOT)/tools/..." | ||
FUNCTIONAL_TEST_COVERPKG := -coverpkg="$(MODULE_ROOT)/client/...,$(MODULE_ROOT)/common/...,$(MODULE_ROOT)/service/...,$(MODULE_ROOT)/temporal/...,$(MODULE_ROOT)/tools/..." | ||
##### Tools ##### | ||
update-checkers: | ||
@printf $(COLOR) "Install/update check tools..." | ||
update-goimports: | ||
@printf $(COLOR) "Install/update goimports..." | ||
@go install golang.org/x/tools/cmd/goimports@latest | ||
@go install github.com/googleapis/api-linter/cmd/[email protected] | ||
@go install github.com/bufbuild/buf/cmd/[email protected] | ||
@go install github.com/golangci/golangci-lint/cmd/[email protected] | ||
|
||
update-linters: | ||
@printf $(COLOR) "Install/update linters..." | ||
@go install github.com/golangci/golangci-lint/cmd/[email protected] | ||
|
||
update-mockgen: | ||
@printf $(COLOR) "Install/update mockgen tool..." | ||
|
@@ -125,6 +125,11 @@ update-proto-plugins: | |
@go install -modfile build/go.mod github.com/temporalio/gogo-protobuf/protoc-gen-gogoslick | ||
@go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest | ||
|
||
update-proto-linters: | ||
@printf $(COLOR) "Install/update proto linters..." | ||
@go install github.com/googleapis/api-linter/cmd/[email protected] | ||
@go install github.com/bufbuild/buf/cmd/[email protected] | ||
|
||
update-tctl: | ||
@printf $(COLOR) "Install/update tctl..." | ||
@go install github.com/temporalio/tctl/cmd/tctl@latest | ||
|
@@ -133,7 +138,10 @@ update-ui: | |
@printf $(COLOR) "Install/update temporal ui-server..." | ||
@go install github.com/temporalio/ui-server/cmd/server@latest | ||
|
||
update-tools: update-checkers update-mockgen update-proto-plugins | ||
update-tools: update-goimports update-linters update-mockgen update-proto-plugins update-proto-linters | ||
|
||
# update-linters is not included because in CI linters are run by github actions. | ||
ci-update-tools: update-goimports update-mockgen update-proto-plugins update-proto-linters | ||
|
||
##### Proto ##### | ||
$(PROTO_OUT): | ||
|
@@ -224,8 +232,8 @@ copyright: | |
@go run ./cmd/tools/copyright/licensegen.go | ||
|
||
lint: | ||
@printf $(COLOR) "Run linter..." | ||
@golangci-lint run | ||
@printf $(COLOR) "Run linters..." | ||
@golangci-lint run --verbose --timeout 10m --fix=false --new-from-rev=HEAD~ --config=.golangci.yml | ||
|
||
api-linter: | ||
@printf $(COLOR) "Run api-linter..." | ||
|
@@ -247,7 +255,7 @@ shell-check: | |
@printf $(COLOR) "Run shellcheck for script files..." | ||
@shellcheck $(ALL_SCRIPTS) | ||
|
||
check: copyright-check | ||
check: copyright-check lint shell-check | ||
|
||
##### Tests ##### | ||
clean-test-results: | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This saves about 10s of build time because linters are not getting installed on Buildkite now.