Skip to content

Commit

Permalink
Merge pull request #302 from spacemeshos/retire-staticcheck
Browse files Browse the repository at this point in the history
Run staticcheck only via golangci-lint
  • Loading branch information
fasmat authored Aug 9, 2024
2 parents 01ef109 + c0af672 commit 164a2d0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
make test-fmt
make test-tidy
make test-generate
- name: staticcheck
run: make staticcheck
lint:
runs-on: ubuntu-22.04
Expand Down
11 changes: 2 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
export CGO_ENABLED := 1
include Makefile.Inc

GOLANGCI_LINT_VERSION := v1.57.0
STATICCHECK_VERSION := v0.4.7
GOTESTSUM_VERSION := v1.11.0
GOSCALE_VERSION := v1.1.13
GOLANGCI_LINT_VERSION := v1.59.0
GOTESTSUM_VERSION := v1.12.0
MOCKGEN_VERSION := v0.4.0

build: postcli
Expand All @@ -28,7 +26,6 @@ install: get-postrs-lib
go mod download
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $(GOLANGCI_LINT_VERSION)
go install gotest.tools/gotestsum@$(GOTESTSUM_VERSION)
go install honnef.co/go/tools/cmd/staticcheck@$(STATICCHECK_VERSION)
go install go.uber.org/mock/mockgen@$(MOCKGEN_VERSION)
.PHONY: install

Expand Down Expand Up @@ -72,10 +69,6 @@ cover: get-postrs-lib
@$(ULIMIT) CGO_LDFLAGS="$(CGO_TEST_LDFLAGS)" go test -coverprofile=cover.out -timeout 0 -p 1 -coverpkg=./... ./...
.PHONY: cover

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

generate: get-postrs-lib
@$(ULIMIT) CGO_LDFLAGS="$(CGO_TEST_LDFLAGS)" go generate ./...
.PHONY: generate
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/spacemeshos/post

go 1.22.2
go 1.22.4

require (
github.com/davecgh/go-spew v1.1.1
Expand Down
2 changes: 1 addition & 1 deletion initialization/benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ func TestBenchmark(t *testing.T) {
for _, p := range providers {
hashes, err := Benchmark(p)
require.NoError(t, err)
require.Greater(t, hashes, 0)
require.Positive(t, hashes)
}
}

0 comments on commit 164a2d0

Please sign in to comment.