[#8] Bump required go version to go1.20
Some checks failed
DCO action / DCO (pull_request) Successful in 2m21s
Vulncheck / Vulncheck (pull_request) Successful in 2m36s
Build / Build Components (1.20) (pull_request) Successful in 3m48s
Tests and linters / Staticcheck (pull_request) Successful in 4m24s
Tests and linters / Tests (1.21) (pull_request) Failing after 8m46s
Tests and linters / Tests (1.20) (pull_request) Failing after 9m8s
Tests and linters / Tests with -race (pull_request) Failing after 9m8s
Build / Build Components (1.21) (pull_request) Successful in 11m37s
Tests and linters / Lint (pull_request) Successful in 14m2s

Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
Alexander Chuprov 2023-08-11 13:05:16 +03:00
parent 21800e9fcc
commit ad87493c41
2 changed files with 14 additions and 12 deletions

View file

@ -41,10 +41,10 @@ linters-settings:
noliteral: noliteral:
path: bin/external_linters.so path: bin/external_linters.so
original-url: git.frostfs.info/TrueCloudLab/linters.git original-url: git.frostfs.info/TrueCloudLab/linters.git
# settings: settings:
# target-methods : ["reportFlushError", "reportError"] target-methods : ["reportFlushError", "reportError"]
# disable-packages: ["codes", "err", "res","exec"] disable-packages: ["codes", "err", "res","exec"]
# constants-repository: "git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs" constants-package: "git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
linters: linters:
enable: enable:

View file

@ -8,7 +8,8 @@ HUB_IMAGE ?= truecloudlab/frostfs
HUB_TAG ?= "$(shell echo ${VERSION} | sed 's/^v//')" HUB_TAG ?= "$(shell echo ${VERSION} | sed 's/^v//')"
GO_VERSION ?= 1.21 GO_VERSION ?= 1.21
LINT_VERSION ?= 1.53.3 LINT_VERSION ?= 1.54.0
ARCH = amd64
BIN = bin BIN = bin
RELEASE = release RELEASE = release
@ -25,6 +26,7 @@ PKG_VERSION ?= $(shell echo $(VERSION) | sed "s/^v//" | \
sed "s/-/~/")-${OS_RELEASE} sed "s/-/~/")-${OS_RELEASE}
OUTPUT_LINT_DIR ?= $(shell pwd)/bin OUTPUT_LINT_DIR ?= $(shell pwd)/bin
LINT_DIR = $(OUTPUT_LINT_DIR)/golangci-lint-$(LINT_VERSION)
TMP_DIR := .cache TMP_DIR := .cache
.PHONY: help all images dep clean fmts fmt imports test lint docker/lint .PHONY: help all images dep clean fmts fmt imports test lint docker/lint
@ -138,18 +140,18 @@ lint-install:
@mkdir -p $(TMP_DIR) @mkdir -p $(TMP_DIR)
@rm -rf $(TMP_DIR)/linters @rm -rf $(TMP_DIR)/linters
@git clone --depth 1 https://git.frostfs.info/TrueCloudLab/linters.git $(TMP_DIR)/linters @git clone --depth 1 https://git.frostfs.info/TrueCloudLab/linters.git $(TMP_DIR)/linters
@make -C $(TMP_DIR)/linters lib CGO_ENABLED=1 OUT_DIR=$(OUTPUT_LINT_DIR) @@make -C $(TMP_DIR)/linters lib CGO_ENABLED=1 OUT_DIR=$(OUTPUT_LINT_DIR)
@rm -rf $(TMP_DIR)/linters @rm -rf $(TMP_DIR)/linters
@rmdir $(TMP_DIR) 2>/dev/null || true @rmdir $(TMP_DIR) 2>/dev/null || true
@GOBIN=$(OUTPUT_LINT_DIR) go install github.com/golangci/golangci-lint/cmd/golangci-lint@v$(LINT_VERSION) @CGO_ENABLED=1 GOBIN=$(LINT_DIR) go install github.com/golangci/golangci-lint/cmd/golangci-lint@v$(LINT_VERSION)
# Run linters # Run linters
lint: lint:
NOLITERAL_TARGET_METHODS="reportFlushError,reportError" \ @if [ ! -d "$(LINT_DIR)" ]; then \
NOLITERAL_DISABLE_PACKAGES="codes,err,res,exec" \ echo "Run make lint-install"; \
NOLITERAL_CONSTANTS_PACKAGE="git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs" \ exit 1; \
$(OUTPUT_LINT_DIR)/golangci-lint --timeout=10m run fi
$(LINT_DIR)/golangci-lint run
# Install staticcheck # Install staticcheck
staticcheck-install: staticcheck-install: