Skip to content

Commit

Permalink
Upgrade tflint (#3594)
Browse files Browse the repository at this point in the history
* Upgrade tflint

* variables

* Change variable names
  • Loading branch information
nvuillam authored Jun 2, 2024
1 parent 3809490 commit 178d6a8
Show file tree
Hide file tree
Showing 23 changed files with 174 additions and 170 deletions.
21 changes: 11 additions & 10 deletions 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
ARG VERSION_EDITORCONFIG_CHECKER=latest
ARG EDITORCONFIG_CHECKER_VERSION=latest
ARG TFLINT_VERSION=0.51.1
#ARGTOP__END

#############################################################################################
Expand All @@ -26,7 +27,7 @@ FROM koalaman/shellcheck:stable as shellcheck
# FROM koalaman/shellcheck:stable as shellcheck
FROM mvdan/shfmt:latest-alpine as shfmt
FROM hadolint/hadolint:v2.12.0-alpine as hadolint
FROM mstruebing/editorconfig-checker:$VERSION_EDITORCONFIG_CHECKER as editorconfig-checker
FROM mstruebing/editorconfig-checker:$EDITORCONFIG_CHECKER_VERSION as editorconfig-checker
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).
Expand All @@ -44,7 +45,7 @@ FROM checkmarx/kics:alpine as kics
FROM trufflesecurity/trufflehog:latest as trufflehog
FROM jdkato/vale:latest as vale
FROM lycheeverse/lychee:latest-alpine as lychee
FROM ghcr.io/terraform-linters/tflint:v0.51.0 as tflint
FROM ghcr.io/terraform-linters/tflint:v${TFLINT_VERSION} as tflint
FROM tenable/terrascan:1.18.11 as terrascan
FROM alpine/terragrunt:latest as terragrunt
# Next FROM line commented because already managed by another linter
Expand All @@ -68,7 +69,7 @@ ARG BICEP_URI='https://github.com/Azure/bicep/releases/latest/download/bicep-lin
ARG BICEP_DIR='/usr/local/bin'
ARG DART_VERSION='2.8.4'
ARG PMD_VERSION=7.1.0
ARG VERSION_KOTLIN_DETEKT='1.23.6'
ARG DETEKT_VERSION='1.23.6'
ARG PSSA_VERSION='latest'
#ARG__END

Expand Down Expand Up @@ -587,12 +588,12 @@ RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${P
mv "ktlint" /usr/bin/ \

# detekt installation
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/detekt/detekt/releases/download/v${VERSION_KOTLIN_DETEKT}/detekt-cli-${VERSION_KOTLIN_DETEKT}.zip && \
unzip detekt-cli-${VERSION_KOTLIN_DETEKT}.zip && \
chmod a+x detekt-cli-${VERSION_KOTLIN_DETEKT}/bin/* && \
chmod a+x detekt-cli-${VERSION_KOTLIN_DETEKT}/lib/* && \
mv -n detekt-cli-${VERSION_KOTLIN_DETEKT}/bin/* usr/bin && \
mv -n detekt-cli-${VERSION_KOTLIN_DETEKT}/lib/* usr/lib \
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/detekt/detekt/releases/download/v${DETEKT_VERSION}/detekt-cli-${DETEKT_VERSION}.zip && \
unzip detekt-cli-${DETEKT_VERSION}.zip && \
chmod a+x detekt-cli-${DETEKT_VERSION}/bin/* && \
chmod a+x detekt-cli-${DETEKT_VERSION}/lib/* && \
mv -n detekt-cli-${DETEKT_VERSION}/bin/* usr/bin && \
mv -n detekt-cli-${DETEKT_VERSION}/lib/* usr/lib \

# kubeconform installation
# Managed with COPY --link --from=kubeconform /kubeconform /usr/bin/
Expand Down
18 changes: 9 additions & 9 deletions flavors/c_cpp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
## @generated by .automation/build.py using descriptor files, please do not update manually ##
#############################################################################################
#ARGTOP__START
ARG VERSION_EDITORCONFIG_CHECKER=latest
ARG EDITORCONFIG_CHECKER_VERSION=latest
#ARGTOP__END

#############################################################################################
Expand All @@ -27,7 +27,7 @@ FROM koalaman/shellcheck:stable as shellcheck
# FROM koalaman/shellcheck:stable as shellcheck
FROM mvdan/shfmt:latest-alpine as shfmt
FROM hadolint/hadolint:v2.12.0-alpine as hadolint
FROM mstruebing/editorconfig-checker:$VERSION_EDITORCONFIG_CHECKER as editorconfig-checker
FROM mstruebing/editorconfig-checker:$EDITORCONFIG_CHECKER_VERSION as editorconfig-checker
FROM ghcr.io/yannh/kubeconform:latest-alpine as kubeconform
FROM yoheimuta/protolint:latest as protolint
FROM zricethezav/gitleaks:v8.18.2 as gitleaks
Expand All @@ -45,7 +45,7 @@ FROM python:3.12.3-alpine3.19
## @generated by .automation/build.py using descriptor files, please do not update manually ##
#############################################################################################
#ARG__START
ARG VERSION_KOTLIN_DETEKT='1.23.6'
ARG DETEKT_VERSION='1.23.6'
#ARG__END

# Static args
Expand Down Expand Up @@ -266,12 +266,12 @@ RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/rel
mv "ktlint" /usr/bin/ \

# detekt installation
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/detekt/detekt/releases/download/v${VERSION_KOTLIN_DETEKT}/detekt-cli-${VERSION_KOTLIN_DETEKT}.zip && \
unzip detekt-cli-${VERSION_KOTLIN_DETEKT}.zip && \
chmod a+x detekt-cli-${VERSION_KOTLIN_DETEKT}/bin/* && \
chmod a+x detekt-cli-${VERSION_KOTLIN_DETEKT}/lib/* && \
mv -n detekt-cli-${VERSION_KOTLIN_DETEKT}/bin/* usr/bin && \
mv -n detekt-cli-${VERSION_KOTLIN_DETEKT}/lib/* usr/lib \
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/detekt/detekt/releases/download/v${DETEKT_VERSION}/detekt-cli-${DETEKT_VERSION}.zip && \
unzip detekt-cli-${DETEKT_VERSION}.zip && \
chmod a+x detekt-cli-${DETEKT_VERSION}/bin/* && \
chmod a+x detekt-cli-${DETEKT_VERSION}/lib/* && \
mv -n detekt-cli-${DETEKT_VERSION}/bin/* usr/bin && \
mv -n detekt-cli-${DETEKT_VERSION}/lib/* usr/lib \

# kubeconform installation
# Managed with COPY --link --from=kubeconform /kubeconform /usr/bin/
Expand Down
21 changes: 11 additions & 10 deletions flavors/cupcake/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
## @generated by .automation/build.py using descriptor files, please do not update manually ##
#############################################################################################
#ARGTOP__START
ARG VERSION_EDITORCONFIG_CHECKER=latest
ARG EDITORCONFIG_CHECKER_VERSION=latest
ARG TFLINT_VERSION=0.51.1
#ARGTOP__END

#############################################################################################
Expand All @@ -27,7 +28,7 @@ FROM koalaman/shellcheck:stable as shellcheck
# FROM koalaman/shellcheck:stable as shellcheck
FROM mvdan/shfmt:latest-alpine as shfmt
FROM hadolint/hadolint:v2.12.0-alpine as hadolint
FROM mstruebing/editorconfig-checker:$VERSION_EDITORCONFIG_CHECKER as editorconfig-checker
FROM mstruebing/editorconfig-checker:$EDITORCONFIG_CHECKER_VERSION as editorconfig-checker
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).
Expand All @@ -39,7 +40,7 @@ FROM zricethezav/gitleaks:v8.18.2 as gitleaks
FROM checkmarx/kics:alpine as kics
FROM trufflesecurity/trufflehog:latest as trufflehog
FROM lycheeverse/lychee:latest-alpine as lychee
FROM ghcr.io/terraform-linters/tflint:v0.51.0 as tflint
FROM ghcr.io/terraform-linters/tflint:v${TFLINT_VERSION} as tflint
FROM tenable/terrascan:1.18.11 as terrascan
FROM alpine/terragrunt:latest as terragrunt
# Next FROM line commented because already managed by another linter
Expand All @@ -56,7 +57,7 @@ FROM python:3.12.3-alpine3.19
#############################################################################################
#ARG__START
ARG PMD_VERSION=7.1.0
ARG VERSION_KOTLIN_DETEKT='1.23.6'
ARG DETEKT_VERSION='1.23.6'
#ARG__END

# Static args
Expand Down Expand Up @@ -436,12 +437,12 @@ RUN wget --quiet https://github.com/pmd/pmd/releases/download/pmd_releases%2F${P
mv "ktlint" /usr/bin/ \

# detekt installation
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/detekt/detekt/releases/download/v${VERSION_KOTLIN_DETEKT}/detekt-cli-${VERSION_KOTLIN_DETEKT}.zip && \
unzip detekt-cli-${VERSION_KOTLIN_DETEKT}.zip && \
chmod a+x detekt-cli-${VERSION_KOTLIN_DETEKT}/bin/* && \
chmod a+x detekt-cli-${VERSION_KOTLIN_DETEKT}/lib/* && \
mv -n detekt-cli-${VERSION_KOTLIN_DETEKT}/bin/* usr/bin && \
mv -n detekt-cli-${VERSION_KOTLIN_DETEKT}/lib/* usr/lib \
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/detekt/detekt/releases/download/v${DETEKT_VERSION}/detekt-cli-${DETEKT_VERSION}.zip && \
unzip detekt-cli-${DETEKT_VERSION}.zip && \
chmod a+x detekt-cli-${DETEKT_VERSION}/bin/* && \
chmod a+x detekt-cli-${DETEKT_VERSION}/lib/* && \
mv -n detekt-cli-${DETEKT_VERSION}/bin/* usr/bin && \
mv -n detekt-cli-${DETEKT_VERSION}/lib/* usr/lib \

# kubeconform installation
# Managed with COPY --link --from=kubeconform /kubeconform /usr/bin/
Expand Down
18 changes: 9 additions & 9 deletions flavors/documentation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
## @generated by .automation/build.py using descriptor files, please do not update manually ##
#############################################################################################
#ARGTOP__START
ARG VERSION_EDITORCONFIG_CHECKER=latest
ARG EDITORCONFIG_CHECKER_VERSION=latest
#ARGTOP__END

#############################################################################################
Expand All @@ -27,7 +27,7 @@ FROM koalaman/shellcheck:stable as shellcheck
# FROM koalaman/shellcheck:stable as shellcheck
FROM mvdan/shfmt:latest-alpine as shfmt
FROM hadolint/hadolint:v2.12.0-alpine as hadolint
FROM mstruebing/editorconfig-checker:$VERSION_EDITORCONFIG_CHECKER as editorconfig-checker
FROM mstruebing/editorconfig-checker:$EDITORCONFIG_CHECKER_VERSION as editorconfig-checker
FROM ghcr.io/yannh/kubeconform:latest-alpine as kubeconform
FROM yoheimuta/protolint:latest as protolint
FROM zricethezav/gitleaks:v8.18.2 as gitleaks
Expand All @@ -45,7 +45,7 @@ FROM python:3.12.3-alpine3.19
## @generated by .automation/build.py using descriptor files, please do not update manually ##
#############################################################################################
#ARG__START
ARG VERSION_KOTLIN_DETEKT='1.23.6'
ARG DETEKT_VERSION='1.23.6'
#ARG__END

# Static args
Expand Down Expand Up @@ -264,12 +264,12 @@ RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/rel
mv "ktlint" /usr/bin/ \

# detekt installation
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/detekt/detekt/releases/download/v${VERSION_KOTLIN_DETEKT}/detekt-cli-${VERSION_KOTLIN_DETEKT}.zip && \
unzip detekt-cli-${VERSION_KOTLIN_DETEKT}.zip && \
chmod a+x detekt-cli-${VERSION_KOTLIN_DETEKT}/bin/* && \
chmod a+x detekt-cli-${VERSION_KOTLIN_DETEKT}/lib/* && \
mv -n detekt-cli-${VERSION_KOTLIN_DETEKT}/bin/* usr/bin && \
mv -n detekt-cli-${VERSION_KOTLIN_DETEKT}/lib/* usr/lib \
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/detekt/detekt/releases/download/v${DETEKT_VERSION}/detekt-cli-${DETEKT_VERSION}.zip && \
unzip detekt-cli-${DETEKT_VERSION}.zip && \
chmod a+x detekt-cli-${DETEKT_VERSION}/bin/* && \
chmod a+x detekt-cli-${DETEKT_VERSION}/lib/* && \
mv -n detekt-cli-${DETEKT_VERSION}/bin/* usr/bin && \
mv -n detekt-cli-${DETEKT_VERSION}/lib/* usr/lib \

# kubeconform installation
# Managed with COPY --link --from=kubeconform /kubeconform /usr/bin/
Expand Down
18 changes: 9 additions & 9 deletions flavors/dotnet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
## @generated by .automation/build.py using descriptor files, please do not update manually ##
#############################################################################################
#ARGTOP__START
ARG VERSION_EDITORCONFIG_CHECKER=latest
ARG EDITORCONFIG_CHECKER_VERSION=latest
#ARGTOP__END

#############################################################################################
Expand All @@ -27,7 +27,7 @@ FROM koalaman/shellcheck:stable as shellcheck
# FROM koalaman/shellcheck:stable as shellcheck
FROM mvdan/shfmt:latest-alpine as shfmt
FROM hadolint/hadolint:v2.12.0-alpine as hadolint
FROM mstruebing/editorconfig-checker:$VERSION_EDITORCONFIG_CHECKER as editorconfig-checker
FROM mstruebing/editorconfig-checker:$EDITORCONFIG_CHECKER_VERSION as editorconfig-checker
FROM ghcr.io/yannh/kubeconform:latest-alpine as kubeconform
FROM yoheimuta/protolint:latest as protolint
FROM zricethezav/gitleaks:v8.18.2 as gitleaks
Expand All @@ -51,7 +51,7 @@ ARG ARM_TTK_DIRECTORY='/opt/microsoft'
ARG BICEP_EXE='bicep'
ARG BICEP_URI='https://github.com/Azure/bicep/releases/latest/download/bicep-linux-musl-x64'
ARG BICEP_DIR='/usr/local/bin'
ARG VERSION_KOTLIN_DETEKT='1.23.6'
ARG DETEKT_VERSION='1.23.6'
ARG PSSA_VERSION='latest'
#ARG__END

Expand Down Expand Up @@ -320,12 +320,12 @@ RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/rel
mv "ktlint" /usr/bin/ \

# detekt installation
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/detekt/detekt/releases/download/v${VERSION_KOTLIN_DETEKT}/detekt-cli-${VERSION_KOTLIN_DETEKT}.zip && \
unzip detekt-cli-${VERSION_KOTLIN_DETEKT}.zip && \
chmod a+x detekt-cli-${VERSION_KOTLIN_DETEKT}/bin/* && \
chmod a+x detekt-cli-${VERSION_KOTLIN_DETEKT}/lib/* && \
mv -n detekt-cli-${VERSION_KOTLIN_DETEKT}/bin/* usr/bin && \
mv -n detekt-cli-${VERSION_KOTLIN_DETEKT}/lib/* usr/lib \
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/detekt/detekt/releases/download/v${DETEKT_VERSION}/detekt-cli-${DETEKT_VERSION}.zip && \
unzip detekt-cli-${DETEKT_VERSION}.zip && \
chmod a+x detekt-cli-${DETEKT_VERSION}/bin/* && \
chmod a+x detekt-cli-${DETEKT_VERSION}/lib/* && \
mv -n detekt-cli-${DETEKT_VERSION}/bin/* usr/bin && \
mv -n detekt-cli-${DETEKT_VERSION}/lib/* usr/lib \

# kubeconform installation
# Managed with COPY --link --from=kubeconform /kubeconform /usr/bin/
Expand Down
18 changes: 9 additions & 9 deletions flavors/dotnetweb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
## @generated by .automation/build.py using descriptor files, please do not update manually ##
#############################################################################################
#ARGTOP__START
ARG VERSION_EDITORCONFIG_CHECKER=latest
ARG EDITORCONFIG_CHECKER_VERSION=latest
#ARGTOP__END

#############################################################################################
Expand All @@ -27,7 +27,7 @@ FROM koalaman/shellcheck:stable as shellcheck
# FROM koalaman/shellcheck:stable as shellcheck
FROM mvdan/shfmt:latest-alpine as shfmt
FROM hadolint/hadolint:v2.12.0-alpine as hadolint
FROM mstruebing/editorconfig-checker:$VERSION_EDITORCONFIG_CHECKER as editorconfig-checker
FROM mstruebing/editorconfig-checker:$EDITORCONFIG_CHECKER_VERSION as editorconfig-checker
FROM ghcr.io/yannh/kubeconform:latest-alpine as kubeconform
FROM yoheimuta/protolint:latest as protolint
FROM zricethezav/gitleaks:v8.18.2 as gitleaks
Expand All @@ -51,7 +51,7 @@ ARG ARM_TTK_DIRECTORY='/opt/microsoft'
ARG BICEP_EXE='bicep'
ARG BICEP_URI='https://github.com/Azure/bicep/releases/latest/download/bicep-linux-musl-x64'
ARG BICEP_DIR='/usr/local/bin'
ARG VERSION_KOTLIN_DETEKT='1.23.6'
ARG DETEKT_VERSION='1.23.6'
ARG PSSA_VERSION='latest'
#ARG__END

Expand Down Expand Up @@ -342,12 +342,12 @@ RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/rel
mv "ktlint" /usr/bin/ \

# detekt installation
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/detekt/detekt/releases/download/v${VERSION_KOTLIN_DETEKT}/detekt-cli-${VERSION_KOTLIN_DETEKT}.zip && \
unzip detekt-cli-${VERSION_KOTLIN_DETEKT}.zip && \
chmod a+x detekt-cli-${VERSION_KOTLIN_DETEKT}/bin/* && \
chmod a+x detekt-cli-${VERSION_KOTLIN_DETEKT}/lib/* && \
mv -n detekt-cli-${VERSION_KOTLIN_DETEKT}/bin/* usr/bin && \
mv -n detekt-cli-${VERSION_KOTLIN_DETEKT}/lib/* usr/lib \
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/detekt/detekt/releases/download/v${DETEKT_VERSION}/detekt-cli-${DETEKT_VERSION}.zip && \
unzip detekt-cli-${DETEKT_VERSION}.zip && \
chmod a+x detekt-cli-${DETEKT_VERSION}/bin/* && \
chmod a+x detekt-cli-${DETEKT_VERSION}/lib/* && \
mv -n detekt-cli-${DETEKT_VERSION}/bin/* usr/bin && \
mv -n detekt-cli-${DETEKT_VERSION}/lib/* usr/lib \

# kubeconform installation
# Managed with COPY --link --from=kubeconform /kubeconform /usr/bin/
Expand Down
18 changes: 9 additions & 9 deletions flavors/go/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
## @generated by .automation/build.py using descriptor files, please do not update manually ##
#############################################################################################
#ARGTOP__START
ARG VERSION_EDITORCONFIG_CHECKER=latest
ARG EDITORCONFIG_CHECKER_VERSION=latest
#ARGTOP__END

#############################################################################################
Expand All @@ -27,7 +27,7 @@ FROM koalaman/shellcheck:stable as shellcheck
# FROM koalaman/shellcheck:stable as shellcheck
FROM mvdan/shfmt:latest-alpine as shfmt
FROM hadolint/hadolint:v2.12.0-alpine as hadolint
FROM mstruebing/editorconfig-checker:$VERSION_EDITORCONFIG_CHECKER as editorconfig-checker
FROM mstruebing/editorconfig-checker:$EDITORCONFIG_CHECKER_VERSION as editorconfig-checker
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).
Expand All @@ -51,7 +51,7 @@ FROM python:3.12.3-alpine3.19
## @generated by .automation/build.py using descriptor files, please do not update manually ##
#############################################################################################
#ARG__START
ARG VERSION_KOTLIN_DETEKT='1.23.6'
ARG DETEKT_VERSION='1.23.6'
#ARG__END

# Static args
Expand Down Expand Up @@ -280,12 +280,12 @@ RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/rel
mv "ktlint" /usr/bin/ \

# detekt installation
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/detekt/detekt/releases/download/v${VERSION_KOTLIN_DETEKT}/detekt-cli-${VERSION_KOTLIN_DETEKT}.zip && \
unzip detekt-cli-${VERSION_KOTLIN_DETEKT}.zip && \
chmod a+x detekt-cli-${VERSION_KOTLIN_DETEKT}/bin/* && \
chmod a+x detekt-cli-${VERSION_KOTLIN_DETEKT}/lib/* && \
mv -n detekt-cli-${VERSION_KOTLIN_DETEKT}/bin/* usr/bin && \
mv -n detekt-cli-${VERSION_KOTLIN_DETEKT}/lib/* usr/lib \
&& curl --retry 5 --retry-delay 5 -sSLO https://github.com/detekt/detekt/releases/download/v${DETEKT_VERSION}/detekt-cli-${DETEKT_VERSION}.zip && \
unzip detekt-cli-${DETEKT_VERSION}.zip && \
chmod a+x detekt-cli-${DETEKT_VERSION}/bin/* && \
chmod a+x detekt-cli-${DETEKT_VERSION}/lib/* && \
mv -n detekt-cli-${DETEKT_VERSION}/bin/* usr/bin && \
mv -n detekt-cli-${DETEKT_VERSION}/lib/* usr/lib \

# kubeconform installation
# Managed with COPY --link --from=kubeconform /kubeconform /usr/bin/
Expand Down
Loading

0 comments on commit 178d6a8

Please sign in to comment.