Skip to content

Commit

Permalink
run staticcheck via golang-lint-ci only (#6235)
Browse files Browse the repository at this point in the history
## Motivation

Avoid running staticcheck in CI twice.
  • Loading branch information
poszu committed Aug 9, 2024
1 parent a84a5ef commit 93eade8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ jobs:
go-version: ${{ env.go-version }}
- name: setup env
run: make install
- name: staticcheck
run: make staticcheck
- name: lint
run: make lint-github-action

Expand Down
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ COMMIT = $(shell git rev-parse HEAD)
BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)

GOLANGCI_LINT_VERSION := v1.59.0
STATICCHECK_VERSION := v0.4.7
GOTESTSUM_VERSION := v1.12.0
GOSCALE_VERSION := v1.2.0
MOCKGEN_VERSION := v0.4.0
Expand Down Expand Up @@ -61,7 +60,6 @@ install:
go install github.com/spacemeshos/go-scale/scalegen@$(GOSCALE_VERSION)
go install go.uber.org/mock/mockgen@$(MOCKGEN_VERSION)
go install gotest.tools/gotestsum@$(GOTESTSUM_VERSION)
go install honnef.co/go/tools/cmd/staticcheck@$(STATICCHECK_VERSION)
.PHONY: install

build: go-spacemesh get-profiler get-postrs-service
Expand Down Expand Up @@ -112,10 +110,6 @@ test-generate:
@git diff --name-only --diff-filter=AM --exit-code . || { echo "\nPlease rerun 'make generate' and commit changes.\n"; exit 1; }
.PHONY: test-generate

staticcheck: get-libs
@$(ULIMIT) CGO_LDFLAGS="$(CGO_TEST_LDFLAGS)" staticcheck ./...
.PHONY: staticcheck

test-tidy:
# Working directory must be clean, or this test would be destructive
git diff --quiet || (echo "\033[0;31mWorking directory not clean!\033[0m" && git --no-pager diff && exit 1)
Expand Down

0 comments on commit 93eade8

Please sign in to comment.