Update gocql version to v1.16.1 (#353)

* Update gocql version to v1.16.1

1. Update gocql to v1.16.1
2. Update golang to 1.25, since new gocql version requres it

* Update golangci to 2.5.0

It is needed since 1.64.8 does not support golang 1.25.
1. Update golangci to 2.5.0
2. Migrate from golangci config v1 to v2
3. Integrate fieldaligment to golangci
4. Drop fieldaligment from Makefile
5. Address complaints
This commit is contained in:
Dmitry Kropachev authored and GitHub committed 2025-10-28 14:52:22 -04:00
1 parent 96f0b49bdd
commit 38001d64ac
22 files changed
+161 -195

No files matched your search

+1 -12
View File
@@ -24,8 +24,7 @@ export PATH := $(GOBIN):$(PATH)
GOOS := $(shell uname | tr '[:upper:]' '[:lower:]')
GOARCH := $(shell go env GOARCH)
GOLANGCI_VERSION := 1.64.8
FIELDALIGNMENT_VERSION := 0.24.0
GOLANGCI_VERSION := 2.5.0
ifeq ($(GOARCH),arm64)
GOLANGCI_DOWNLOAD_URL := "https://github.com/golangci/golangci-lint/releases/download/v$(GOLANGCI_VERSION)/golangci-lint-$(GOLANGCI_VERSION)-$(GOOS)-arm64.tar.gz"
@@ -97,7 +96,6 @@ get-deps:
get-tools:
@echo "==> Installing tools at $(GOBIN)..."
@$(MAKE) install-golangci-lint
@$(MAKE) install-fieldalignment
.require-golangci-lint:
ifeq ($(shell if golangci-lint --version 2>/dev/null | grep ${GOLANGCI_VERSION} 1>/dev/null 2>&1; then echo "ok"; else echo "need-install"; fi), need-install)
@@ -108,15 +106,6 @@ install-golangci-lint:
@echo "==> Installing golangci-lint ${GOLANGCI_VERSION} at $(GOBIN)..."
$(call dl_tgz,golangci-lint,$(GOLANGCI_DOWNLOAD_URL))
.require-fieldalignment:
ifeq ($(shell if fieldalignment -V=full 1>/dev/null 2>&1; then echo "ok"; else echo "need-install"; fi), need-install)
$(MAKE) install-golangci-lint
endif
install-fieldalignment:
@echo "==> Installing fieldalignment ${FIELDALIGNMENT_VERSION} at $(GOBIN)..."
@go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@v${FIELDALIGNMENT_VERSION}
define dl_tgz
@mkdir "$(GOBIN)" 2>/dev/null || true
@echo "Downloading $(GOBIN)/$(1)";