From f2216a861767524b3fc9368dc5c890b1424afc07 Mon Sep 17 00:00:00 2001 From: Maximilian Geberl Date: Mon, 14 Nov 2022 10:59:24 +0100 Subject: [PATCH] update golangci-lint --- .golangci.yml | 3 --- Earthfile | 12 ++++++++---- internal/helper/service.go | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 2d73dd0f..723801de 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -57,7 +57,6 @@ linters: disable-all: true enable: - bodyclose - - deadcode - depguard - dogsled - goconst @@ -73,13 +72,11 @@ linters: - nakedret - rowserrcheck - staticcheck - - structcheck - stylecheck - typecheck - unconvert - unparam - unused - - varcheck - whitespace - revive - dupl diff --git a/Earthfile b/Earthfile index b89fbe7f..078271c1 100644 --- a/Earthfile +++ b/Earthfile @@ -3,8 +3,12 @@ FROM golang:1.19 ARG DOCKER_REPO=ghcr.io/stackitcloud/yawol/ ARG BINPATH=/usr/local/bin/ ARG GOCACHE=/go-cache + ARG ENVOY_VERSION=v1.24.0 ARG PROMTAIL_VERSION=2.7.0 +ARG HELM_VERSION=3.8.1 +ARG GOLANGCI_LINT_VERSION=v1.50.1 +ARG PACKER_VERSION=1.8 local-setup: LOCALLY @@ -205,7 +209,7 @@ snyk-go: RUN --secret SNYK_TOKEN snyk test snyk-helm: - FROM alpine/helm:3.8.1 + FROM alpine/helm:$HELM_VERSION COPY +snyk-alpine/snyk $BINPATH COPY --dir +helm2kube/result . COPY .snyk . @@ -239,11 +243,11 @@ all: ########### golangci-lint: - FROM golangci/golangci-lint:v1.48.0 + FROM golangci/golangci-lint:$GOLANGCI_LINT_VERSION SAVE ARTIFACT /usr/bin/golangci-lint packer: - FROM hashicorp/packer:1.8 + FROM hashicorp/packer:$PACKER_VERSION RUN apk add ansible RUN apk add openssh-client @@ -266,7 +270,7 @@ snyk-alpine: SAVE ARTIFACT /usr/local/bin/snyk helm: - FROM alpine/helm:3.8.1 + FROM alpine/helm:$HELM_VERSION SAVE ARTIFACT /usr/bin/helm bash: diff --git a/internal/helper/service.go b/internal/helper/service.go index 97b9167e..31cd769d 100644 --- a/internal/helper/service.go +++ b/internal/helper/service.go @@ -123,11 +123,11 @@ func getTCPProxyProtocolPortsFilter(tcpProxyProtocolPortsFilter string) []int32 } var portFilter []int32 for _, port := range strings.Split(tcpProxyProtocolPortsFilter, ",") { - intPort, err := strconv.Atoi(port) //nolint:gosec // ints are always under int16 + intPort, err := strconv.Atoi(port) if err != nil { return nil } - portFilter = append(portFilter, int32(intPort)) + portFilter = append(portFilter, int32(intPort)) //nolint:gosec // ints are always under int16 } return portFilter }