Skip to content

Commit c770a8d

Browse files
authored
feat: enable dotenv-linter for slim images (#5868)
Set up dotenv-linter for the slim image, and not only for the standard image because it doesn't have dependencies on the Rust SDK, and weights less than 10MB.
1 parent bcf8ca8 commit c770a8d

5 files changed

Lines changed: 10 additions & 12 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ jobs:
105105
run: |
106106
docker load <"/tmp/${{ env.CONTAINER_IMAGE_OUTPUT_IMAGE_NAME }}.tar"
107107
108+
- name: Print environment info
109+
run: |
110+
make info
111+
108112
# Validate the container image labels here so we don't have to pass the expected
109113
# label values to other build jobs
110114
- name: Validate container image labels
@@ -152,10 +156,6 @@ jobs:
152156
docker load --input /tmp/${{ env.CONTAINER_IMAGE_OUTPUT_IMAGE_NAME }}.tar
153157
docker image ls -a
154158
155-
- name: Print environment info
156-
run: |
157-
make info
158-
159159
- name: Update action.yml
160160
run: |
161161
echo "yq version: $(yq --version)"

‎Dockerfile‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,11 @@ COPY --from=lintr-installer /usr/lib/R /usr/lib/R
386386
#####################
387387
COPY --chmod=555 scripts/bash-exec.sh /usr/bin/bash-exec
388388

389+
#########################
390+
# Install dotenv-linter #
391+
#########################
392+
COPY --from=dotenv-linter /dotenv-linter /usr/bin/
393+
389394
#########################
390395
# Configure Environment #
391396
#########################
@@ -465,11 +470,6 @@ RUN apk add --no-cache \
465470
COPY scripts/clippy.sh /usr/bin/clippy
466471
RUN chmod +x /usr/bin/clippy
467472

468-
#########################
469-
# Install dotenv-linter #
470-
#########################
471-
COPY --from=dotenv-linter /dotenv-linter /usr/bin/
472-
473473
###################################
474474
# Install DotNet and Dependencies #
475475
###################################

‎README.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ Super-Linter provides several variants:
179179
- `slim`: `super-linter/super-linter/slim@[VERSION]`: includes all supported linters except:
180180

181181
- `rust` linters
182-
- `dotenv` linters
183182
- `armttk` linters
184183
- `pwsh` linters
185184
- `c#` linters

‎scripts/linterVersions.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ LINTER_NAMES_ARRAY['CSS']="stylelint"
2020
LINTER_NAMES_ARRAY['DART']="dart"
2121
LINTER_NAMES_ARRAY['DOCKERFILE_HADOLINT']="hadolint"
2222
LINTER_NAMES_ARRAY['EDITORCONFIG']="editorconfig-checker"
23+
LINTER_NAMES_ARRAY['ENV']="dotenv-linter"
2324
LINTER_NAMES_ARRAY['GITHUB_ACTIONS']="actionlint"
2425
LINTER_NAMES_ARRAY['GITLEAKS']="gitleaks"
2526
LINTER_NAMES_ARRAY['GHERKIN']="gherkin-lint"
@@ -82,7 +83,6 @@ LINTER_NAMES_ARRAY['YAML']="yamllint"
8283
if [[ "${IMAGE}" == "standard" ]]; then
8384
LINTER_NAMES_ARRAY['ARM']="arm-ttk"
8485
LINTER_NAMES_ARRAY['CSHARP']="dotnet"
85-
LINTER_NAMES_ARRAY['ENV']="dotenv-linter"
8686
LINTER_NAMES_ARRAY['POWERSHELL']="pwsh"
8787
LINTER_NAMES_ARRAY['RUST_2015']="rustfmt"
8888
LINTER_NAMES_ARRAY['RUST_2018']="rustfmt"

‎test/inspec/super-linter/controls/super_linter.rb‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@
214214
arm-ttk
215215
clippy
216216
dotnet
217-
dotenv-linter
218217
pwsh
219218
rustfmt
220219
)

0 commit comments

Comments
 (0)