Skip to content

Commit

Permalink
Add renovate to go linters (#4558)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdovaz authored Jan 21, 2025
1 parent 9750985 commit ba894e8
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 17 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ ARG BASH_SHFMT_VERSION=v3.10.0-alpine
ARG DOCKERFILE_HADOLINT_VERSION=v2.12.0-alpine
# renovate: datasource=docker depName=mstruebing/editorconfig-checker
ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.1.2
# renovate: datasource=github-tags depName=mgechev/revive
ARG GO_REVIVE_VERSION=v1.5.1
# renovate: datasource=docker depName=ghcr.io/yannh/kubeconform
ARG KUBERNETES_KUBECONFORM_VERSION=v0.6.7-alpine
# renovate: datasource=docker depName=yoheimuta/protolint
Expand Down Expand Up @@ -59,8 +61,7 @@ FROM golang:1-alpine AS revive
## The golang image used as a builder is a temporary workaround (https://github.com/mgechev/revive/issues/787)
## for the released revive binaries not returning version numbers (devel).
## The install command should then be what is commented in the go.megalinter-descriptor.yml
# renovate: datasource=github-tags depName=mgechev/revive
ARG GO_REVIVE_VERSION=v1.5.1
ARG GO_REVIVE_VERSION
RUN GOBIN=/usr/bin go install github.com/mgechev/revive@$GO_REVIVE_VERSION
FROM ghcr.io/yannh/kubeconform:${KUBERNETES_KUBECONFORM_VERSION} AS kubeconform
FROM ghcr.io/assignuser/chktex-alpine:latest AS chktex
Expand Down Expand Up @@ -134,6 +135,8 @@ ARG CSHARP_CSHARPIER_VERSION=0.30.6
ARG CSHARP_ROSLYNATOR_VERSION=0.9.3
# renovate: datasource=dart-version depName=dart
ARG DART_VERSION='3.6.1'
# renovate: datasource=github-tags depName=golangci/golangci-lint
ARG GO_GOLANGCI_LINT_VERSION=1.63.4
# renovate: datasource=github-tags depName=pmd/pmd extractVersion=^pmd_releases/(?<version>.*)$
ARG PMD_VERSION=7.9.0

Expand Down Expand Up @@ -654,7 +657,7 @@ ENV PATH="/usr/lib/dart/bin:${PATH}"
RUN wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \
#
# golangci-lint installation
&& wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh \
&& wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s "v${GO_GOLANGCI_LINT_VERSION}" \
&& golangci-lint --version

#
Expand Down
9 changes: 6 additions & 3 deletions flavors/cupcake/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ ARG BASH_SHFMT_VERSION=v3.10.0-alpine
ARG DOCKERFILE_HADOLINT_VERSION=v2.12.0-alpine
# renovate: datasource=docker depName=mstruebing/editorconfig-checker
ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.1.2
# renovate: datasource=github-tags depName=mgechev/revive
ARG GO_REVIVE_VERSION=v1.5.1
# renovate: datasource=docker depName=ghcr.io/yannh/kubeconform
ARG KUBERNETES_KUBECONFORM_VERSION=v0.6.7-alpine
# renovate: datasource=docker depName=zricethezav/gitleaks
Expand Down Expand Up @@ -56,8 +58,7 @@ FROM golang:1-alpine AS revive
## The golang image used as a builder is a temporary workaround (https://github.com/mgechev/revive/issues/787)
## for the released revive binaries not returning version numbers (devel).
## The install command should then be what is commented in the go.megalinter-descriptor.yml
# renovate: datasource=github-tags depName=mgechev/revive
ARG GO_REVIVE_VERSION=v1.5.1
ARG GO_REVIVE_VERSION
RUN GOBIN=/usr/bin go install github.com/mgechev/revive@$GO_REVIVE_VERSION
FROM ghcr.io/yannh/kubeconform:${KUBERNETES_KUBECONFORM_VERSION} AS kubeconform
FROM zricethezav/gitleaks:${REPOSITORY_GITLEAKS_VERSION} AS gitleaks
Expand Down Expand Up @@ -103,6 +104,8 @@ ARG CLJ_KONDO_VERSION=2025.01.16

# renovate: datasource=github-tags depName=greglook/cljstyle
ARG CLJ_STYLE_VERSION=0.17.642
# renovate: datasource=github-tags depName=golangci/golangci-lint
ARG GO_GOLANGCI_LINT_VERSION=1.63.4
# renovate: datasource=github-tags depName=pmd/pmd extractVersion=^pmd_releases/(?<version>.*)$
ARG PMD_VERSION=7.9.0

Expand Down Expand Up @@ -451,7 +454,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil
&& wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \
#
# golangci-lint installation
&& wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh \
&& wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s "v${GO_GOLANGCI_LINT_VERSION}" \
&& golangci-lint --version

#
Expand Down
9 changes: 6 additions & 3 deletions flavors/go/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ ARG BASH_SHFMT_VERSION=v3.10.0-alpine
ARG DOCKERFILE_HADOLINT_VERSION=v2.12.0-alpine
# renovate: datasource=docker depName=mstruebing/editorconfig-checker
ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.1.2
# renovate: datasource=github-tags depName=mgechev/revive
ARG GO_REVIVE_VERSION=v1.5.1
# renovate: datasource=docker depName=ghcr.io/yannh/kubeconform
ARG KUBERNETES_KUBECONFORM_VERSION=v0.6.7-alpine
# renovate: datasource=docker depName=yoheimuta/protolint
Expand Down Expand Up @@ -52,8 +54,7 @@ FROM golang:1-alpine AS revive
## The golang image used as a builder is a temporary workaround (https://github.com/mgechev/revive/issues/787)
## for the released revive binaries not returning version numbers (devel).
## The install command should then be what is commented in the go.megalinter-descriptor.yml
# renovate: datasource=github-tags depName=mgechev/revive
ARG GO_REVIVE_VERSION=v1.5.1
ARG GO_REVIVE_VERSION
RUN GOBIN=/usr/bin go install github.com/mgechev/revive@$GO_REVIVE_VERSION
FROM ghcr.io/yannh/kubeconform:${KUBERNETES_KUBECONFORM_VERSION} AS kubeconform
FROM yoheimuta/protolint:${PROTOBUF_PROTOLINT_VERSION} AS protolint
Expand Down Expand Up @@ -90,6 +91,8 @@ FROM python:3.12.8-alpine3.21
## @generated by .automation/build.py using descriptor files, please do not update manually ##
#############################################################################################
#ARG__START
# renovate: datasource=github-tags depName=golangci/golangci-lint
ARG GO_GOLANGCI_LINT_VERSION=1.63.4
# renovate: datasource=github-tags depName=pinterest/ktlint
ARG KTLINT_VERSION=1.5.0

Expand Down Expand Up @@ -304,7 +307,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil
&& wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s \
#
# golangci-lint installation
&& wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh \
&& wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s "v${GO_GOLANGCI_LINT_VERSION}" \
&& golangci-lint --version

#
Expand Down
5 changes: 3 additions & 2 deletions linters/go_golangci_lint/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ FROM python:3.12.8-alpine3.21
## @generated by .automation/build.py using descriptor files, please do not update manually ##
#############################################################################################
#ARG__START

# renovate: datasource=github-tags depName=golangci/golangci-lint
ARG GO_GOLANGCI_LINT_VERSION=1.63.4
#ARG__END

####################
Expand Down Expand Up @@ -147,7 +148,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \
#############################################################################################
#OTHER__START
# golangci-lint installation
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh \
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s "v${GO_GOLANGCI_LINT_VERSION}" \
&& golangci-lint --version

#
Expand Down
6 changes: 3 additions & 3 deletions linters/go_revive/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
## @generated by .automation/build.py using descriptor files, please do not update manually ##
#############################################################################################
#ARGTOP__START

# renovate: datasource=github-tags depName=mgechev/revive
ARG GO_REVIVE_VERSION=v1.5.1
#ARGTOP__END

#############################################################################################
Expand All @@ -22,8 +23,7 @@ FROM golang:1-alpine AS revive
## The golang image used as a builder is a temporary workaround (https://github.com/mgechev/revive/issues/787)
## for the released revive binaries not returning version numbers (devel).
## The install command should then be what is commented in the go.megalinter-descriptor.yml
# renovate: datasource=github-tags depName=mgechev/revive
ARG GO_REVIVE_VERSION=v1.5.1
ARG GO_REVIVE_VERSION
RUN GOBIN=/usr/bin go install github.com/mgechev/revive@$GO_REVIVE_VERSION
#FROM__END

Expand Down
11 changes: 8 additions & 3 deletions megalinter/descriptors/go.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ linters:
- "golangci-lint run -c .golangci.yml myfile.go"
install:
dockerfile:
- |-
# renovate: datasource=github-tags depName=golangci/golangci-lint
ARG GO_GOLANGCI_LINT_VERSION=1.63.4
- |
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh \
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s "v${GO_GOLANGCI_LINT_VERSION}" \
&& golangci-lint --version
ide:
atom:
Expand Down Expand Up @@ -81,13 +84,15 @@ linters:
## Until "FROM ghcr.io/mgechev/revive:1.2.5 AS revive" is available, use
# - FROM ghcr.io/mgechev/revive:1.2.5 AS revive
# - COPY --link --from=revive /usr/bin/revive /usr/bin/revive
- |-
# renovate: datasource=github-tags depName=mgechev/revive
ARG GO_REVIVE_VERSION=v1.5.1
- |-
FROM golang:1-alpine AS revive
## The golang image used as a builder is a temporary workaround (https://github.com/mgechev/revive/issues/787)
## for the released revive binaries not returning version numbers (devel).
## The install command should then be what is commented in the go.megalinter-descriptor.yml
# renovate: datasource=github-tags depName=mgechev/revive
ARG GO_REVIVE_VERSION=v1.5.1
ARG GO_REVIVE_VERSION
RUN GOBIN=/usr/bin go install github.com/mgechev/revive@$GO_REVIVE_VERSION
- COPY --link --from=revive /usr/bin/revive /usr/bin/revive
ide:
Expand Down

0 comments on commit ba894e8

Please sign in to comment.