Skip to content

Commit

Permalink
update golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dergeberl committed Nov 14, 2022
1 parent f7b01bb commit f2216a8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ linters:
disable-all: true
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- goconst
Expand All @@ -73,13 +72,11 @@ linters:
- nakedret
- rowserrcheck
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
- revive
- dupl
Expand Down
12 changes: 8 additions & 4 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 .
Expand Down Expand Up @@ -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

Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions internal/helper/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit f2216a8

Please sign in to comment.