From 021112bcc77919f704f247f64c13748822e3a846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 4 Jul 2022 03:26:54 +0000 Subject: [PATCH] Add supported_platforms to bash descriptor Relates to megalinter/megalinter#1553 --- .../bash.megalinter-descriptor.yml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/megalinter/descriptors/bash.megalinter-descriptor.yml b/megalinter/descriptors/bash.megalinter-descriptor.yml index 1aee568fd00..cd6776975ff 100644 --- a/megalinter/descriptors/bash.megalinter-descriptor.yml +++ b/megalinter/descriptors/bash.megalinter-descriptor.yml @@ -33,6 +33,13 @@ linters: cli_help_arg_name: "--help" examples: - "bash-exec myfile.sh" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 + - linux/arm/v7 + - linux/386 + - linux/ppc64le install: dockerfile: - | @@ -69,6 +76,21 @@ linters: cli_lint_errors_regex: "In .* line .*:.*\\n" examples: - "shellcheck --color=auto --external-sources myfile.sh" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 + install_override: + - platform: linux/arm64 + install: + dockerfile: + - | + RUN ML_THIRD_PARTY_DIR="/third-party/shellcheck" \ + && mkdir -p ${ML_THIRD_PARTY_DIR} \ + && wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.aarch64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \ + && mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \ + && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \ + && shellcheck --version install: cargo: - shellcheck-sarif @@ -122,6 +144,13 @@ linters: examples: - "shfmt -d myfile.sh" - "shfmt -w myfile.sh" # Fix + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 + - linux/arm/v7 + - linux/386 + - linux/ppc64le install: dockerfile: - FROM mvdan/shfmt:latest-alpine as shfmt