diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5e79f6..515bd21 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,8 +26,6 @@ jobs: make install make test-fmt make test-tidy - - name: staticcheck - run: make staticcheck lint: runs-on: ubuntu-latest diff --git a/.golangci.yml b/.golangci.yml index 5a2d2ea..4ba7091 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -179,7 +179,7 @@ linters: - govet # - grouper - importas - # - inamedparam + - inamedparam - ineffassign # - interfacebloat # - intrange @@ -549,6 +549,11 @@ linters-settings: - pkg: "k8s.io/client-go/applyconfigurations/meta/v1" alias: metav1 + inamedparam: + # Skips check for interface methods with only a single parameter. + # Default: false + skip-single-param: false + lll: # Max line length, lines longer will be reported. # '\t' is counted as 1 character by default, and can be changed with the tab-width option. @@ -591,7 +596,7 @@ linters-settings: nestif: # Minimal complexity of if statements to report. # Default: 5 - min-complexity: 15 + min-complexity: 5 perfsprint: # Optimizes even if it requires an int or uint type cast. diff --git a/Makefile b/Makefile index c92d1c0..38676a5 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,9 @@ CGO_LDFLAGS := $(LINKLIBS) $(RPATH) STATICLDFLAGS := -L$(UNZIP_DEST) -led25519_bip32 -lspacemesh_remote_wallet EXTRACT = tar -xzf +GOLANGCI_LINT_VERSION := v1.59.0 +GOTESTSUM_VERSION := v1.12.0 + # Detect operating system ifeq ($(OS),Windows_NT) SYSTEM := windows @@ -96,9 +99,8 @@ $(DOWNLOAD_DEST): .PHONY: install install: go mod download - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.57.0 - go install gotest.tools/gotestsum@v1.11.0 - go install honnef.co/go/tools/cmd/staticcheck@v0.4.7 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $(GOLANGCI_LINT_VERSION) + go install gotest.tools/gotestsum@$(GOTESTSUM_VERSION) .PHONY: tidy tidy: @@ -157,12 +159,5 @@ lint-github-action: $(UNZIP_DEST) LD_LIBRARY_PATH=$(REAL_DEST) \ ./bin/golangci-lint run --config .golangci.yml --out-format=github-actions -.PHONY: staticcheck -staticcheck: $(UNZIP_DEST) - CGO_CFLAGS="-I$(REAL_DEST)" \ - CGO_LDFLAGS="$(CGO_LDFLAGS)" \ - LD_LIBRARY_PATH=$(REAL_DEST) \ - staticcheck ./... - clean: rm -rf $(UNZIP_DEST) diff --git a/go.mod b/go.mod index 67ce7ae..4d1c3e8 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/spacemeshos/smcli -go 1.22.3 +go 1.22.4 require ( github.com/btcsuite/btcutil v1.0.2