Skip to content

Commit 5f6bf1f

Browse files
echoixbdovaz
authored andcommitted
Add supported_platforms to bash descriptor
Relates to #1553
1 parent eac9b0f commit 5f6bf1f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

megalinter/descriptors/bash.megalinter-descriptor.yml

+29
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ linters:
3333
cli_help_arg_name: "--help"
3434
examples:
3535
- "bash-exec myfile.sh"
36+
supported_platforms:
37+
platform:
38+
- linux/amd64
39+
- linux/arm64
40+
- linux/arm/v7
41+
- linux/386
42+
- linux/ppc64le
3643
install:
3744
dockerfile:
3845
- |
@@ -69,6 +76,21 @@ linters:
6976
cli_lint_errors_regex: "In .* line .*:.*\\n"
7077
examples:
7178
- "shellcheck --color=auto --external-sources myfile.sh"
79+
supported_platforms:
80+
platform:
81+
- linux/amd64
82+
- linux/arm64
83+
install_override:
84+
- platform: linux/arm64
85+
install:
86+
dockerfile:
87+
- |
88+
RUN ML_THIRD_PARTY_DIR="/third-party/shellcheck" \
89+
&& mkdir -p ${ML_THIRD_PARTY_DIR} \
90+
&& wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.aarch64.tar.xz" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \
91+
&& mv "${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck" /usr/bin/ \
92+
&& find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \
93+
&& shellcheck --version
7294
install:
7395
cargo:
7496
- shellcheck-sarif
@@ -122,6 +144,13 @@ linters:
122144
examples:
123145
- "shfmt -d myfile.sh"
124146
- "shfmt -w myfile.sh" # Fix
147+
supported_platforms:
148+
platform:
149+
- linux/amd64
150+
- linux/arm64
151+
- linux/arm/v7
152+
- linux/386
153+
- linux/ppc64le
125154
install:
126155
dockerfile:
127156
- FROM mvdan/shfmt:latest-alpine as shfmt

0 commit comments

Comments
 (0)