Skip to content

Commit

Permalink
draft
Browse files Browse the repository at this point in the history
Signed-off-by: husharp <[email protected]>
  • Loading branch information
HuSharp committed Dec 15, 2023
1 parent 7b60e09 commit bebf9b5
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 204 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,4 @@ jobs:
${{ runner.os }}-golang
- name: Make Check
run: |
SWAGGER=1 make build
make tools
make check
make static
37 changes: 0 additions & 37 deletions .github/workflows/label.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/pd-docker-image.yaml

This file was deleted.

78 changes: 0 additions & 78 deletions .github/workflows/pd-tests.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/tso-consistency-test.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/tso-function-test.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@ run:
timeout: 3m
linters:
enable:
- misspell
- stylecheck
- gocritic
- unparam
- unconvert
- whitespace
- makezero
- gosec
- bodyclose
disable:
- errcheck
linters-settings:
Expand Down
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -160,24 +160,18 @@ SHELL := env PATH='$(PATH)' GOBIN='$(GO_TOOLS_BIN_PATH)' $(shell which bash)

install-tools:
@mkdir -p $(GO_TOOLS_BIN_PATH)
@which golangci-lint >/dev/null 2>&1 || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GO_TOOLS_BIN_PATH) v1.51.2
@which golangci-lint >/dev/null 2>&1 || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GO_TOOLS_BIN_PATH) v1.55.2
@grep '_' tools.go | sed 's/"//g' | awk '{print $$2}' | xargs go install

.PHONY: install-tools

#### Static checks ####

check: install-tools tidy static generate-errdoc check-test
check: static

static: install-tools
@ echo "gofmt ..."
@ gofmt -s -l -d $(PACKAGE_DIRECTORIES) 2>&1 | awk '{ print } END { if (NR > 0) { exit 1 } }'
@ echo "golangci-lint ..."
@ golangci-lint run --verbose $(PACKAGE_DIRECTORIES) --allow-parallel-runners
@ echo "revive ..."
@ revive -formatter friendly -config revive.toml $(PACKAGES)

@ for mod in $(SUBMODULES); do cd $$mod && $(MAKE) static && cd $(ROOT_PATH) > /dev/null; done

tidy:
@ go mod tidy
Expand Down

0 comments on commit bebf9b5

Please sign in to comment.