diff --git a/.automation/build.py b/.automation/build.py index ed0ca72ffe3..efbd9f9093e 100644 --- a/.automation/build.py +++ b/.automation/build.py @@ -3346,6 +3346,7 @@ def generate_documentation_all_linters(): linters.sort(key=lambda x: x.linter_name) table_header = [ "Linter", + "Supported Platforms", "Version", "License", "Popularity", @@ -3531,9 +3532,17 @@ def generate_documentation_all_linters(): f"[![GitHub stars](https://img.shields.io/github/stars/{repo}?cacheSeconds=3600)]" f"(https://github.com/{repo}){{target=_blank}}" ) + supported_platforms = [] + # supported platforms + if ( + hasattr(linter, "supported_platforms") + and "platform" in linter.supported_platforms + ): + supported_platforms += linter.supported_platforms["platform"] # line table_line = [ linter.linter_name, + ", ".join(supported_platforms), linter_version, license, "N/A", @@ -3550,6 +3559,7 @@ def generate_documentation_all_linters(): linter_doc_links += [link] md_table_line = [ md_linter_name, + "
".join(supported_platforms), linter_version, md_license, md_popularity, @@ -3590,10 +3600,10 @@ def generate_documentation_all_linters(): outfile.write("\n\n") outfile.write("# References\n\n") outfile.write( - "| Linter | Version | License | Popularity | Descriptors | Ref | URL |\n" + "| Linter | Supported Platforms | Version | License | Popularity | Descriptors | Ref | URL |\n" ) outfile.write( - "| :---- | :-----: | :-----: | :-----: | :--------- | :--------------: | :-: |\n" + "| :---- | :-----: | :-----: | :-----: | :-----: | :--------- | :--------------: | :-: |\n" ) for md_table_line in md_table_lines: outfile.write("| %s |\n" % " | ".join(md_table_line)) diff --git a/.cspell.json b/.cspell.json index c023d41c30e..b5fb9343de9 100644 --- a/.cspell.json +++ b/.cspell.json @@ -546,6 +546,7 @@ "Symilar", "Symlinks", "Syntastic", + "TARGETPLATFORM", "TEAMPROJECT", "TEKTON", "TERMIOS", @@ -592,6 +593,7 @@ "YOURUSERNAME", "Zhipu", "Zuplo", + "aarch64", "abdeslamads", "abhith", "absolutized", @@ -628,6 +630,7 @@ "aren", "argparse", "aristanetworks", + "armv6", "artefacts", "asdict", "ashokm", @@ -1150,6 +1153,7 @@ "msrest", "mstruebing", "msvs", + "multiarch", "muandane", "multiline", "multimatch", @@ -1394,6 +1398,7 @@ "rexec", "rgba", "risd", + "riscv", "rmfamily", "robotframework", "rockspec", diff --git a/Dockerfile b/Dockerfile index cd1ca79919e..86ea6fc566a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,9 +54,12 @@ ARG TERRAFORM_TERRAGRUNT_VERSION=1.14.1 FROM rhysd/actionlint:${ACTION_ACTIONLINT_VERSION} AS actionlint # shellcheck is a dependency for actionlint FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu # Next FROM line commented because already managed by another linter # FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck FROM mvdan/shfmt:${BASH_SHFMT_VERSION} AS shfmt +# Next FROM line commented because already managed by another linter +# FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu FROM hadolint/hadolint:${DOCKERFILE_HADOLINT_VERSION} AS hadolint FROM mstruebing/editorconfig-checker:${EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION} AS editorconfig-checker FROM golang:1-alpine AS revive @@ -112,6 +115,7 @@ FROM python:3.13-alpine3.23 #ARG__START # renovate: datasource=crate depName=sarif-fmt ARG CARGO_SARIF_FMT_VERSION=0.8.0 +ARG TARGETPLATFORM # renovate: datasource=github-tags depName=PowerShell/PowerShell ARG POWERSHELL_VERSION=7.5.4 # renovate: datasource=github-tags depName=sgerrand/alpine-pkg-glibc @@ -639,14 +643,29 @@ COPY --from=composer/composer:2-bin /composer /usr/bin/composer COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk add --no-cache libc6-compat + # Next COPY line commented because already managed by another linter # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=revive /usr/bin/revive /usr/bin/revive COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=chktex /usr/bin/chktex /usr/bin/ +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=dustilock /usr/bin/dustilock /usr/bin/dustilock COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ @@ -667,7 +686,11 @@ COPY --link --from=terragrunt /bin/terraform /usr/bin/ #OTHER__START RUN rc-update add docker boot && (rc-service docker start || true) \ # ARM installation - && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ + && case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ + && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ && mkdir -p /opt/microsoft/powershell/7 \ && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -786,7 +809,11 @@ ENV PATH="/root/.composer/vendor/bin:${PATH}" # # POWERSHELL installation # Next line commented because already managed by another linter -# RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ +# RUN case ${TARGETPLATFORM} in \ +# "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ +# "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +# esac \ +# && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ # && mkdir -p /opt/microsoft/powershell/7 \ # && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ # && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -831,6 +858,8 @@ RUN curl --retry-all-errors --retry 10 -fLo coursier https://git.io/coursier-cli # # arm-ttk installation ENV ARM_TTK_PSD1="${ARM_TTK_DIRECTORY}/arm-ttk/arm-ttk/arm-ttk.psd1" +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat RUN curl --retry 5 --retry-delay 5 -sLO "https://github.com/Azure/arm-ttk/releases/download/${ARM_TTK_VERSION}/${ARM_TTK_NAME}" \ && unzip "${ARM_TTK_NAME}" -d "${ARM_TTK_DIRECTORY}" \ && rm "${ARM_TTK_NAME}" \ @@ -849,13 +878,23 @@ RUN curl --retry 5 --retry-delay 5 -sLO "https://github.com/Azure/arm-ttk/releas # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # # bicep_linter installation - && curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-musl-x64" \ - && chmod +x "${BICEP_EXE}" \ - && mv "${BICEP_EXE}" "${BICEP_DIR}" \ +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk add --no-cache libc6-compat + && case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ +&& curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-${POWERSHELL_ARCH}" \ +&& chmod +x "${BICEP_EXE}" \ +&& mv "${BICEP_EXE}" "${BICEP_DIR}" \ # # cpplint installation # # clj-kondo installation +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk add --no-cache libc6-compat && curl --retry 5 --retry-delay 5 -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/refs/tags/v${CLJ_KONDO_VERSION}/script/install-clj-kondo \ && chmod +x install-clj-kondo \ && ./install-clj-kondo \ @@ -882,7 +921,11 @@ RUN curl --retry 5 --retry-delay 5 -sLO "https://github.com/Azure/arm-ttk/releas # stylelint installation # # dartanalyzer installation - && wget --tries=5 https://storage.googleapis.com/dart-archive/channels/stable/release/${DART_VERSION}/sdk/dartsdk-linux-x64-release.zip -O - -q | unzip -q - \ + && case ${TARGETPLATFORM} in \ + "linux/amd64") DART_ARCH=x64 ;; \ + "linux/arm64") DART_ARCH=arm64 ;; \ +esac \ + && wget --tries=5 https://storage.googleapis.com/dart-archive/channels/stable/release/${DART_VERSION}/sdk/dartsdk-linux-${DART_ARCH}-release.zip -O - -q | unzip -q - \ && mkdir -p /usr/lib/dart \ && mv dart-sdk/* /usr/lib/dart/ \ && chmod +x /usr/lib/dart/bin/dart \ @@ -1016,9 +1059,15 @@ RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GI # # powershell installation +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk add --no-cache libc6-compat RUN pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' # # powershell_formatter installation +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk add --no-cache libc6-compat # Next line commented because already managed by another linter # RUN pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' # diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index 3850119afdd..971a8ada42e 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -52,6 +52,7 @@ FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck # Next FROM line commented because already managed by another linter # FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck FROM mvdan/shfmt:${BASH_SHFMT_VERSION} AS shfmt +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu FROM hadolint/hadolint:${DOCKERFILE_HADOLINT_VERSION} AS hadolint FROM mstruebing/editorconfig-checker:${EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION} AS editorconfig-checker FROM golang:1-alpine AS revive @@ -539,6 +540,9 @@ COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # Next COPY line commented because already managed by another linter # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk add --no-cache libc6-compat + COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=revive /usr/bin/revive /usr/bin/revive @@ -639,6 +643,8 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil # cpplint installation # # clj-kondo installation +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat && curl --retry 5 --retry-delay 5 -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/refs/tags/v${CLJ_KONDO_VERSION}/script/install-clj-kondo \ && chmod +x install-clj-kondo \ && ./install-clj-kondo \ diff --git a/flavors/dotnet/Dockerfile b/flavors/dotnet/Dockerfile index 22adfb81861..4f5124f38f5 100644 --- a/flavors/dotnet/Dockerfile +++ b/flavors/dotnet/Dockerfile @@ -43,9 +43,12 @@ ARG SPELL_LYCHEE_VERSION=sha-7c4b132-alpine FROM rhysd/actionlint:${ACTION_ACTIONLINT_VERSION} AS actionlint # shellcheck is a dependency for actionlint FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu # Next FROM line commented because already managed by another linter # FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck FROM mvdan/shfmt:${BASH_SHFMT_VERSION} AS shfmt +# Next FROM line commented because already managed by another linter +# FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu FROM hadolint/hadolint:${DOCKERFILE_HADOLINT_VERSION} AS hadolint FROM mstruebing/editorconfig-checker:${EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION} AS editorconfig-checker FROM ghcr.io/yannh/kubeconform:${KUBERNETES_KUBECONFORM_VERSION} AS kubeconform @@ -85,6 +88,7 @@ FROM python:3.13-alpine3.23 #ARG__START # renovate: datasource=crate depName=sarif-fmt ARG CARGO_SARIF_FMT_VERSION=0.8.0 +ARG TARGETPLATFORM # renovate: datasource=github-tags depName=PowerShell/PowerShell ARG POWERSHELL_VERSION=7.5.4 # renovate: datasource=github-tags depName=PowerShell/PowerShell @@ -379,12 +383,24 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk add --no-cache libc6-compat + # Next COPY line commented because already managed by another linter # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=kubeconform /kubeconform /usr/bin/ +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ COPY --link --from=trufflehog /usr/bin/trufflehog /usr/bin/ @@ -397,7 +413,11 @@ COPY --link --from=lychee /usr/local/bin/lychee /usr/bin/ ############################################################################################# #OTHER__START # ARM installation -RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ + && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ && mkdir -p /opt/microsoft/powershell/7 \ && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -413,7 +433,11 @@ ENV PATH="$JAVA_HOME/bin:${PATH}" # # POWERSHELL installation # Next line commented because already managed by another linter -# RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ +# RUN case ${TARGETPLATFORM} in \ +# "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ +# "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +# esac \ +# && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ # && mkdir -p /opt/microsoft/powershell/7 \ # && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ # && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -436,6 +460,8 @@ ENV PATH="$JAVA_HOME/bin:${PATH}" # # arm-ttk installation ENV ARM_TTK_PSD1="${ARM_TTK_DIRECTORY}/arm-ttk/arm-ttk/arm-ttk.psd1" +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat RUN curl --retry 5 --retry-delay 5 -sLO "https://github.com/Azure/arm-ttk/releases/download/${ARM_TTK_VERSION}/${ARM_TTK_NAME}" \ && unzip "${ARM_TTK_NAME}" -d "${ARM_TTK_DIRECTORY}" \ && rm "${ARM_TTK_NAME}" \ @@ -454,9 +480,16 @@ RUN curl --retry 5 --retry-delay 5 -sLO "https://github.com/Azure/arm-ttk/releas # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # # bicep_linter installation - && curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-musl-x64" \ - && chmod +x "${BICEP_EXE}" \ - && mv "${BICEP_EXE}" "${BICEP_DIR}" \ +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk add --no-cache libc6-compat + && case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ +&& curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-${POWERSHELL_ARCH}" \ +&& chmod +x "${BICEP_EXE}" \ +&& mv "${BICEP_EXE}" "${BICEP_DIR}" \ # # cpplint installation # @@ -527,9 +560,15 @@ RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/rel # rumdl installation # # powershell installation +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk add --no-cache libc6-compat && pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' \ # # powershell_formatter installation +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk add --no-cache libc6-compat # Next line commented because already managed by another linter # RUN pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' # diff --git a/flavors/dotnetweb/Dockerfile b/flavors/dotnetweb/Dockerfile index 7203484c4b0..b1990fa5a12 100644 --- a/flavors/dotnetweb/Dockerfile +++ b/flavors/dotnetweb/Dockerfile @@ -43,9 +43,12 @@ ARG SPELL_LYCHEE_VERSION=sha-7c4b132-alpine FROM rhysd/actionlint:${ACTION_ACTIONLINT_VERSION} AS actionlint # shellcheck is a dependency for actionlint FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu # Next FROM line commented because already managed by another linter # FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck FROM mvdan/shfmt:${BASH_SHFMT_VERSION} AS shfmt +# Next FROM line commented because already managed by another linter +# FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu FROM hadolint/hadolint:${DOCKERFILE_HADOLINT_VERSION} AS hadolint FROM mstruebing/editorconfig-checker:${EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION} AS editorconfig-checker FROM ghcr.io/yannh/kubeconform:${KUBERNETES_KUBECONFORM_VERSION} AS kubeconform @@ -85,6 +88,7 @@ FROM python:3.13-alpine3.23 #ARG__START # renovate: datasource=crate depName=sarif-fmt ARG CARGO_SARIF_FMT_VERSION=0.8.0 +ARG TARGETPLATFORM # renovate: datasource=github-tags depName=PowerShell/PowerShell ARG POWERSHELL_VERSION=7.5.4 # renovate: datasource=github-tags depName=PowerShell/PowerShell @@ -445,12 +449,24 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk add --no-cache libc6-compat + # Next COPY line commented because already managed by another linter # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=kubeconform /kubeconform /usr/bin/ +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ COPY --link --from=trufflehog /usr/bin/trufflehog /usr/bin/ @@ -463,7 +479,11 @@ COPY --link --from=lychee /usr/local/bin/lychee /usr/bin/ ############################################################################################# #OTHER__START # ARM installation -RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ + && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ && mkdir -p /opt/microsoft/powershell/7 \ && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -479,7 +499,11 @@ ENV PATH="$JAVA_HOME/bin:${PATH}" # # POWERSHELL installation # Next line commented because already managed by another linter -# RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ +# RUN case ${TARGETPLATFORM} in \ +# "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ +# "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +# esac \ +# && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ # && mkdir -p /opt/microsoft/powershell/7 \ # && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ # && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -504,6 +528,8 @@ ENV PATH="$JAVA_HOME/bin:${PATH}" # # arm-ttk installation ENV ARM_TTK_PSD1="${ARM_TTK_DIRECTORY}/arm-ttk/arm-ttk/arm-ttk.psd1" +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat RUN curl --retry 5 --retry-delay 5 -sLO "https://github.com/Azure/arm-ttk/releases/download/${ARM_TTK_VERSION}/${ARM_TTK_NAME}" \ && unzip "${ARM_TTK_NAME}" -d "${ARM_TTK_DIRECTORY}" \ && rm "${ARM_TTK_NAME}" \ @@ -522,9 +548,16 @@ RUN curl --retry 5 --retry-delay 5 -sLO "https://github.com/Azure/arm-ttk/releas # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # # bicep_linter installation - && curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-musl-x64" \ - && chmod +x "${BICEP_EXE}" \ - && mv "${BICEP_EXE}" "${BICEP_DIR}" \ +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk add --no-cache libc6-compat + && case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ +&& curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-${POWERSHELL_ARCH}" \ +&& chmod +x "${BICEP_EXE}" \ +&& mv "${BICEP_EXE}" "${BICEP_DIR}" \ # # cpplint installation # @@ -605,9 +638,15 @@ RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/rel # rumdl installation # # powershell installation +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk add --no-cache libc6-compat && pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' \ # # powershell_formatter installation +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk add --no-cache libc6-compat # Next line commented because already managed by another linter # RUN pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' # diff --git a/flavors/formatters/Dockerfile b/flavors/formatters/Dockerfile index 125c598acee..a69a6095b46 100644 --- a/flavors/formatters/Dockerfile +++ b/flavors/formatters/Dockerfile @@ -23,6 +23,7 @@ ARG TERRAFORM_TERRAGRUNT_VERSION=1.14.1 ############################################################################################# #FROM__START FROM mvdan/shfmt:${BASH_SHFMT_VERSION} AS shfmt +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu FROM alpine/terragrunt:${TERRAFORM_TERRAGRUNT_VERSION} AS terragrunt #FROM__END @@ -55,6 +56,7 @@ FROM python:3.13-alpine3.23 #ARG__START # renovate: datasource=crate depName=sarif-fmt ARG CARGO_SARIF_FMT_VERSION=0.8.0 +ARG TARGETPLATFORM # renovate: datasource=github-tags depName=PowerShell/PowerShell ARG POWERSHELL_VERSION=7.5.4 @@ -217,6 +219,9 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ #COPY__START COPY --link --from=shfmt /bin/shfmt /usr/bin/ +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk add --no-cache libc6-compat + COPY --link --from=terragrunt /bin/terraform /usr/bin/ #COPY__END @@ -229,7 +234,11 @@ RUN apk add --no-cache dotnet9-sdk ENV PATH="${PATH}:/root/.dotnet/tools" # # POWERSHELL installation -RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ + && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ && mkdir -p /opt/microsoft/powershell/7 \ && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -263,6 +272,8 @@ RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERS # rumdl installation # # powershell_formatter installation +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat && pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' # # black installation diff --git a/flavors/java/Dockerfile b/flavors/java/Dockerfile index 413231c5c24..3993388bb9d 100644 --- a/flavors/java/Dockerfile +++ b/flavors/java/Dockerfile @@ -46,6 +46,7 @@ FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck # Next FROM line commented because already managed by another linter # FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck FROM mvdan/shfmt:${BASH_SHFMT_VERSION} AS shfmt +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu FROM hadolint/hadolint:${DOCKERFILE_HADOLINT_VERSION} AS hadolint FROM mstruebing/editorconfig-checker:${EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION} AS editorconfig-checker FROM ghcr.io/yannh/kubeconform:${KUBERNETES_KUBECONFORM_VERSION} AS kubeconform @@ -363,6 +364,9 @@ COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # Next COPY line commented because already managed by another linter # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk add --no-cache libc6-compat + COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=kubeconform /kubeconform /usr/bin/ @@ -450,6 +454,8 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # # clj-kondo installation +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat && curl --retry 5 --retry-delay 5 -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/refs/tags/v${CLJ_KONDO_VERSION}/script/install-clj-kondo \ && chmod +x install-clj-kondo \ && ./install-clj-kondo \ diff --git a/linters/arm_arm_ttk/Dockerfile b/linters/arm_arm_ttk/Dockerfile index 0290c5d0451..4e906932b1f 100644 --- a/linters/arm_arm_ttk/Dockerfile +++ b/linters/arm_arm_ttk/Dockerfile @@ -18,7 +18,7 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START - +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu #FROM__END ################## @@ -48,6 +48,7 @@ FROM python:3.13-alpine3.23 ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #ARG__START +ARG TARGETPLATFORM # renovate: datasource=github-tags depName=PowerShell/PowerShell ARG POWERSHELL_VERSION=7.5.4 # renovate: datasource=github-tags depName=Azure/arm-ttk @@ -146,6 +147,8 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk add --no-cache libc6-compat #COPY__END @@ -154,7 +157,11 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # ARM installation -RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ + && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ && mkdir -p /opt/microsoft/powershell/7 \ && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -163,6 +170,8 @@ RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERS # # arm-ttk installation ENV ARM_TTK_PSD1="${ARM_TTK_DIRECTORY}/arm-ttk/arm-ttk/arm-ttk.psd1" +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat RUN curl --retry 5 --retry-delay 5 -sLO "https://github.com/Azure/arm-ttk/releases/download/${ARM_TTK_VERSION}/${ARM_TTK_NAME}" \ && unzip "${ARM_TTK_NAME}" -d "${ARM_TTK_DIRECTORY}" \ && rm "${ARM_TTK_NAME}" \ diff --git a/linters/bicep_bicep_linter/Dockerfile b/linters/bicep_bicep_linter/Dockerfile index a19bbbe9527..631c4e62373 100644 --- a/linters/bicep_bicep_linter/Dockerfile +++ b/linters/bicep_bicep_linter/Dockerfile @@ -18,7 +18,7 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START - +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu #FROM__END ################## @@ -48,6 +48,7 @@ FROM python:3.13-alpine3.23 ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #ARG__START +ARG TARGETPLATFORM # renovate: datasource=github-tags depName=Azure/bicep ARG BICEP_VERSION=0.39.26 ARG BICEP_EXE='bicep' @@ -144,6 +145,8 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk add --no-cache libc6-compat #COPY__END @@ -152,9 +155,15 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # bicep_linter installation -RUN curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-musl-x64" \ - && chmod +x "${BICEP_EXE}" \ - && mv "${BICEP_EXE}" "${BICEP_DIR}" +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ +&& curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-${POWERSHELL_ARCH}" \ +&& chmod +x "${BICEP_EXE}" \ +&& mv "${BICEP_EXE}" "${BICEP_DIR}" # #OTHER__END diff --git a/linters/clojure_clj_kondo/Dockerfile b/linters/clojure_clj_kondo/Dockerfile index f42531cbcce..6dde2e7eb3a 100644 --- a/linters/clojure_clj_kondo/Dockerfile +++ b/linters/clojure_clj_kondo/Dockerfile @@ -18,7 +18,7 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START - +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu #FROM__END ################## @@ -144,6 +144,8 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk add --no-cache libc6-compat #COPY__END @@ -193,6 +195,8 @@ RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" \ # # clj-kondo installation +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat && curl --retry 5 --retry-delay 5 -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/refs/tags/v${CLJ_KONDO_VERSION}/script/install-clj-kondo \ && chmod +x install-clj-kondo \ && ./install-clj-kondo diff --git a/linters/dart_dartanalyzer/Dockerfile b/linters/dart_dartanalyzer/Dockerfile index 8392832ce5f..c7104122bb9 100644 --- a/linters/dart_dartanalyzer/Dockerfile +++ b/linters/dart_dartanalyzer/Dockerfile @@ -50,6 +50,7 @@ FROM python:3.13-alpine3.23 #ARG__START # renovate: datasource=github-tags depName=sgerrand/alpine-pkg-glibc ARG ALPINE_GLIBC_PACKAGE_VERSION=2.34-r0 +ARG TARGETPLATFORM # renovate: datasource=dart-version depName=dart ARG DART_VERSION='3.10.7' #ARG__END @@ -192,7 +193,11 @@ RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" \ # # dartanalyzer installation - && wget --tries=5 https://storage.googleapis.com/dart-archive/channels/stable/release/${DART_VERSION}/sdk/dartsdk-linux-x64-release.zip -O - -q | unzip -q - \ + && case ${TARGETPLATFORM} in \ + "linux/amd64") DART_ARCH=x64 ;; \ + "linux/arm64") DART_ARCH=arm64 ;; \ +esac \ + && wget --tries=5 https://storage.googleapis.com/dart-archive/channels/stable/release/${DART_VERSION}/sdk/dartsdk-linux-${DART_ARCH}-release.zip -O - -q | unzip -q - \ && mkdir -p /usr/lib/dart \ && mv dart-sdk/* /usr/lib/dart/ \ && chmod +x /usr/lib/dart/bin/dart \ diff --git a/linters/powershell_powershell/Dockerfile b/linters/powershell_powershell/Dockerfile index 800e746b82b..8f8ceef1f77 100644 --- a/linters/powershell_powershell/Dockerfile +++ b/linters/powershell_powershell/Dockerfile @@ -18,7 +18,7 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START - +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu #FROM__END ################## @@ -48,6 +48,7 @@ FROM python:3.13-alpine3.23 ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #ARG__START +ARG TARGETPLATFORM # renovate: datasource=github-tags depName=PowerShell/PowerShell ARG POWERSHELL_VERSION=7.5.4 @@ -146,6 +147,8 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk add --no-cache libc6-compat #COPY__END @@ -154,13 +157,19 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # POWERSHELL installation -RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ + && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ && mkdir -p /opt/microsoft/powershell/7 \ && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ && chmod +x /opt/microsoft/powershell/7/pwsh \ && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh \ # # powershell installation +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat && pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' # #OTHER__END diff --git a/linters/powershell_powershell_formatter/Dockerfile b/linters/powershell_powershell_formatter/Dockerfile index 607e91e2520..0e2fc6e3c99 100644 --- a/linters/powershell_powershell_formatter/Dockerfile +++ b/linters/powershell_powershell_formatter/Dockerfile @@ -18,7 +18,7 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START - +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu #FROM__END ################## @@ -48,6 +48,7 @@ FROM python:3.13-alpine3.23 ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #ARG__START +ARG TARGETPLATFORM # renovate: datasource=github-tags depName=PowerShell/PowerShell ARG POWERSHELL_VERSION=7.5.4 @@ -146,6 +147,8 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk add --no-cache libc6-compat #COPY__END @@ -154,13 +157,19 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # POWERSHELL installation -RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ + && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ && mkdir -p /opt/microsoft/powershell/7 \ && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ && chmod +x /opt/microsoft/powershell/7/pwsh \ && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh \ # # powershell_formatter installation +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk add --no-cache libc6-compat && pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' # #OTHER__END diff --git a/megalinter/descriptors/action.megalinter-descriptor.yml b/megalinter/descriptors/action.megalinter-descriptor.yml index 88bb470d4d8..6312bba4ea2 100644 --- a/megalinter/descriptors/action.megalinter-descriptor.yml +++ b/megalinter/descriptors/action.megalinter-descriptor.yml @@ -55,3 +55,7 @@ linters: COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint - COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/ansible.megalinter-descriptor.yml b/megalinter/descriptors/ansible.megalinter-descriptor.yml index d59daccfbd5..1cce974b023 100644 --- a/megalinter/descriptors/ansible.megalinter-descriptor.yml +++ b/megalinter/descriptors/ansible.megalinter-descriptor.yml @@ -71,3 +71,7 @@ linters: ARG PIP_ANSIBLE_LINT_VERSION=26.1.0 pip: - ansible-lint==${PIP_ANSIBLE_LINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/api.megalinter-descriptor.yml b/megalinter/descriptors/api.megalinter-descriptor.yml index 58dcbaf14de..8673e0354b3 100644 --- a/megalinter/descriptors/api.megalinter-descriptor.yml +++ b/megalinter/descriptors/api.megalinter-descriptor.yml @@ -61,6 +61,10 @@ linters: ARG NPM_SPECTRAL_CLI_VERSION=6.15.0 npm: - "@stoplight/spectral-cli@${NPM_SPECTRAL_CLI_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: stoplight: - name: Native integration diff --git a/megalinter/descriptors/arm.megalinter-descriptor.yml b/megalinter/descriptors/arm.megalinter-descriptor.yml index 0f7beb4be23..04c73fe9c1e 100644 --- a/megalinter/descriptors/arm.megalinter-descriptor.yml +++ b/megalinter/descriptors/arm.megalinter-descriptor.yml @@ -12,11 +12,16 @@ install: apk: - icu-libs dockerfile: + - ARG TARGETPLATFORM - |- # renovate: datasource=github-tags depName=PowerShell/PowerShell ARG POWERSHELL_VERSION=7.5.4 - | - RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ + RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ + esac \ + && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ && mkdir -p /opt/microsoft/powershell/7 \ && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -68,12 +73,21 @@ linters: - ARG ARM_TTK_NAME='arm-ttk.zip' - ARG ARM_TTK_DIRECTORY='/opt/microsoft' - ENV ARM_TTK_PSD1="${ARM_TTK_DIRECTORY}/arm-ttk/arm-ttk/arm-ttk.psd1" + # https://stackoverflow.com/a/73711302 + - FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu + - | + COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ + RUN apk add --no-cache libc6-compat - | RUN curl --retry 5 --retry-delay 5 -sLO "https://github.com/Azure/arm-ttk/releases/download/${ARM_TTK_VERSION}/${ARM_TTK_NAME}" \ && unzip "${ARM_TTK_NAME}" -d "${ARM_TTK_DIRECTORY}" \ && rm "${ARM_TTK_NAME}" \ && ln -sTf "${ARM_TTK_PSD1}" /usr/bin/arm-ttk \ && chmod a+x /usr/bin/arm-ttk + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: ARMTTKExtension diff --git a/megalinter/descriptors/bash.megalinter-descriptor.yml b/megalinter/descriptors/bash.megalinter-descriptor.yml index a16feab0cda..68d71962dc1 100644 --- a/megalinter/descriptors/bash.megalinter-descriptor.yml +++ b/megalinter/descriptors/bash.megalinter-descriptor.yml @@ -58,6 +58,10 @@ linters: - | RUN printf '#!/bin/bash \\n\\nif [[ -x "$1" ]]; then exit 0; else echo "Error: File:[$1] is not executable"; exit 1; fi' > /usr/bin/bash-exec \ && chmod +x /usr/bin/bash-exec + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 variables: - name: ERROR_ON_MISSING_EXEC_BIT description: If set to `false`, the `bash-exec` linter will report a warning if a shell script is not executable. If set to `true`, the `bash-exec` linter will report an error instead @@ -118,6 +122,10 @@ linters: ARG BASH_SHELLCHECK_VERSION=v0.11.0 - FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck - COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: flycheck @@ -179,6 +187,10 @@ linters: ARG BASH_SHFMT_VERSION=v3.12.0-alpine - FROM mvdan/shfmt:${BASH_SHFMT_VERSION} AS shfmt - COPY --link --from=shfmt /bin/shfmt /usr/bin/ + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: emacs-shfmt diff --git a/megalinter/descriptors/bicep.megalinter-descriptor.yml b/megalinter/descriptors/bicep.megalinter-descriptor.yml index ff0f63fc136..eaaf4da1525 100644 --- a/megalinter/descriptors/bicep.megalinter-descriptor.yml +++ b/megalinter/descriptors/bicep.megalinter-descriptor.yml @@ -49,15 +49,29 @@ linters: apk: - icu-libs dockerfile: + - ARG TARGETPLATFORM - |- # renovate: datasource=github-tags depName=Azure/bicep ARG BICEP_VERSION=0.39.26 - ARG BICEP_EXE='bicep' - ARG BICEP_DIR='/usr/local/bin' + # https://stackoverflow.com/a/73711302 + - FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu - | - RUN curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-musl-x64" \ - && chmod +x "${BICEP_EXE}" \ - && mv "${BICEP_EXE}" "${BICEP_DIR}" + COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ + RUN apk add --no-cache libc6-compat + - | + RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ + esac \ + && curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-${POWERSHELL_ARCH}" \ + && chmod +x "${BICEP_EXE}" \ + && mv "${BICEP_EXE}" "${BICEP_DIR}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: VSCode Bicep diff --git a/megalinter/descriptors/c.megalinter-descriptor.yml b/megalinter/descriptors/c.megalinter-descriptor.yml index 95e88f7d821..9cc7968df54 100644 --- a/megalinter/descriptors/c.megalinter-descriptor.yml +++ b/megalinter/descriptors/c.megalinter-descriptor.yml @@ -91,6 +91,10 @@ linters: ARG PIP_CPPLINT_VERSION=2.0.2 pip: - cpplint==${PIP_CPPLINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # clang-format - linter_name: clang-format linter_text: | @@ -133,6 +137,10 @@ linters: install: apk: - "cmd:clang-format" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: Clang-Format diff --git a/megalinter/descriptors/clojure.megalinter-descriptor.yml b/megalinter/descriptors/clojure.megalinter-descriptor.yml index e9719f8cb2c..59311f49b0a 100644 --- a/megalinter/descriptors/clojure.megalinter-descriptor.yml +++ b/megalinter/descriptors/clojure.megalinter-descriptor.yml @@ -88,10 +88,20 @@ linters: - | # renovate: datasource=github-tags depName=clj-kondo/clj-kondo ARG CLJ_KONDO_VERSION=2025.01.16 + # https://stackoverflow.com/a/73711302 + - FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu + - | + COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ + RUN apk add --no-cache libc6-compat - | RUN curl --retry 5 --retry-delay 5 -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/refs/tags/v${CLJ_KONDO_VERSION}/script/install-clj-kondo \ && chmod +x install-clj-kondo \ && ./install-clj-kondo + supported_platforms: + platform: + - linux/amd64 + # https://github.com/sgerrand/alpine-pkg-glibc does not appear to be compatible with ARM or uses older versions of glibc. + #- linux/arm64 ide: emacs: - name: flycheck-clj-kondo @@ -145,6 +155,12 @@ linters: RUN curl --retry 5 --retry-delay 5 -sLO https://raw.githubusercontent.com/greglook/cljstyle/main/util/install-cljstyle \ && chmod +x install-cljstyle \ && ./install-cljstyle --static --version "$CLJ_STYLE_VERSION" + supported_platforms: + platform: + - linux/amd64 + # https://github.com/sgerrand/alpine-pkg-glibc does not appear to be compatible with ARM or uses older versions of glibc. + # https://github.com/greglook/cljstyle/issues/115 + #- linux/arm64 ide: emacs: - name: cljstyle-mode diff --git a/megalinter/descriptors/cloudformation.megalinter-descriptor.yml b/megalinter/descriptors/cloudformation.megalinter-descriptor.yml index 2ce6b360086..c879da1fe75 100644 --- a/megalinter/descriptors/cloudformation.megalinter-descriptor.yml +++ b/megalinter/descriptors/cloudformation.megalinter-descriptor.yml @@ -72,6 +72,10 @@ linters: ARG PIP_CFN_LINT_VERSION=1.43.2 pip: - cfn-lint[sarif]==${PIP_CFN_LINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: cfn-lint diff --git a/megalinter/descriptors/coffee.megalinter-descriptor.yml b/megalinter/descriptors/coffee.megalinter-descriptor.yml index 16c56afafc9..e275edb7818 100644 --- a/megalinter/descriptors/coffee.megalinter-descriptor.yml +++ b/megalinter/descriptors/coffee.megalinter-descriptor.yml @@ -39,6 +39,10 @@ linters: ARG NPM_COFFEELINT_CLI_VERSION=5.2.11 npm: - "@coffeelint/cli@${NPM_COFFEELINT_CLI_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: coffeelint diff --git a/megalinter/descriptors/copypaste.megalinter-descriptor.yml b/megalinter/descriptors/copypaste.megalinter-descriptor.yml index 09aec1a5034..8bb4b867989 100644 --- a/megalinter/descriptors/copypaste.megalinter-descriptor.yml +++ b/megalinter/descriptors/copypaste.megalinter-descriptor.yml @@ -68,3 +68,7 @@ linters: ARG NPM_JSCPD_VERSION=4.0.5 npm: - jscpd@${NPM_JSCPD_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/cpp.megalinter-descriptor.yml b/megalinter/descriptors/cpp.megalinter-descriptor.yml index 98876a25824..e44b26ebc1a 100644 --- a/megalinter/descriptors/cpp.megalinter-descriptor.yml +++ b/megalinter/descriptors/cpp.megalinter-descriptor.yml @@ -49,6 +49,10 @@ linters: install: apk: - cppcheck + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # CPPLINT - class: CppLintLinter linter_name: cpplint @@ -82,6 +86,10 @@ linters: ARG PIP_CPPLINT_VERSION=2.0.2 pip: - cpplint==${PIP_CPPLINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # clang-format - linter_name: clang-format linter_text: | @@ -122,6 +130,10 @@ linters: install: apk: - "cmd:clang-format" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: Clang-Format diff --git a/megalinter/descriptors/csharp.megalinter-descriptor.yml b/megalinter/descriptors/csharp.megalinter-descriptor.yml index 084af189374..4542224bd79 100644 --- a/megalinter/descriptors/csharp.megalinter-descriptor.yml +++ b/megalinter/descriptors/csharp.megalinter-descriptor.yml @@ -57,7 +57,10 @@ linters: - "dotnet format Folder/Solution.sln --verify-no-changes" - "dotnet format Project.csproj --verify-no-changes" - "dotnet format" # Fix - + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # CSharpier - linter_name: csharpier linter_text: | @@ -106,6 +109,10 @@ linters: # renovate: datasource=nuget depName=csharpier ARG CSHARP_CSHARPIER_VERSION=1.2.5 - RUN dotnet tool install --allow-roll-forward --global csharpier --version "${CSHARP_CSHARPIER_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: rider: - name: csharpier @@ -160,6 +167,10 @@ linters: # renovate: datasource=nuget depName=roslynator.dotnet.cli ARG CSHARP_ROSLYNATOR_VERSION=0.12.0 - RUN dotnet tool install --allow-roll-forward --global roslynator.dotnet.cli --version "${CSHARP_ROSLYNATOR_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: visual_studio: - name: Roslynator 2022 diff --git a/megalinter/descriptors/css.megalinter-descriptor.yml b/megalinter/descriptors/css.megalinter-descriptor.yml index b56174c91c5..54ad31fc716 100644 --- a/megalinter/descriptors/css.megalinter-descriptor.yml +++ b/megalinter/descriptors/css.megalinter-descriptor.yml @@ -70,6 +70,10 @@ linters: - stylelint-scss@${NPM_STYLELINT_SCSS_VERSION} pip: - cpplint==${PIP_CPPLINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: flycheck diff --git a/megalinter/descriptors/dart.megalinter-descriptor.yml b/megalinter/descriptors/dart.megalinter-descriptor.yml index 8fbbc5af88a..41bc1a40a79 100644 --- a/megalinter/descriptors/dart.megalinter-descriptor.yml +++ b/megalinter/descriptors/dart.megalinter-descriptor.yml @@ -85,17 +85,27 @@ linters: ## stable dart sdk: https://dart.dev/get-dart#release-channels ## install alpine-pkg-glibc (glibc compatibility layer package for Alpine Linux) dockerfile: + - ARG TARGETPLATFORM - |- # renovate: datasource=dart-version depName=dart ARG DART_VERSION='3.10.7' - | - RUN wget --tries=5 https://storage.googleapis.com/dart-archive/channels/stable/release/${DART_VERSION}/sdk/dartsdk-linux-x64-release.zip -O - -q | unzip -q - \ + RUN case ${TARGETPLATFORM} in \ + "linux/amd64") DART_ARCH=x64 ;; \ + "linux/arm64") DART_ARCH=arm64 ;; \ + esac \ + && wget --tries=5 https://storage.googleapis.com/dart-archive/channels/stable/release/${DART_VERSION}/sdk/dartsdk-linux-${DART_ARCH}-release.zip -O - -q | unzip -q - \ && mkdir -p /usr/lib/dart \ && mv dart-sdk/* /usr/lib/dart/ \ && chmod +x /usr/lib/dart/bin/dart \ && chmod +x /usr/lib/dart/bin/dartaotruntime \ && rm -r dart-sdk/ - ENV PATH="/usr/lib/dart/bin:${PATH}" + supported_platforms: + platform: + - linux/amd64 + # https://github.com/sgerrand/alpine-pkg-glibc does not appear to be compatible with ARM or uses older versions of glibc. + #- linux/arm64 ide: idea: - name: dart-jetbrains-plugin diff --git a/megalinter/descriptors/dockerfile.megalinter-descriptor.yml b/megalinter/descriptors/dockerfile.megalinter-descriptor.yml index 61d29cca34b..dfcf74de201 100644 --- a/megalinter/descriptors/dockerfile.megalinter-descriptor.yml +++ b/megalinter/descriptors/dockerfile.megalinter-descriptor.yml @@ -74,6 +74,10 @@ linters: ARG DOCKERFILE_HADOLINT_VERSION=v2.14.0-alpine - FROM hadolint/hadolint:${DOCKERFILE_HADOLINT_VERSION} AS hadolint - COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: hadolint diff --git a/megalinter/descriptors/editorconfig.megalinter-descriptor.yml b/megalinter/descriptors/editorconfig.megalinter-descriptor.yml index 1d83b027e5e..bae1a30fb57 100644 --- a/megalinter/descriptors/editorconfig.megalinter-descriptor.yml +++ b/megalinter/descriptors/editorconfig.megalinter-descriptor.yml @@ -43,3 +43,7 @@ linters: ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.6.0 - FROM mstruebing/editorconfig-checker:${EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION} AS editorconfig-checker - COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/env.megalinter-descriptor.yml b/megalinter/descriptors/env.megalinter-descriptor.yml index 5964f142db2..9053be5c4ed 100644 --- a/megalinter/descriptors/env.megalinter-descriptor.yml +++ b/megalinter/descriptors/env.megalinter-descriptor.yml @@ -46,3 +46,7 @@ linters: # renovate: datasource=github-tags depName=dotenv-linter/dotenv-linter ARG DOTENV_LINTER_VERSION=4.0.0 - RUN wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s -- -b /usr/local/bin "v${DOTENV_LINTER_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/gherkin.megalinter-descriptor.yml b/megalinter/descriptors/gherkin.megalinter-descriptor.yml index 47f93993429..ad67ea20fbc 100644 --- a/megalinter/descriptors/gherkin.megalinter-descriptor.yml +++ b/megalinter/descriptors/gherkin.megalinter-descriptor.yml @@ -46,3 +46,7 @@ linters: ARG NPM_GHERKIN_LINT_VERSION=4.2.4 npm: - gherkin-lint@${NPM_GHERKIN_LINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/go.megalinter-descriptor.yml b/megalinter/descriptors/go.megalinter-descriptor.yml index 68b1482e754..57987872d1e 100644 --- a/megalinter/descriptors/go.megalinter-descriptor.yml +++ b/megalinter/descriptors/go.megalinter-descriptor.yml @@ -82,6 +82,10 @@ linters: - | RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s "v${GO_GOLANGCI_LINT_VERSION}" \ && golangci-lint --version + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: flycheck-golandci-lint @@ -155,6 +159,10 @@ linters: 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 + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vim: - name: ale diff --git a/megalinter/descriptors/graphql.megalinter-descriptor.yml b/megalinter/descriptors/graphql.megalinter-descriptor.yml index cf6b61f4a2c..80075ef8ad6 100644 --- a/megalinter/descriptors/graphql.megalinter-descriptor.yml +++ b/megalinter/descriptors/graphql.megalinter-descriptor.yml @@ -46,3 +46,7 @@ linters: npm: - graphql@${NPM_GRAPHQL_VERSION} - graphql-schema-linter@${NPM_GRAPHQL_SCHEMA_LINTER_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/groovy.megalinter-descriptor.yml b/megalinter/descriptors/groovy.megalinter-descriptor.yml index b63eca4d718..26921f04f3d 100644 --- a/megalinter/descriptors/groovy.megalinter-descriptor.yml +++ b/megalinter/descriptors/groovy.megalinter-descriptor.yml @@ -65,6 +65,10 @@ linters: ARG NPM_GROOVY_LINT_VERSION=16.1.1 npm: - npm-groovy-lint@${NPM_GROOVY_LINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: VSCode Groovy Lint diff --git a/megalinter/descriptors/html.megalinter-descriptor.yml b/megalinter/descriptors/html.megalinter-descriptor.yml index 010a6d53692..a4b85ac9bad 100644 --- a/megalinter/descriptors/html.megalinter-descriptor.yml +++ b/megalinter/descriptors/html.megalinter-descriptor.yml @@ -44,6 +44,10 @@ linters: ARG PIP_DJLINT_VERSION=1.36.4 pip: - djlint==${PIP_DJLINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: sublime: - name: SublimeLinter-contrib-djlint @@ -91,6 +95,10 @@ linters: ARG NPM_HTMLHINT_VERSION=1.8.0 npm: - htmlhint@${NPM_HTMLHINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: brackets: - name: brackets-htmlhint diff --git a/megalinter/descriptors/java.megalinter-descriptor.yml b/megalinter/descriptors/java.megalinter-descriptor.yml index 8fc8fd589e5..2b11370cc1c 100644 --- a/megalinter/descriptors/java.megalinter-descriptor.yml +++ b/megalinter/descriptors/java.megalinter-descriptor.yml @@ -6,6 +6,10 @@ descriptor_flavors: - java file_extensions: - ".java" +supported_platforms: + platform: + - linux/amd64 + - linux/arm64 install: apk: - openjdk21 @@ -63,6 +67,10 @@ linters: RUN curl --retry 5 --retry-delay 5 -sSL \ "https://github.com/checkstyle/checkstyle/releases/download/checkstyle-${JAVA_CHECKSTYLE_VERSION}/checkstyle-${JAVA_CHECKSTYLE_VERSION}-all.jar" \ --output /usr/bin/checkstyle + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: eclipse: - name: eclipse-cs @@ -122,3 +130,7 @@ linters: rm pmd-dist-${PMD_VERSION}-bin.zip || echo "Error rm" && \ mv pmd-bin-${PMD_VERSION} /usr/bin/pmd || echo "Error mv" && \ chmod +x /usr/bin/pmd/bin/pmd || echo "Error chmod" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/javascript.megalinter-descriptor.yml b/megalinter/descriptors/javascript.megalinter-descriptor.yml index 7316f0568ca..395ff384aee 100644 --- a/megalinter/descriptors/javascript.megalinter-descriptor.yml +++ b/megalinter/descriptors/javascript.megalinter-descriptor.yml @@ -138,6 +138,10 @@ linters: - "@babel/core@${NPM_BABEL_CORE_VERSION}" - "@babel/eslint-parser@${NPM_BABEL_ESLINT_PARSER_VERSION}" - "@microsoft/eslint-formatter-sarif@${NPM_MICROSOFT_ESLINT_FORMATTER_SARIF_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: brackets: - name: brackets-eslint @@ -205,6 +209,10 @@ linters: ARG NPM_STANDARD_VERSION=17.1.2 npm: - standard@${NPM_STANDARD_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: brackets: - name: brackets-standard @@ -270,6 +278,10 @@ linters: ARG NPM_PRETTIER_VERSION=3.7.4 npm: - "prettier@${NPM_PRETTIER_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: prettier-emacs diff --git a/megalinter/descriptors/json.megalinter-descriptor.yml b/megalinter/descriptors/json.megalinter-descriptor.yml index 7412cfba297..76ee5dfbcda 100644 --- a/megalinter/descriptors/json.megalinter-descriptor.yml +++ b/megalinter/descriptors/json.megalinter-descriptor.yml @@ -43,6 +43,10 @@ linters: ARG NPM_PRANTLF_JSONLINT_VERSION=17.0.0 npm: - "@prantlf/jsonlint@${NPM_PRANTLF_JSONLINT_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # ESLINT-PLUGIN-JSONC - class: EslintLinter disabled: true @@ -160,6 +164,10 @@ linters: - eslint@${NPM_ESLINT_VERSION} - eslint-plugin-jsonc@${NPM_ESLINT_PLUGIN_JSONC_VERSION} - "@microsoft/eslint-formatter-sarif@${NPM_MICROSOFT_ESLINT_FORMATTER_SARIF_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: vscode-eslint @@ -196,6 +204,10 @@ linters: ARG NPM_V8R_VERSION=5.1.0 npm: - v8r@${NPM_V8R_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: eclipse: - name: native support @@ -252,6 +264,10 @@ linters: ARG NPM_PRETTIER_VERSION=3.7.4 npm: - "prettier@${NPM_PRETTIER_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: prettier-emacs @@ -334,3 +350,7 @@ linters: npm: - "npm-package-json-lint@${NPM_PACKAGE_JSON_LINT_VERSION}" - "npm-package-json-lint-config-default@${NPM_PACKAGE_JSON_LINT_CONFIG_DEFAULT_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/jsx.megalinter-descriptor.yml b/megalinter/descriptors/jsx.megalinter-descriptor.yml index d459007b759..ec881b6a9d1 100644 --- a/megalinter/descriptors/jsx.megalinter-descriptor.yml +++ b/megalinter/descriptors/jsx.megalinter-descriptor.yml @@ -81,6 +81,10 @@ linters: - eslint-plugin-react@${NPM_ESLINT_PLUGIN_REACT_VERSION} - eslint-plugin-jsx-a11y@${NPM_ESLINT_PLUGIN_JSX_ALLY_VERSION} - "@microsoft/eslint-formatter-sarif@${NPM_MICROSOFT_ESLINT_FORMATTER_SARIF_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: brackets: - name: brackets-eslint diff --git a/megalinter/descriptors/kotlin.megalinter-descriptor.yml b/megalinter/descriptors/kotlin.megalinter-descriptor.yml index c1bc8ffd48f..455fb9d2c61 100644 --- a/megalinter/descriptors/kotlin.megalinter-descriptor.yml +++ b/megalinter/descriptors/kotlin.megalinter-descriptor.yml @@ -56,6 +56,10 @@ linters: RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/download/${KTLINT_VERSION}/ktlint && \ chmod a+x ktlint && \ mv "ktlint" /usr/bin/ + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: flycheck-kotlin @@ -115,6 +119,10 @@ linters: 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 + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: flycheck-kotlin diff --git a/megalinter/descriptors/kubernetes.megalinter-descriptor.yml b/megalinter/descriptors/kubernetes.megalinter-descriptor.yml index f083553fe25..f109f06ca60 100644 --- a/megalinter/descriptors/kubernetes.megalinter-descriptor.yml +++ b/megalinter/descriptors/kubernetes.megalinter-descriptor.yml @@ -58,7 +58,10 @@ linters: ARG KUBERNETES_KUBECONFORM_VERSION=v0.7.0-alpine - FROM ghcr.io/yannh/kubeconform:${KUBERNETES_KUBECONFORM_VERSION} AS kubeconform - COPY --link --from=kubeconform /kubeconform /usr/bin/ - + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # HELM LINT - linter_name: helm name: KUBERNETES_HELM @@ -97,6 +100,10 @@ linters: install: apk: - helm + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # KUBESCAPE - class: KubescapeLinter linter_name: kubescape @@ -155,3 +162,7 @@ linters: - |- RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v "v${KUBERNETES_KUBESCAPE_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/latex.megalinter-descriptor.yml b/megalinter/descriptors/latex.megalinter-descriptor.yml index c5459481b04..3833557141b 100644 --- a/megalinter/descriptors/latex.megalinter-descriptor.yml +++ b/megalinter/descriptors/latex.megalinter-descriptor.yml @@ -44,6 +44,9 @@ linters: - FROM ghcr.io/assignuser/chktex-alpine:latest AS chktex - COPY --link --from=chktex /usr/bin/chktex /usr/bin/ - RUN cd ~ && touch .chktexrc && cd / + supported_platforms: + platform: + - linux/amd64 ide: vscode: - name: latex-workshop diff --git a/megalinter/descriptors/lua.megalinter-descriptor.yml b/megalinter/descriptors/lua.megalinter-descriptor.yml index 9768250bea5..fca4fb6ac20 100644 --- a/megalinter/descriptors/lua.megalinter-descriptor.yml +++ b/megalinter/descriptors/lua.megalinter-descriptor.yml @@ -60,6 +60,10 @@ linters: && cd .. && rm -r luarocks-${LUA_LUACHECK_VERSION}-super-linter/ \ && luarocks install luacheck \ && cd / + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: brackets: - name: brackets-luacheck @@ -113,6 +117,10 @@ linters: - |- # renovate: datasource=crate depName=selene ARG CARGO_SELENE_VERSION=0.29.0 + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: neovim: - name: nvim-lint @@ -163,6 +171,10 @@ linters: - |- # renovate: datasource=crate depName=stylua ARG CARGO_STYLUA_VERSION=2.0.0 + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: neovim: - name: diff --git a/megalinter/descriptors/makefile.megalinter-descriptor.yml b/megalinter/descriptors/makefile.megalinter-descriptor.yml index db98afe1407..f88321af310 100644 --- a/megalinter/descriptors/makefile.megalinter-descriptor.yml +++ b/megalinter/descriptors/makefile.megalinter-descriptor.yml @@ -54,3 +54,6 @@ linters: ARG MAKEFILE_CHECKMAKE_VERSION=v0.3.2 - FROM quay.io/checkmake/checkmake:${MAKEFILE_CHECKMAKE_VERSION} AS checkmake - COPY --link --from=checkmake /checkmake /usr/bin/checkmake + supported_platforms: + platform: + - linux/amd64 diff --git a/megalinter/descriptors/markdown.megalinter-descriptor.yml b/megalinter/descriptors/markdown.megalinter-descriptor.yml index 0317a014849..6965fcf7d81 100644 --- a/megalinter/descriptors/markdown.megalinter-descriptor.yml +++ b/megalinter/descriptors/markdown.megalinter-descriptor.yml @@ -54,6 +54,10 @@ linters: ARG NPM_MARKDOWNLINT_CLI_VERSION=0.47.0 npm: - markdownlint-cli@${NPM_MARKDOWNLINT_CLI_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: sublime: - name: SublimeLinter-contrib-markdownlint @@ -119,6 +123,10 @@ linters: npm: - remark-cli@${NPM_REMARK_CLI_VERSION} - remark-preset-lint-recommended@${NPM_REMARK_PRESET_LINT_RECOMMENDED_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: sublime: - name: SublimeLinter-contrib-remark-lint @@ -166,6 +174,10 @@ linters: ARG NPM_MARKDOWN_TABLE_FORMATTER_VERSION=1.7.0 npm: - markdown-table-formatter@${NPM_MARKDOWN_TABLE_FORMATTER_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: Markdown Table Prettify Extension @@ -221,6 +233,10 @@ linters: ARG RUMDL_MYPY_VERSION=0.0.213 pip: - rumdl==${RUMDL_MYPY_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: rumdl - Markdown Linter diff --git a/megalinter/descriptors/perl.megalinter-descriptor.yml b/megalinter/descriptors/perl.megalinter-descriptor.yml index dfeafae4491..367c5678e64 100644 --- a/megalinter/descriptors/perl.megalinter-descriptor.yml +++ b/megalinter/descriptors/perl.megalinter-descriptor.yml @@ -15,6 +15,10 @@ install: apk: - perl - perl-dev +supported_platforms: + platform: + - linux/amd64 + - linux/arm64 linters: # PERL CRITIC - linter_name: perlcritic @@ -52,3 +56,7 @@ linters: - | RUN curl -fsSL https://raw.githubusercontent.com/skaji/cpm/refs/tags/${PERL_PERLCRITIC_VERSION}/cpm | perl - install -g --show-build-log-on-failure --without-build --without-test --without-runtime Perl::Critic \ && rm -rf /root/.perl-cpm + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/php.megalinter-descriptor.yml b/megalinter/descriptors/php.megalinter-descriptor.yml index 93b4269c608..5e1063aa2ca 100644 --- a/megalinter/descriptors/php.megalinter-descriptor.yml +++ b/megalinter/descriptors/php.megalinter-descriptor.yml @@ -27,6 +27,10 @@ install: - RUN update-alternatives --install /usr/bin/php php /usr/bin/php84 110 - COPY --from=composer/composer:2-bin /composer /usr/bin/composer - ENV PATH="/root/.composer/vendor/bin:${PATH}" +supported_platforms: + platform: + - linux/amd64 + - linux/arm64 linters: # PHPCS - linter_name: phpcs @@ -75,6 +79,10 @@ linters: ARG PHP_BARTLETT_SARIF_PHP_CONVERTERS_VERSION=1.4.0 - | RUN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && composer global require squizlabs/php_codesniffer:${PHP_SQUIZLABS_PHP_CODESNIFFER_VERSION} bartlett/sarif-php-converters:${PHP_BARTLETT_SARIF_PHP_CONVERTERS_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: phpcs @@ -145,6 +153,10 @@ linters: vscode: - name: vscode-phpstan url: https://marketplace.visualstudio.com/items?itemName=calsmurf2904.vscode-phpstan + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # PSALM - linter_name: psalm linter_text: | @@ -192,6 +204,10 @@ linters: ARG PHP_VIMEO_PSALM_VERSION=6.14.3 - | RUN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && composer global require vimeo/psalm:${PHP_VIMEO_PSALM_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: PHPStan / Psalm / Generics @@ -240,6 +256,10 @@ linters: ARG PHP_BARTLETT_SARIF_PHP_CONVERTERS_VERSION=1.4.0 - | RUN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && composer global require overtrue/phplint:${PHP_OVERTRUE_PHPLINT_VERSION} bartlett/sarif-php-converters:${PHP_BARTLETT_SARIF_PHP_CONVERTERS_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # PHP-CS-Fixer - linter_name: php-cs-fixer name: PHP_PHPCSFIXER diff --git a/megalinter/descriptors/powershell.megalinter-descriptor.yml b/megalinter/descriptors/powershell.megalinter-descriptor.yml index 88ec877d1b1..7d06ee3484e 100644 --- a/megalinter/descriptors/powershell.megalinter-descriptor.yml +++ b/megalinter/descriptors/powershell.megalinter-descriptor.yml @@ -20,11 +20,16 @@ install: apk: - icu-libs dockerfile: + - ARG TARGETPLATFORM - | # renovate: datasource=github-tags depName=PowerShell/PowerShell ARG POWERSHELL_VERSION=7.5.4 - | - RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ + RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ + esac \ + && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ && mkdir -p /opt/microsoft/powershell/7 \ && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -67,7 +72,16 @@ linters: - | # renovate: datasource=nuget depName=PSScriptAnalyzer registryUrl=https://www.powershellgallery.com/api/v2/ ARG PSSA_VERSION='1.24.0' + # https://stackoverflow.com/a/73711302 + - FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu + - | + COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ + RUN apk add --no-cache libc6-compat - RUN pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: VSCode PowerShell extension @@ -111,7 +125,16 @@ linters: - | # renovate: datasource=nuget depName=PSScriptAnalyzer registryUrl=https://www.powershellgallery.com/api/v2/ ARG PSSA_VERSION='1.24.0' + # https://stackoverflow.com/a/73711302 + - FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu + - | + COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ + RUN apk add --no-cache libc6-compat - RUN pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: VSCode PowerShell extension diff --git a/megalinter/descriptors/protobuf.megalinter-descriptor.yml b/megalinter/descriptors/protobuf.megalinter-descriptor.yml index 0b582e4457c..13b04493da9 100644 --- a/megalinter/descriptors/protobuf.megalinter-descriptor.yml +++ b/megalinter/descriptors/protobuf.megalinter-descriptor.yml @@ -46,6 +46,10 @@ linters: ARG PROTOBUF_PROTOLINT_VERSION=0.56.4 - FROM yoheimuta/protolint:${PROTOBUF_PROTOLINT_VERSION} AS protolint - COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: Protocol Buffer Linter diff --git a/megalinter/descriptors/puppet.megalinter-descriptor.yml b/megalinter/descriptors/puppet.megalinter-descriptor.yml index 6a6063bdb4b..30b64a34d8e 100644 --- a/megalinter/descriptors/puppet.megalinter-descriptor.yml +++ b/megalinter/descriptors/puppet.megalinter-descriptor.yml @@ -44,6 +44,10 @@ linters: ARG GEM_PUPPET_LINT_VERSION=5.1.1 gem: - puppet-lint:${GEM_PUPPET_LINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: Puppet VSCode Extension diff --git a/megalinter/descriptors/python.megalinter-descriptor.yml b/megalinter/descriptors/python.megalinter-descriptor.yml index 0b2cbdd7b32..4045269685f 100644 --- a/megalinter/descriptors/python.megalinter-descriptor.yml +++ b/megalinter/descriptors/python.megalinter-descriptor.yml @@ -74,6 +74,10 @@ linters: pip: - pylint==${PIP_PYLINT_VERSION} - typing-extensions==${PIP_TYPING_EXTENSIONS_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: eclipse: - name: PyLint @@ -162,6 +166,10 @@ linters: ARG PIP_BLACK_VERSION=25.12.0 pip: - black[jupyter]==${PIP_BLACK_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: blacken @@ -216,6 +224,10 @@ linters: ARG PIP_FLAKE8_VERSION=7.3.0 pip: - flake8==${PIP_FLAKE8_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: Flake8 @@ -279,6 +291,10 @@ linters: pip: - black==${PIP_BLACK_VERSION} - isort==${PIP_ISORT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: py-isort.el @@ -369,6 +385,10 @@ linters: - bandit==${PIP_BANDIT_VERSION} - bandit_sarif_formatter==${PIP_BANDIT_SARIF_FORMATTER_VERSION} - bandit[toml]==${PIP_BANDIT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: sublime: - name: SublimeLinter-bandit @@ -428,6 +448,10 @@ linters: - ENV MYPY_CACHE_DIR=/tmp # Avoid mypy cache to mess with other linters pip: - mypy==${PIP_MYPY_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: Flycheck mypy @@ -518,6 +542,10 @@ linters: ARG NPM_PYRIGHT_VERSION=1.1.407 npm: - pyright@${NPM_PYRIGHT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: LSP-pyright @@ -585,6 +613,10 @@ linters: ARG PIP_RUFF_VERSION=0.14.11 pip: - ruff==${PIP_RUFF_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: Ruff @@ -646,6 +678,10 @@ linters: ARG PIP_RUFF_VERSION=0.14.11 pip: - ruff==${PIP_RUFF_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: Ruff diff --git a/megalinter/descriptors/r.megalinter-descriptor.yml b/megalinter/descriptors/r.megalinter-descriptor.yml index 50d95b4bd13..193f068cbba 100644 --- a/megalinter/descriptors/r.megalinter-descriptor.yml +++ b/megalinter/descriptors/r.megalinter-descriptor.yml @@ -51,6 +51,10 @@ linters: && cp -r /usr/lib/R/library/ /home/r-library/ \ && Rscript -e "install.packages(c('lintr','purrr'), repos = 'https://cloud.r-project.org/')" \ && R -e "install.packages(list.dirs('/home/r-library',recursive = FALSE), repos = NULL, type = 'source')" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: flycheck diff --git a/megalinter/descriptors/raku.megalinter-descriptor.yml b/megalinter/descriptors/raku.megalinter-descriptor.yml index 32a573dda9d..eb8ca764d0e 100644 --- a/megalinter/descriptors/raku.megalinter-descriptor.yml +++ b/megalinter/descriptors/raku.megalinter-descriptor.yml @@ -49,6 +49,11 @@ linters: && apk add --no-cache --allow-untrusted "rakudo-pkg-Alpine${RAKU_RAKU_ALPINE_VERSION}_${RAKU_RAKU_VERSION}-01_x86_64.apk" \ && rm "rakudo-pkg-Alpine${RAKU_RAKU_ALPINE_VERSION}_${RAKU_RAKU_VERSION}-01_x86_64.apk" - ENV PATH="~/.raku/bin:/opt/rakudo-pkg/bin:/opt/rakudo-pkg/share/perl6/site/bin:$PATH" + supported_platforms: + platform: + - linux/amd64 + # https://github.com/nxadm/rakudo-pkg/issues/96 + #- linux/arm64 ide: vscode: - name: Perl6 Language Support diff --git a/megalinter/descriptors/repository.megalinter-descriptor.yml b/megalinter/descriptors/repository.megalinter-descriptor.yml index cf925f6aec3..1825de0c2f7 100644 --- a/megalinter/descriptors/repository.megalinter-descriptor.yml +++ b/megalinter/descriptors/repository.megalinter-descriptor.yml @@ -65,6 +65,10 @@ linters: ARG PIP_CHECKOV_VERSION=3.2.497 pip: - checkov==${PIP_CHECKOV_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 test_folder: repository_checkov # DEVSKIM @@ -136,11 +140,14 @@ linters: - RUN apk add --no-cache dotnet9-sdk - ENV PATH="${PATH}:/root/.dotnet/tools" - RUN dotnet tool install --allow-roll-forward --global Microsoft.CST.DevSkim.CLI --version ${REPOSITORY_DEVSKIM_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: VSCode DevSkim url: https://marketplace.visualstudio.com/items?itemName=MS-CST-E.vscode-devskim - # DUSTILOCK - class: DustilockLinter linter_name: dustilock @@ -189,7 +196,10 @@ linters: ARG REPOSITORY_DUSTILOCK_VERSION RUN apk add --no-cache git && GOBIN=/usr/bin go install github.com/checkmarx/dustilock@v${REPOSITORY_DUSTILOCK_VERSION} - COPY --link --from=dustilock /usr/bin/dustilock /usr/bin/dustilock - + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # GIT_DIFF - linter_name: git_diff lint_all_files: true @@ -217,7 +227,10 @@ linters: cli_help_arg_name: "--help" examples: - "git diff --check" - + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # GITLEAKS - class: GitleaksLinter linter_name: gitleaks @@ -359,6 +372,10 @@ linters: ARG REPOSITORY_GITLEAKS_VERSION=v8.30.0 - FROM zricethezav/gitleaks:${REPOSITORY_GITLEAKS_VERSION} AS gitleaks - COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 variables: - name: REPOSITORY_GITLEAKS_PR_COMMITS_SCAN description: Scan only commits in the current Pull Request/Merge Request @@ -421,6 +438,10 @@ linters: # renovate: datasource=github-tags depName=anchore/grype ARG REPOSITORY_GRYPE_VERSION=0.104.4 - RUN curl -sSfL https://raw.githubusercontent.com/anchore/grype/refs/tags/v${REPOSITORY_GRYPE_VERSION}/install.sh | sh -s -- -b /usr/local/bin + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 test_folder: repository_grype # KICS @@ -485,6 +506,10 @@ linters: - COPY --link --from=kics /app/bin/kics /usr/bin/kics - ENV KICS_QUERIES_PATH=/usr/bin/assets/queries KICS_LIBRARIES_PATH=/usr/bin/assets/libraries - COPY --from=kics /app/bin/assets /usr/bin/assets + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 test_folder: repository_kics # LS-LINT @@ -524,6 +549,10 @@ linters: ARG NPM_LS_LINT_LS_LINT_VERSION=2.3.1 npm: - "@ls-lint/ls-lint@${NPM_LS_LINT_LS_LINT_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # SECRETLINT - class: SecretLintLinter @@ -586,7 +615,10 @@ linters: - secretlint@${NPM_SECRETLINT_VERSION} - "@secretlint/secretlint-rule-preset-recommend@${NPM_SECRETLINT_SECRETLINT_RULE_PRESET_RECOMMEND_VERSION}" - "@secretlint/secretlint-formatter-sarif@${NPM_SECRETLINT_SECRETLINT_FORMATTER_SARIF_VERSION}" - + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # SEMGREP - class: SemgrepLinter linter_name: semgrep @@ -653,11 +685,14 @@ linters: - name: REPOSITORY_SEMGREP_RULESETS_TYPE description: "MegaLinter semgrep ruleset list preset id . Available values: security" default_value: "" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: VSCode SemGrep url: https://marketplace.visualstudio.com/items?itemName=semgrep.semgrep - # SYFT - class: SyftLinter linter_name: syft @@ -706,7 +741,10 @@ linters: # renovate: datasource=github-tags depName=anchore/syft ARG REPOSITORY_SYFT_VERSION=1.40.0 - RUN curl -sSfL https://raw.githubusercontent.com/anchore/syft/refs/tags/v${REPOSITORY_SYFT_VERSION}/install.sh | sh -s -- -b /usr/local/bin - + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # TRIVY - linter_name: trivy class: TrivyLinter @@ -766,6 +804,10 @@ linters: - | RUN wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin "v${REPOSITORY_TRIVY_VERSION}" \ && (trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress) + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: VSCode Trivy @@ -827,6 +869,10 @@ linters: - | RUN wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin "v${REPOSITORY_TRIVY_SBOM_VERSION}" \ && (trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress) + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: VSCode Trivy @@ -880,6 +926,10 @@ linters: ARG REPOSITORY_TRUFFLEHOG_VERSION=3.92.4 - FROM trufflesecurity/trufflehog:${REPOSITORY_TRUFFLEHOG_VERSION} AS trufflehog - COPY --link --from=trufflehog /usr/bin/trufflehog /usr/bin/ + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 test_folder: gitleaks # kingfisher - linter_name: kingfisher @@ -924,3 +974,7 @@ linters: ARG REPOSITORY_KINGFISHER_VERSION=1.73.0 - | RUN curl --silent --location https://raw.githubusercontent.com/mongodb/kingfisher/main/scripts/install-kingfisher.sh | bash -s -- /usr/local/bin --tag "v${REPOSITORY_KINGFISHER_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/robotframework.megalinter-descriptor.yml b/megalinter/descriptors/robotframework.megalinter-descriptor.yml index 8bdfaaff6d3..3e8e89bc27c 100644 --- a/megalinter/descriptors/robotframework.megalinter-descriptor.yml +++ b/megalinter/descriptors/robotframework.megalinter-descriptor.yml @@ -52,6 +52,10 @@ linters: ARG PIP_ROBOT_FRAMEWORK_ROBOCOP_VERSION=7.2.0 pip: - robotframework-robocop==${PIP_ROBOT_FRAMEWORK_ROBOCOP_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: RobotCode diff --git a/megalinter/descriptors/rst.megalinter-descriptor.yml b/megalinter/descriptors/rst.megalinter-descriptor.yml index 3749c847d87..276041c8a12 100644 --- a/megalinter/descriptors/rst.megalinter-descriptor.yml +++ b/megalinter/descriptors/rst.megalinter-descriptor.yml @@ -46,6 +46,10 @@ linters: pip: - Pygments==${PIP_PYGMENTS_VERSION} - restructuredtext_lint==${PIP_RESTRUCTUREDTEXT_LINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # rstcheck - linter_name: rstcheck linter_text: | @@ -86,6 +90,10 @@ linters: pip: - click==${PIP_RSTCHECK_CLICK_VERSION} # Downgrade click as 8.2.0 triggers and error - rstcheck[toml,sphinx]==${PIP_RSTCHECK_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: vscode-restructuredtext @@ -128,3 +136,7 @@ linters: pip: - rstfmt==${PIP_RSTFMT_VERSION} version_extract_regex: "(?<=rstfmt )\\d+(\\.\\d+)+" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/ruby.megalinter-descriptor.yml b/megalinter/descriptors/ruby.megalinter-descriptor.yml index 7e81dd11ae1..ea0b1abef55 100644 --- a/megalinter/descriptors/ruby.megalinter-descriptor.yml +++ b/megalinter/descriptors/ruby.megalinter-descriptor.yml @@ -62,6 +62,10 @@ linters: - rubocop-rails:${GEM_RUBOCOP_RAILS_VERSION} - rubocop-rake:${GEM_RUBOCOP_RAKE_VERSION} - rubocop-rspec:${GEM_RUBOCOP_RSPEC_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: brackets: - name: brackets-rubocop diff --git a/megalinter/descriptors/rust.megalinter-descriptor.yml b/megalinter/descriptors/rust.megalinter-descriptor.yml index de0a9a25f19..64f42b4500b 100644 --- a/megalinter/descriptors/rust.megalinter-descriptor.yml +++ b/megalinter/descriptors/rust.megalinter-descriptor.yml @@ -38,6 +38,10 @@ linters: install: cargo: - clippy + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: rust-analyzer diff --git a/megalinter/descriptors/salesforce.megalinter-descriptor.yml b/megalinter/descriptors/salesforce.megalinter-descriptor.yml index 14e7c4f4868..782082e65f6 100644 --- a/megalinter/descriptors/salesforce.megalinter-descriptor.yml +++ b/megalinter/descriptors/salesforce.megalinter-descriptor.yml @@ -30,6 +30,18 @@ install: # Salesforce DX npm: - "@salesforce/cli@${NPM_SALESFORCE_CLI_VERSION}" +supported_platforms: + platform: + - linux/amd64 + - linux/arm64 + install_override: + - platform: linux/arm64 + install: + dockerfile: + - ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk + - ENV PATH="$JAVA_HOME/bin:${PATH}" + - ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true + - RUN echo y|sfdx plugins:install sfdx-hardis linters: # Code Analyzer Apex - linter_name: code-analyzer-apex @@ -343,6 +355,10 @@ linters: RUN sf plugins install @salesforce/sfdx-scanner@${SALESFORCE_SFDX_SCANNER_VERSION} \ && (npm cache clean --force || true) \ && rm -rf /root/.npm/_cacache + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: eclipse: - name: pmd-eclipse-plugin @@ -429,6 +445,10 @@ linters: RUN sf plugins install @salesforce/sfdx-scanner@${SALESFORCE_SFDX_SCANNER_VERSION} \ && (npm cache clean --force || true) \ && rm -rf /root/.npm/_cacache + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: Salesforce Extension Pack @@ -506,6 +526,10 @@ linters: RUN sf plugins install @salesforce/sfdx-scanner@${SALESFORCE_SFDX_SCANNER_VERSION} \ && (npm cache clean --force || true) \ && rm -rf /root/.npm/_cacache + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: Salesforce Extension Pack diff --git a/megalinter/descriptors/scala.megalinter-descriptor.yml b/megalinter/descriptors/scala.megalinter-descriptor.yml index f2ab1e8ab57..c1f3ed6071b 100644 --- a/megalinter/descriptors/scala.megalinter-descriptor.yml +++ b/megalinter/descriptors/scala.megalinter-descriptor.yml @@ -12,6 +12,10 @@ install: - | RUN curl --retry-all-errors --retry 10 -fLo coursier https://git.io/coursier-cli && \ chmod +x coursier +supported_platforms: + platform: + - linux/amd64 + - linux/arm64 linters: # SCALAFIX - linter_name: scalafix @@ -50,3 +54,7 @@ linters: install: dockerfile: - RUN ./coursier install scalafix --quiet --install-dir /usr/bin && rm -rf /root/.cache + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json b/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json index 93818e31727..cbf9b2b038e 100644 --- a/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json +++ b/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json @@ -10060,6 +10060,7 @@ }, "JAVASCRIPT_DEFAULT_STYLE": { "$id": "#/properties/JAVASCRIPT_DEFAULT_STYLE", + "default": "prettier", "description": "Style of javascript formatting to apply", "enum": [ "standard", @@ -10073,7 +10074,6 @@ "standard", "prettier" ], - "default": "prettier", "title": "Javascript default style", "type": "string", "x-category": "JAVASCRIPT", @@ -15487,6 +15487,7 @@ }, "MARKDOWN_DEFAULT_STYLE": { "$id": "#/properties/MARKDOWN_DEFAULT_STYLE", + "default": "markdownlint", "description": "Style of markdown formatting to apply", "enum": [ "markdownlint", @@ -15498,7 +15499,6 @@ "Remark Lint", "Rumdl" ], - "default": "markdownlint", "title": "Markdown default formatting style", "type": "string", "x-category": "MARKDOWN", @@ -19954,6 +19954,7 @@ }, "PYTHON_DEFAULT_STYLE": { "$id": "#/properties/PYTHON_DEFAULT_STYLE", + "default": "black", "description": "Style of python formatting to apply", "enum": [ "black", @@ -19967,7 +19968,6 @@ "black", "ruff" ], - "default": "black", "title": "Python default style", "type": "string", "x-category": "PYTHON", @@ -32718,6 +32718,7 @@ }, "TYPESCRIPT_DEFAULT_STYLE": { "$id": "#/properties/TYPESCRIPT_DEFAULT_STYLE", + "default": "prettier", "description": "Style of typescript formatting to apply", "enum": [ "standard", @@ -32731,7 +32732,6 @@ "standard", "prettier" ], - "default": "prettier", "title": "Typescript default style", "type": "string", "x-category": "TYPESCRIPT", diff --git a/megalinter/descriptors/schemas/megalinter-descriptor.jsonschema.json b/megalinter/descriptors/schemas/megalinter-descriptor.jsonschema.json index a20edffba19..83e7de28b1c 100644 --- a/megalinter/descriptors/schemas/megalinter-descriptor.jsonschema.json +++ b/megalinter/descriptors/schemas/megalinter-descriptor.jsonschema.json @@ -1320,6 +1320,114 @@ "title": "SARIF default output file", "type": "string" }, + "supported_platforms": { + "$id": "#/properties/linters/items/properties/supported_platforms", + "default": { + "platform": [ + "linux/amd64" + ] + }, + "description": "Specifies the supported target platforms (OS, CPU architecture, CPU variant) for the linters, and optionally overrides install instructions for a specific platform. Uses the same [architecture naming conventions as Docker](https://docs.docker.com/desktop/multi-arch/).", + "examples": [ + { + "platform": [ + "linux/amd64", + "linux/arm64" + ] + }, + { + "platform": [ + "linux/amd64" + ] + }, + { + "install_override": [ + { + "install": { + "dockerfile": [ + "RUN ML_THIRD_PARTY_DIR=\"/third-party/shellcheck\" \\\n && mkdir -p ${ML_THIRD_PARTY_DIR} \\\n && wget -qO- \"https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.aarch64.tar.xz\" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \\\n && mv \"${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck\" /usr/bin/ \\\n && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \\\n && shellcheck --version\n" + ] + }, + "platform": "linux/arm64" + } + ], + "platform": [ + "linux/amd64", + "linux/arm64" + ] + } + ], + "properties": { + "install_override": { + "$id": "#/properties/linters/items/properties/supported_platforms/properties/install_override", + "description": "Defines special installation steps for a specific platform (OS/CPU architecture/CPU variant), replacing the linter's install instructions given in the `install` node for this target platform only.", + "items": { + "properties": { + "install": { + "$id": "#/properties/linters/items/properties/supported_platforms/properties/install_override/items/properties/install", + "$ref": "#/properties/linters/items/properties/install", + "description": "List of apk, dockerfile instructions, npm/pip/gem packages required to install the linter.\nThese special installation steps replace the instructions in the [`linters` > `install`](#linters_items_install) node when using this target platform pair only." + }, + "platform": { + "$id": "#/properties/linters/items/properties/supported_platforms/properties/install_override/items/properties/platform", + "$ref": "#/properties/linters/items/properties/supported_platforms/properties/platform/items", + "default": "linux/arm64", + "description": "Target platform (OS/CPU architecture/CPU variant) to define special installation steps for.", + "examples": [], + "type": "string" + } + }, + "required": [ + "platform", + "install" + ], + "type": "object" + }, + "title": "Installation requirements override", + "type": "array" + }, + "platform": { + "$id": "#/properties/linters/items/properties/supported_platforms/properties/platform", + "default": [ + "linux/amd64" + ], + "description": "The list of target platforms (OS/CPU architecture/CPU Variant) that this linter supports.", + "examples": [ + [ + "linux/amd64", + "linux/arm64" + ], + [ + "linux/amd64" + ] + ], + "items": { + "default": "linux/amd64", + "description": "Target platforms [available to use on Docker](https://github.com/docker-library/bashbrew/blob/master/architecture/oci-platform.go#L16-L29).\n***Please note that Megalinter does not support all Docker's platforms.***", + "enum": [ + "linux/amd64", + "linux/arm64", + "linux/arm/v7", + "linux/arm/v6", + "linux/arm/v5", + "linux/386", + "linux/mips64le", + "linux/ppc64le", + "linux/riscv64", + "linux/s390x", + "windows/amd64" + ], + "title": "Target platform", + "type": "string" + }, + "title": "List of target platforms", + "type": "array", + "uniqueItems": true + } + }, + "title": "Supported platforms", + "type": "object" + }, "test_folder": { "$id": "#/properties/linters/items/test_folder", "description": "Test folder containing _good_ and _bad_ files, if different from parent descriptor test_folder", @@ -1423,6 +1531,116 @@ "title": "Descriptor processing order", "type": "number" }, + "supported_platforms": { + "$id": "#/properties/supported_platforms", + "default": { + "platform": [ + "linux/amd64" + ] + }, + "description": "Specifies the supported target platforms (OS, CPU architecture, CPU variant) for the install of this descriptor, and optionally overrides install instructions for a specific platform. Uses the same [architecture naming conventions as Docker](https://docs.docker.com/desktop/multi-arch/).", + "examples": [ + { + "platform": [ + "linux/amd64", + "linux/arm64" + ] + }, + { + "platform": [ + "linux/amd64" + ] + }, + { + "install_override": [ + { + "install": { + "dockerfile": [ + "ARG PWSH_VERSION='latest'", + "ARG PWSH_DIRECTORY='/opt/microsoft/powershell'", + "RUN mkdir -p ${PWSH_DIRECTORY} \\\n && curl --retry 5 --retry-delay 5 -s https://api.github.com/repos/powershell/powershell/releases/${PWSH_VERSION} \\\n | grep browser_download_url \\\n | grep linux-arm64 \\\n | cut -d '\"' -f 4 \\\n | xargs -n 1 wget -O - \\\n | tar -xzC ${PWSH_DIRECTORY} \\\n && ln -sf ${PWSH_DIRECTORY}/pwsh /usr/bin/pwsh\n" + ] + }, + "platform": "linux/arm64" + } + ], + "platform": [ + "linux/amd64", + "linux/arm64" + ] + } + ], + "properties": { + "install_override": { + "$id": "#/properties/supported_platforms/properties/install_override", + "description": "Defines special installation steps for a specific platform (OS/CPU architecture/CPU variant), replacing the descriptor's install instructions given in the `install` node for this target platform only.", + "items": { + "properties": { + "install": { + "$id": "#/properties/supported_platforms/properties/install_override/items/properties/install", + "$ref": "#/properties/install", + "description": "List of apk, dockerfile instructions, npm/pip/gem packages required to use the descriptor's linters.\nThese special installation steps replace the instructions in the descriptor's [`install`](#install) node when using this target platform pair only." + }, + "platform": { + "$id": "#/properties/supported_platforms/properties/install_override/items/properties/platform", + "$ref": "#/properties/supported_platforms/properties/platform/items", + "default": "linux/arm64", + "description": "Target platform (OS/CPU architecture/CPU variant) to define special installation steps for.", + "examples": [], + "type": "string" + } + }, + "required": [ + "platform", + "install" + ], + "type": "object" + }, + "title": "Installation requirements override", + "type": "array" + }, + "platform": { + "$id": "#/properties/supported_platforms/properties/platform", + "default": [ + "linux/amd64" + ], + "description": "The list of target platforms (OS/CPU architecture/CPU Variant) that this descriptor supports.", + "examples": [ + [ + "linux/amd64", + "linux/arm64" + ], + [ + "linux/amd64" + ] + ], + "items": { + "default": "linux/amd64", + "description": "Target platforms [available to use on Docker](https://github.com/docker-library/bashbrew/blob/master/architecture/oci-platform.go#L16-L29).\n***Please note that Megalinter does not support all Docker's platforms.***", + "enum": [ + "linux/amd64", + "linux/arm64", + "linux/arm/v7", + "linux/arm/v6", + "linux/arm/v5", + "linux/386", + "linux/mips64le", + "linux/ppc64le", + "linux/riscv64", + "linux/s390x", + "windows/amd64" + ], + "title": "Target platform", + "type": "string" + }, + "title": "List of target platforms", + "type": "array", + "uniqueItems": true + } + }, + "title": "Supported platforms", + "type": "object" + }, "test_folder": { "$id": "#/properties/test_folder", "description": "Test folder containing _good_ and _bad_ files. Default: lowercase(descriptor_id)", diff --git a/megalinter/descriptors/snakemake.megalinter-descriptor.yml b/megalinter/descriptors/snakemake.megalinter-descriptor.yml index 27bb274737c..3ddc98e7071 100644 --- a/megalinter/descriptors/snakemake.megalinter-descriptor.yml +++ b/megalinter/descriptors/snakemake.megalinter-descriptor.yml @@ -43,6 +43,10 @@ linters: ARG PIP_SNAKEMAKE_VERSION=9.14.6 pip: - snakemake==${PIP_SNAKEMAKE_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: SnakeCharm @@ -95,3 +99,7 @@ linters: ARG PIP_SNAKEFMT_VERSION=0.11.2 pip: - snakefmt==${PIP_SNAKEFMT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/spell.megalinter-descriptor.yml b/megalinter/descriptors/spell.megalinter-descriptor.yml index eaa85c86fb9..97274cf8ab9 100644 --- a/megalinter/descriptors/spell.megalinter-descriptor.yml +++ b/megalinter/descriptors/spell.megalinter-descriptor.yml @@ -51,6 +51,10 @@ linters: ARG NPM_CSPELL_VERSION=9.4.0 npm: - "cspell@${NPM_CSPELL_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: Code Spell Checker @@ -99,6 +103,10 @@ linters: ARG PIP_PROSELINT_VERSION=0.14.0 pip: - proselint==${PIP_PROSELINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: Proselint @@ -163,6 +171,10 @@ linters: ARG SPELL_VALE_VERSION=v3.13.0 - FROM jdkato/vale:${SPELL_VALE_VERSION} AS vale - COPY --link --from=vale /bin/vale /bin/vale + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: flymake-vale @@ -259,6 +271,10 @@ linters: ARG SPELL_LYCHEE_VERSION=sha-7c4b132-alpine - FROM lycheeverse/lychee:${SPELL_LYCHEE_VERSION} AS lychee - COPY --link --from=lychee /usr/local/bin/lychee /usr/bin/ + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # codespell - linter_name: codespell @@ -313,3 +329,7 @@ linters: ARG PIP_CODESPELL_VERSION=2.4.1 pip: - codespell==${PIP_CODESPELL_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/sql.megalinter-descriptor.yml b/megalinter/descriptors/sql.megalinter-descriptor.yml index 7e0171fa4bc..5940039eb84 100644 --- a/megalinter/descriptors/sql.megalinter-descriptor.yml +++ b/megalinter/descriptors/sql.megalinter-descriptor.yml @@ -54,6 +54,10 @@ linters: ARG PIP_SQLFLUFF_VERSION=3.5.0 pip: - sqlfluff==${PIP_SQLFLUFF_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # TSQL - linter_name: tsqllint linter_text: | @@ -100,6 +104,10 @@ linters: - RUN apk add --no-cache dotnet9-sdk - ENV PATH="${PATH}:/root/.dotnet/tools" - RUN dotnet tool install --allow-roll-forward --global TSQLLint --version ${SQL_TSQLLINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: TSQL Lint diff --git a/megalinter/descriptors/swift.megalinter-descriptor.yml b/megalinter/descriptors/swift.megalinter-descriptor.yml index c9a089cafee..e89e6af4bbb 100644 --- a/megalinter/descriptors/swift.megalinter-descriptor.yml +++ b/megalinter/descriptors/swift.megalinter-descriptor.yml @@ -59,6 +59,10 @@ linters: - |- # renovate: datasource=docker depName=ghcr.io/realm/swiftlint ENV SWIFT_SWIFTLINT_VERSION=0.63.0 + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: swiftlint diff --git a/megalinter/descriptors/tekton.megalinter-descriptor.yml b/megalinter/descriptors/tekton.megalinter-descriptor.yml index f86202110f7..eeefef9746f 100644 --- a/megalinter/descriptors/tekton.megalinter-descriptor.yml +++ b/megalinter/descriptors/tekton.megalinter-descriptor.yml @@ -40,3 +40,7 @@ linters: ARG NPM_IBM_TEKTON_LINT_VERSION=1.1.0 npm: - "@ibm/tekton-lint@${NPM_IBM_TEKTON_LINT_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/terraform.megalinter-descriptor.yml b/megalinter/descriptors/terraform.megalinter-descriptor.yml index 2793865ae4a..27fe7917c73 100644 --- a/megalinter/descriptors/terraform.megalinter-descriptor.yml +++ b/megalinter/descriptors/terraform.megalinter-descriptor.yml @@ -73,7 +73,10 @@ linters: ARG TERRAFORM_TFLINT_VERSION=0.60.0 - FROM ghcr.io/terraform-linters/tflint:v${TERRAFORM_TFLINT_VERSION} AS tflint - COPY --link --from=tflint /usr/local/bin/tflint /usr/bin/ - + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # TERRASCAN - class: TerrascanLinter linter_name: terrascan @@ -129,7 +132,10 @@ linters: ARG TERRAFORM_TERRASCAN_VERSION=1.19.9 - FROM tenable/terrascan:${TERRAFORM_TERRASCAN_VERSION} AS terrascan - COPY --link --from=terrascan /go/bin/terrascan /usr/bin/ - + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # TERRAGRUNT - linter_name: terragrunt linter_text: | @@ -183,7 +189,10 @@ linters: ARG TERRAFORM_TERRAGRUNT_VERSION=1.14.1 - FROM alpine/terragrunt:${TERRAFORM_TERRAGRUNT_VERSION} AS terragrunt - COPY --link --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ - + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # TERRAFORM_FMT - linter_name: terraform-fmt linter_text: | @@ -225,6 +234,10 @@ linters: ARG TERRAFORM_TERRAGRUNT_VERSION=1.14.1 - FROM alpine/terragrunt:${TERRAFORM_TERRAGRUNT_VERSION} AS terragrunt - COPY --link --from=terragrunt /bin/terraform /usr/bin/ + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: HashiCorp Terraform / HCL language support diff --git a/megalinter/descriptors/tsx.megalinter-descriptor.yml b/megalinter/descriptors/tsx.megalinter-descriptor.yml index 620bbd222ed..939afbb5079 100644 --- a/megalinter/descriptors/tsx.megalinter-descriptor.yml +++ b/megalinter/descriptors/tsx.megalinter-descriptor.yml @@ -116,6 +116,10 @@ linters: - "@typescript-eslint/eslint-plugin@${NPM_TYPESCRIPT_ESLINT_ESLINT_PLUGIN_VERSION}" - "@typescript-eslint/parser@${NPM_TYPESCRIPT_ESLINT_PARSER_VERSION}" - "@microsoft/eslint-formatter-sarif@${NPM_MICROSOFT_ESLINT_FORMATTER_SARIF_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: brackets: - name: brackets-eslint diff --git a/megalinter/descriptors/typescript.megalinter-descriptor.yml b/megalinter/descriptors/typescript.megalinter-descriptor.yml index dba3a8028cf..caef717c588 100644 --- a/megalinter/descriptors/typescript.megalinter-descriptor.yml +++ b/megalinter/descriptors/typescript.megalinter-descriptor.yml @@ -133,6 +133,10 @@ linters: - "@typescript-eslint/eslint-plugin@${NPM_TYPESCRIPT_ESLINT_ESLINT_PLUGIN_VERSION}" - "@typescript-eslint/parser@${NPM_TYPESCRIPT_ESLINT_PARSER_VERSION}" - "@microsoft/eslint-formatter-sarif@${NPM_MICROSOFT_ESLINT_FORMATTER_SARIF_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: brackets: - name: brackets-eslint @@ -199,6 +203,10 @@ linters: ARG NPM_TS_STANDARD_VERSION=12.0.2 npm: - ts-standard@${NPM_TS_STANDARD_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: native support @@ -261,6 +269,10 @@ linters: ARG NPM_PRETTIER_VERSION=3.7.4 npm: - "prettier@${NPM_PRETTIER_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: prettier-emacs diff --git a/megalinter/descriptors/vbdotnet.megalinter-descriptor.yml b/megalinter/descriptors/vbdotnet.megalinter-descriptor.yml index f27c0895aa2..495084c6b32 100644 --- a/megalinter/descriptors/vbdotnet.megalinter-descriptor.yml +++ b/megalinter/descriptors/vbdotnet.megalinter-descriptor.yml @@ -56,3 +56,7 @@ linters: - "dotnet format Folder/Solution.sln --verify-no-changes" - "dotnet format Project.vbproj --verify-no-changes" - "dotnet format" # Fix + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/xml.megalinter-descriptor.yml b/megalinter/descriptors/xml.megalinter-descriptor.yml index eb54217e90d..10ad38efd8a 100644 --- a/megalinter/descriptors/xml.megalinter-descriptor.yml +++ b/megalinter/descriptors/xml.megalinter-descriptor.yml @@ -51,3 +51,7 @@ linters: - libxml2-dev - libxml2-utils - libgcc + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/yaml.megalinter-descriptor.yml b/megalinter/descriptors/yaml.megalinter-descriptor.yml index 6b15e362387..2cbadbd35cd 100644 --- a/megalinter/descriptors/yaml.megalinter-descriptor.yml +++ b/megalinter/descriptors/yaml.megalinter-descriptor.yml @@ -55,6 +55,10 @@ linters: ARG NPM_PRETTIER_VERSION=3.7.4 npm: - "prettier@${NPM_PRETTIER_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: prettier-emacs @@ -124,6 +128,10 @@ linters: ARG PIP_YAMLLINT_VERSION=1.37.1 pip: - yamllint==${PIP_YAMLLINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: flycheck @@ -166,6 +174,10 @@ linters: ARG NPM_V8R_VERSION=5.1.0 npm: - v8r@${NPM_V8R_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: eclipse: - name: native support