Skip to content
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

Run staticcheck only via golangci-lint #302

Merged
merged 2 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}
}
Loading