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

Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
pull/526/head
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:
path: bin/external_linters.so
original-url: git.frostfs.info/TrueCloudLab/linters.git
# settings:
# target-methods : ["reportFlushError", "reportError"]
# disable-packages: ["codes", "err", "res","exec"]
# constants-repository: "git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
settings:
target-methods : ["reportFlushError", "reportError"]
disable-packages: ["codes", "err", "res","exec"]
constants-package: "git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
linters:
enable:

View File

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