diff --git a/.github/workflows/deploy-BETA-linters.yml b/.github/workflows/deploy-BETA-linters.yml index e56568b182f..8bde4846a11 100644 --- a/.github/workflows/deploy-BETA-linters.yml +++ b/.github/workflows/deploy-BETA-linters.yml @@ -184,7 +184,8 @@ jobs: TEST_KEYWORDS_TO_USE_UPPER="${MATRIX_LINTER}" TEST_KEYWORDS_TO_USE="${TEST_KEYWORDS_TO_USE_UPPER,,}" docker image ls - docker run -e TEST_CASE_RUN=true -e OUTPUT_FORMAT=text -e OUTPUT_FOLDER="${GH_SHA}" -e OUTPUT_DETAIL=detailed -e GITHUB_SHA="${GH_SHA}" -e GITHUB_REPOSITORY="${GITHUB_REPOSITORY}" -e GITHUB_BRANCH="${GITHUB_BRANCH}" -e GITHUB_TOKEN="${GITHUB_TOKEN}" -e SFDX_AUTH_URL="${SFDX_AUTH_URL}" -e TEST_KEYWORDS="${TEST_KEYWORDS_TO_USE}" -e MEGALINTER_VOLUME_ROOT="${GITHUB_WORKSPACE}" -v "/var/run/docker.sock:/var/run/docker.sock:rw" -v "${GITHUB_WORKSPACE}:/tmp/lint" "${DOCKER_IMAGE}" + # GITHUB_ACTIONS lets tests skip remote service rate limits (ApexGuru 429) in CI only + docker run -e GITHUB_ACTIONS -e TEST_CASE_RUN=true -e OUTPUT_FORMAT=text -e OUTPUT_FOLDER="${GH_SHA}" -e OUTPUT_DETAIL=detailed -e GITHUB_SHA="${GH_SHA}" -e GITHUB_REPOSITORY="${GITHUB_REPOSITORY}" -e GITHUB_BRANCH="${GITHUB_BRANCH}" -e GITHUB_TOKEN="${GITHUB_TOKEN}" -e SFDX_AUTH_URL="${SFDX_AUTH_URL}" -e TEST_KEYWORDS="${TEST_KEYWORDS_TO_USE}" -e MEGALINTER_VOLUME_ROOT="${GITHUB_WORKSPACE}" -v "/var/run/docker.sock:/var/run/docker.sock:rw" -v "${GITHUB_WORKSPACE}:/tmp/lint" "${DOCKER_IMAGE}" timeout-minutes: 30 # Docker Hub mirroring is disabled — MegaLinter is published to ghcr.io only. diff --git a/.github/workflows/deploy-DEV-linters.yml b/.github/workflows/deploy-DEV-linters.yml index a89e4c58627..26631c47dcf 100644 --- a/.github/workflows/deploy-DEV-linters.yml +++ b/.github/workflows/deploy-DEV-linters.yml @@ -332,7 +332,8 @@ jobs: TEST_KEYWORDS_TO_USE_UPPER="${MATRIX_LINTER}" TEST_KEYWORDS_TO_USE="${TEST_KEYWORDS_TO_USE_UPPER,,}" docker image ls - docker run -e TEST_CASE_RUN=true -e OUTPUT_FORMAT=text -e OUTPUT_FOLDER="${GH_SHA}" -e OUTPUT_DETAIL=detailed -e GITHUB_SHA="${GH_SHA}" -e GITHUB_REPOSITORY="${GITHUB_REPOSITORY}" -e GITHUB_BRANCH="${GITHUB_BRANCH}" -e GITHUB_TOKEN="${GITHUB_TOKEN}" -e SFDX_AUTH_URL="${SFDX_AUTH_URL}" -e TEST_KEYWORDS="${TEST_KEYWORDS_TO_USE}" -e MEGALINTER_VOLUME_ROOT="${GITHUB_WORKSPACE}" -v "/var/run/docker.sock:/var/run/docker.sock:rw" -v "${GITHUB_WORKSPACE}:/tmp/lint" "${DOCKER_IMAGE}" + # GITHUB_ACTIONS lets tests skip remote service rate limits (ApexGuru 429) in CI only + docker run -e GITHUB_ACTIONS -e TEST_CASE_RUN=true -e OUTPUT_FORMAT=text -e OUTPUT_FOLDER="${GH_SHA}" -e OUTPUT_DETAIL=detailed -e GITHUB_SHA="${GH_SHA}" -e GITHUB_REPOSITORY="${GITHUB_REPOSITORY}" -e GITHUB_BRANCH="${GITHUB_BRANCH}" -e GITHUB_TOKEN="${GITHUB_TOKEN}" -e SFDX_AUTH_URL="${SFDX_AUTH_URL}" -e TEST_KEYWORDS="${TEST_KEYWORDS_TO_USE}" -e MEGALINTER_VOLUME_ROOT="${GITHUB_WORKSPACE}" -v "/var/run/docker.sock:/var/run/docker.sock:rw" -v "${GITHUB_WORKSPACE}:/tmp/lint" "${DOCKER_IMAGE}" timeout-minutes: 30 ############################################## diff --git a/CHANGELOG.md b/CHANGELOG.md index d69f086324a..3ba853836b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,9 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l - Dev - CI + - **ApexGuru rate limits** no longer fail CI test jobs: when Salesforce's ApexGuru service answers `429 Too Many Requests`, the `SALESFORCE_CODE_ANALYZER_APEXGURU` success, failure and SARIF tests are skipped instead of failed + - Only in CI (`utils.is_ci()`): local test runs still fail, so a real regression stays visible + - Per-linter test jobs (`deploy-DEV-linters.yml`, `deploy-BETA-linters.yml`) now pass `GITHUB_ACTIONS` to the test container - Linter versions upgrades (N) diff --git a/Dockerfile b/Dockerfile index 6d78f347463..45b2d7315d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,7 @@ ARG BASH_SHFMT_VERSION=v3.14.0-alpine # renovate: datasource=docker depName=hadolint/hadolint ARG DOCKERFILE_HADOLINT_VERSION=v2.15.1-alpine # renovate: datasource=docker depName=mstruebing/editorconfig-checker -ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.11.2 +ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=4.0.1 # renovate: datasource=github-tags depName=mgechev/revive ARG GO_REVIVE_VERSION=v1.16.0 # renovate: datasource=docker depName=golang versioning=semver @@ -567,7 +567,7 @@ COPY --link --from=cargo-bin-shellcheck-sarif /out/bin/shellcheck-sarif /usr/bin # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /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/ @@ -985,7 +985,7 @@ ENV PATH="/usr/lib/dart/bin:${PATH}" # hadolint installation # Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker # dotenv-linter installation RUN set -eu; \ case "$TARGETPLATFORM" in \ diff --git a/flavors/c_cpp/Dockerfile b/flavors/c_cpp/Dockerfile index 6b3637ac084..71ccef584ff 100644 --- a/flavors/c_cpp/Dockerfile +++ b/flavors/c_cpp/Dockerfile @@ -29,7 +29,7 @@ ARG BASH_SHFMT_VERSION=v3.14.0-alpine # renovate: datasource=docker depName=hadolint/hadolint ARG DOCKERFILE_HADOLINT_VERSION=v2.15.1-alpine # renovate: datasource=docker depName=mstruebing/editorconfig-checker -ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.11.2 +ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=4.0.1 # renovate: datasource=docker depName=ghcr.io/yannh/kubeconform ARG KUBERNETES_KUBECONFORM_VERSION=v0.8.0-alpine # renovate: datasource=docker depName=yoheimuta/protolint @@ -303,7 +303,7 @@ COPY --link --from=cargo-bin-shellcheck-sarif /out/bin/shellcheck-sarif /usr/bin # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=betterleaks /usr/bin/betterleaks /usr/bin/ @@ -470,7 +470,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev --prefix /node-deps-spect # hadolint installation # Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker # dotenv-linter installation && set -eu; \ case "$TARGETPLATFORM" in \ diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index c1839385e6a..bda5a3f91ec 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -29,7 +29,7 @@ ARG BASH_SHFMT_VERSION=v3.14.0-alpine # renovate: datasource=docker depName=hadolint/hadolint ARG DOCKERFILE_HADOLINT_VERSION=v2.15.1-alpine # renovate: datasource=docker depName=mstruebing/editorconfig-checker -ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.11.2 +ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=4.0.1 # renovate: datasource=github-tags depName=mgechev/revive ARG GO_REVIVE_VERSION=v1.16.0 # renovate: datasource=docker depName=golang versioning=semver @@ -462,7 +462,7 @@ COPY --link --from=cargo-bin-shellcheck-sarif /out/bin/shellcheck-sarif /usr/bin # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker COPY --link --from=revive /usr/bin/revive /usr/bin/revive COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=betterleaks /usr/bin/betterleaks /usr/bin/ @@ -724,7 +724,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil # hadolint installation # Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker # dotenv-linter installation && set -eu; \ case "$TARGETPLATFORM" in \ diff --git a/flavors/documentation/Dockerfile b/flavors/documentation/Dockerfile index f524456303e..b108d75e544 100644 --- a/flavors/documentation/Dockerfile +++ b/flavors/documentation/Dockerfile @@ -29,7 +29,7 @@ ARG BASH_SHFMT_VERSION=v3.14.0-alpine # renovate: datasource=docker depName=hadolint/hadolint ARG DOCKERFILE_HADOLINT_VERSION=v2.15.1-alpine # renovate: datasource=docker depName=mstruebing/editorconfig-checker -ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.11.2 +ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=4.0.1 # renovate: datasource=docker depName=ghcr.io/yannh/kubeconform ARG KUBERNETES_KUBECONFORM_VERSION=v0.8.0-alpine # renovate: datasource=docker depName=yoheimuta/protolint @@ -297,7 +297,7 @@ COPY --link --from=cargo-bin-shellcheck-sarif /out/bin/shellcheck-sarif /usr/bin # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=betterleaks /usr/bin/betterleaks /usr/bin/ @@ -457,7 +457,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev --prefix /node-deps-spect # hadolint installation # Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker # dotenv-linter installation && set -eu; \ case "$TARGETPLATFORM" in \ diff --git a/flavors/dotnet/Dockerfile b/flavors/dotnet/Dockerfile index bbdb89b2076..c05d422fc94 100644 --- a/flavors/dotnet/Dockerfile +++ b/flavors/dotnet/Dockerfile @@ -29,7 +29,7 @@ ARG BASH_SHFMT_VERSION=v3.14.0-alpine # renovate: datasource=docker depName=hadolint/hadolint ARG DOCKERFILE_HADOLINT_VERSION=v2.15.1-alpine # renovate: datasource=docker depName=mstruebing/editorconfig-checker -ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.11.2 +ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=4.0.1 # renovate: datasource=docker depName=ghcr.io/yannh/kubeconform ARG KUBERNETES_KUBECONFORM_VERSION=v0.8.0-alpine # renovate: datasource=docker depName=yoheimuta/protolint @@ -327,7 +327,7 @@ COPY --link --from=cargo-bin-shellcheck-sarif /out/bin/shellcheck-sarif /usr/bin # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=betterleaks /usr/bin/betterleaks /usr/bin/ @@ -544,7 +544,7 @@ esac \ # hadolint installation # Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker # dotenv-linter installation && set -eu; \ case "$TARGETPLATFORM" in \ diff --git a/flavors/dotnetweb/Dockerfile b/flavors/dotnetweb/Dockerfile index 418317f05bf..775aa8d66e3 100644 --- a/flavors/dotnetweb/Dockerfile +++ b/flavors/dotnetweb/Dockerfile @@ -29,7 +29,7 @@ ARG BASH_SHFMT_VERSION=v3.14.0-alpine # renovate: datasource=docker depName=hadolint/hadolint ARG DOCKERFILE_HADOLINT_VERSION=v2.15.1-alpine # renovate: datasource=docker depName=mstruebing/editorconfig-checker -ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.11.2 +ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=4.0.1 # renovate: datasource=docker depName=ghcr.io/yannh/kubeconform ARG KUBERNETES_KUBECONFORM_VERSION=v0.8.0-alpine # renovate: datasource=docker depName=yoheimuta/protolint @@ -365,7 +365,7 @@ COPY --link --from=cargo-bin-shellcheck-sarif /out/bin/shellcheck-sarif /usr/bin # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=betterleaks /usr/bin/betterleaks /usr/bin/ @@ -603,7 +603,7 @@ esac \ # hadolint installation # Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker # dotenv-linter installation && set -eu; \ case "$TARGETPLATFORM" in \ diff --git a/flavors/go/Dockerfile b/flavors/go/Dockerfile index 44dfebf2954..a2bcdca3cda 100644 --- a/flavors/go/Dockerfile +++ b/flavors/go/Dockerfile @@ -29,7 +29,7 @@ ARG BASH_SHFMT_VERSION=v3.14.0-alpine # renovate: datasource=docker depName=hadolint/hadolint ARG DOCKERFILE_HADOLINT_VERSION=v2.15.1-alpine # renovate: datasource=docker depName=mstruebing/editorconfig-checker -ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.11.2 +ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=4.0.1 # renovate: datasource=github-tags depName=mgechev/revive ARG GO_REVIVE_VERSION=v1.16.0 # renovate: datasource=docker depName=golang versioning=semver @@ -313,7 +313,7 @@ COPY --link --from=cargo-bin-shellcheck-sarif /out/bin/shellcheck-sarif /usr/bin # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker COPY --link --from=revive /usr/bin/revive /usr/bin/revive COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ @@ -477,7 +477,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev --prefix /node-deps-spect # hadolint installation # Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker # dotenv-linter installation && set -eu; \ case "$TARGETPLATFORM" in \ diff --git a/flavors/java/Dockerfile b/flavors/java/Dockerfile index 57da9765817..b95c3fc64c9 100644 --- a/flavors/java/Dockerfile +++ b/flavors/java/Dockerfile @@ -29,7 +29,7 @@ ARG BASH_SHFMT_VERSION=v3.14.0-alpine # renovate: datasource=docker depName=hadolint/hadolint ARG DOCKERFILE_HADOLINT_VERSION=v2.15.1-alpine # renovate: datasource=docker depName=mstruebing/editorconfig-checker -ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.11.2 +ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=4.0.1 # renovate: datasource=docker depName=ghcr.io/yannh/kubeconform ARG KUBERNETES_KUBECONFORM_VERSION=v0.8.0-alpine # renovate: datasource=docker depName=yoheimuta/protolint @@ -309,7 +309,7 @@ COPY --link --from=cargo-bin-shellcheck-sarif /out/bin/shellcheck-sarif /usr/bin # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=betterleaks /usr/bin/betterleaks /usr/bin/ @@ -483,7 +483,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev --prefix /node-deps-spect # hadolint installation # Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker # dotenv-linter installation && set -eu; \ case "$TARGETPLATFORM" in \ diff --git a/flavors/javascript/Dockerfile b/flavors/javascript/Dockerfile index b2bba99def8..74a42eaa25d 100644 --- a/flavors/javascript/Dockerfile +++ b/flavors/javascript/Dockerfile @@ -29,7 +29,7 @@ ARG BASH_SHFMT_VERSION=v3.14.0-alpine # renovate: datasource=docker depName=hadolint/hadolint ARG DOCKERFILE_HADOLINT_VERSION=v2.15.1-alpine # renovate: datasource=docker depName=mstruebing/editorconfig-checker -ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.11.2 +ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=4.0.1 # renovate: datasource=docker depName=ghcr.io/yannh/kubeconform ARG KUBERNETES_KUBECONFORM_VERSION=v0.8.0-alpine # renovate: datasource=docker depName=yoheimuta/protolint @@ -339,7 +339,7 @@ COPY --link --from=cargo-bin-shellcheck-sarif /out/bin/shellcheck-sarif /usr/bin # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=betterleaks /usr/bin/betterleaks /usr/bin/ @@ -522,7 +522,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev --prefix /node-deps-spect # hadolint installation # Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker # dotenv-linter installation && set -eu; \ case "$TARGETPLATFORM" in \ diff --git a/flavors/php/Dockerfile b/flavors/php/Dockerfile index a305aaf7435..96d46b44f11 100644 --- a/flavors/php/Dockerfile +++ b/flavors/php/Dockerfile @@ -29,7 +29,7 @@ ARG BASH_SHFMT_VERSION=v3.14.0-alpine # renovate: datasource=docker depName=hadolint/hadolint ARG DOCKERFILE_HADOLINT_VERSION=v2.15.1-alpine # renovate: datasource=docker depName=mstruebing/editorconfig-checker -ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.11.2 +ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=4.0.1 # renovate: datasource=docker depName=ghcr.io/yannh/kubeconform ARG KUBERNETES_KUBECONFORM_VERSION=v0.8.0-alpine # renovate: datasource=docker depName=yoheimuta/protolint @@ -327,7 +327,7 @@ COPY --link --from=cargo-bin-shellcheck-sarif /out/bin/shellcheck-sarif /usr/bin # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=betterleaks /usr/bin/betterleaks /usr/bin/ @@ -492,7 +492,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev --prefix /node-deps-spect # hadolint installation # Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker # dotenv-linter installation && set -eu; \ case "$TARGETPLATFORM" in \ diff --git a/flavors/python/Dockerfile b/flavors/python/Dockerfile index 8dfc37583cf..7b70f19a426 100644 --- a/flavors/python/Dockerfile +++ b/flavors/python/Dockerfile @@ -29,7 +29,7 @@ ARG BASH_SHFMT_VERSION=v3.14.0-alpine # renovate: datasource=docker depName=hadolint/hadolint ARG DOCKERFILE_HADOLINT_VERSION=v2.15.1-alpine # renovate: datasource=docker depName=mstruebing/editorconfig-checker -ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.11.2 +ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=4.0.1 # renovate: datasource=docker depName=ghcr.io/yannh/kubeconform ARG KUBERNETES_KUBECONFORM_VERSION=v0.8.0-alpine # renovate: datasource=docker depName=yoheimuta/protolint @@ -332,7 +332,7 @@ COPY --link --from=cargo-bin-shellcheck-sarif /out/bin/shellcheck-sarif /usr/bin # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=betterleaks /usr/bin/betterleaks /usr/bin/ @@ -547,7 +547,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev --prefix /node-deps-spect # hadolint installation # Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker # dotenv-linter installation && set -eu; \ case "$TARGETPLATFORM" in \ diff --git a/flavors/ruby/Dockerfile b/flavors/ruby/Dockerfile index 42724e5bdf4..4ee3265ae11 100644 --- a/flavors/ruby/Dockerfile +++ b/flavors/ruby/Dockerfile @@ -29,7 +29,7 @@ ARG BASH_SHFMT_VERSION=v3.14.0-alpine # renovate: datasource=docker depName=hadolint/hadolint ARG DOCKERFILE_HADOLINT_VERSION=v2.15.1-alpine # renovate: datasource=docker depName=mstruebing/editorconfig-checker -ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.11.2 +ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=4.0.1 # renovate: datasource=docker depName=ghcr.io/yannh/kubeconform ARG KUBERNETES_KUBECONFORM_VERSION=v0.8.0-alpine # renovate: datasource=docker depName=yoheimuta/protolint @@ -311,7 +311,7 @@ COPY --link --from=cargo-bin-shellcheck-sarif /out/bin/shellcheck-sarif /usr/bin # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=betterleaks /usr/bin/betterleaks /usr/bin/ @@ -480,7 +480,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev --prefix /node-deps-spect # hadolint installation # Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker # dotenv-linter installation && set -eu; \ case "$TARGETPLATFORM" in \ diff --git a/flavors/rust/Dockerfile b/flavors/rust/Dockerfile index 83d479ef32a..0edf5192421 100644 --- a/flavors/rust/Dockerfile +++ b/flavors/rust/Dockerfile @@ -29,7 +29,7 @@ ARG BASH_SHFMT_VERSION=v3.14.0-alpine # renovate: datasource=docker depName=hadolint/hadolint ARG DOCKERFILE_HADOLINT_VERSION=v2.15.1-alpine # renovate: datasource=docker depName=mstruebing/editorconfig-checker -ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.11.2 +ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=4.0.1 # renovate: datasource=docker depName=ghcr.io/yannh/kubeconform ARG KUBERNETES_KUBECONFORM_VERSION=v0.8.0-alpine # renovate: datasource=docker depName=yoheimuta/protolint @@ -312,7 +312,7 @@ COPY --link --from=cargo-bin-shellcheck-sarif /out/bin/shellcheck-sarif /usr/bin # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=betterleaks /usr/bin/betterleaks /usr/bin/ @@ -472,7 +472,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev --prefix /node-deps-spect # hadolint installation # Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker # dotenv-linter installation && set -eu; \ case "$TARGETPLATFORM" in \ diff --git a/flavors/salesforce/Dockerfile b/flavors/salesforce/Dockerfile index 56947e687bf..65e592ac78e 100644 --- a/flavors/salesforce/Dockerfile +++ b/flavors/salesforce/Dockerfile @@ -29,7 +29,7 @@ ARG BASH_SHFMT_VERSION=v3.14.0-alpine # renovate: datasource=docker depName=hadolint/hadolint ARG DOCKERFILE_HADOLINT_VERSION=v2.15.1-alpine # renovate: datasource=docker depName=mstruebing/editorconfig-checker -ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.11.2 +ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=4.0.1 # renovate: datasource=docker depName=ghcr.io/yannh/kubeconform ARG KUBERNETES_KUBECONFORM_VERSION=v0.8.0-alpine # renovate: datasource=docker depName=yoheimuta/protolint @@ -310,7 +310,7 @@ COPY --link --from=cargo-bin-shellcheck-sarif /out/bin/shellcheck-sarif /usr/bin # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=betterleaks /usr/bin/betterleaks /usr/bin/ @@ -484,7 +484,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev --prefix /node-deps-spect # hadolint installation # Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker # dotenv-linter installation && set -eu; \ case "$TARGETPLATFORM" in \ diff --git a/flavors/swift/Dockerfile b/flavors/swift/Dockerfile index 38ba7243d00..b6a8023f165 100644 --- a/flavors/swift/Dockerfile +++ b/flavors/swift/Dockerfile @@ -29,7 +29,7 @@ ARG BASH_SHFMT_VERSION=v3.14.0-alpine # renovate: datasource=docker depName=hadolint/hadolint ARG DOCKERFILE_HADOLINT_VERSION=v2.15.1-alpine # renovate: datasource=docker depName=mstruebing/editorconfig-checker -ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.11.2 +ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=4.0.1 # renovate: datasource=docker depName=ghcr.io/yannh/kubeconform ARG KUBERNETES_KUBECONFORM_VERSION=v0.8.0-alpine # renovate: datasource=docker depName=yoheimuta/protolint @@ -300,7 +300,7 @@ COPY --link --from=cargo-bin-shellcheck-sarif /out/bin/shellcheck-sarif /usr/bin # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=betterleaks /usr/bin/betterleaks /usr/bin/ @@ -460,7 +460,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev --prefix /node-deps-spect # hadolint installation # Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker # dotenv-linter installation && set -eu; \ case "$TARGETPLATFORM" in \ diff --git a/flavors/terraform/Dockerfile b/flavors/terraform/Dockerfile index 8c9215884a3..aea3acb82b1 100644 --- a/flavors/terraform/Dockerfile +++ b/flavors/terraform/Dockerfile @@ -29,7 +29,7 @@ ARG BASH_SHFMT_VERSION=v3.14.0-alpine # renovate: datasource=docker depName=hadolint/hadolint ARG DOCKERFILE_HADOLINT_VERSION=v2.15.1-alpine # renovate: datasource=docker depName=mstruebing/editorconfig-checker -ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.11.2 +ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=4.0.1 # renovate: datasource=docker depName=ghcr.io/yannh/kubeconform ARG KUBERNETES_KUBECONFORM_VERSION=v0.8.0-alpine # renovate: datasource=docker depName=yoheimuta/protolint @@ -313,7 +313,7 @@ COPY --link --from=cargo-bin-shellcheck-sarif /out/bin/shellcheck-sarif /usr/bin # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint -COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=betterleaks /usr/bin/betterleaks /usr/bin/ @@ -479,7 +479,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev --prefix /node-deps-spect # hadolint installation # Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint # editorconfig-checker installation -# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker # dotenv-linter installation && set -eu; \ case "$TARGETPLATFORM" in \ diff --git a/linters/editorconfig_editorconfig_checker/Dockerfile b/linters/editorconfig_editorconfig_checker/Dockerfile index 64cb4300789..0da24abd282 100644 --- a/linters/editorconfig_editorconfig_checker/Dockerfile +++ b/linters/editorconfig_editorconfig_checker/Dockerfile @@ -12,7 +12,7 @@ ############################################################################################# #ARGTOP__START # renovate: datasource=docker depName=mstruebing/editorconfig-checker -ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.11.2 +ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=4.0.1 #ARGTOP__END ############################################################################################# @@ -119,7 +119,7 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \ ############################################################################################# #COPY__START -COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker #COPY__END ############################## @@ -163,7 +163,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # editorconfig-checker installation -# Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker +# Managed with COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker #OTHER__END ################################ diff --git a/megalinter/descriptors/editorconfig.megalinter-descriptor.yml b/megalinter/descriptors/editorconfig.megalinter-descriptor.yml index e54deb5e212..b615173b15c 100644 --- a/megalinter/descriptors/editorconfig.megalinter-descriptor.yml +++ b/megalinter/descriptors/editorconfig.megalinter-descriptor.yml @@ -20,7 +20,7 @@ linters: - **Universal Validation**: Works with any file type including code, configuration files, plain text, XML, and more - **EditorConfig Compliance**: Enforces indentation, line endings, character encoding, and whitespace rules from `.editorconfig` - **Multi-Platform Support**: Available as native binaries, npm package, PHP composer package, Python pip package, and Docker image - - **Configurable Rules**: Fine-tune validation with `.ecrc` configuration files and command-line flags + - **Configurable Rules**: Fine-tune validation with `.editorconfig-checker.json` configuration files and command-line flags - **Comprehensive Checks**: Validates indent style, insert final newline, trim trailing whitespace, and end-of-line characters - **Flexible Exclusions**: Exclude specific files, directories, or content types from validation linter_url: https://editorconfig-checker.github.io/ @@ -49,9 +49,9 @@ linters: dockerfile: - |- # renovate: datasource=docker depName=mstruebing/editorconfig-checker - ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.11.2 + ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=4.0.1 - FROM mstruebing/editorconfig-checker:${EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION} AS editorconfig-checker - - COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker + - COPY --link --from=editorconfig-checker /usr/bin/editorconfig-checker /usr/bin/editorconfig-checker supported_platforms: platform: - linux/amd64 diff --git a/megalinter/utilstest.py b/megalinter/utilstest.py index 9690957aa41..f49ded12400 100644 --- a/megalinter/utilstest.py +++ b/megalinter/utilstest.py @@ -155,6 +155,21 @@ def call_mega_linter(env_vars): return mega_linter, output +# Remote analysis services whose rate limiting fails a test run without any +# MegaLinter regression: the test is skipped instead, in CI jobs only +CI_SKIPPED_SERVICE_ERRORS = { + "SALESFORCE_CODE_ANALYZER_APEXGURU": r"429 Too Many Requests", +} + + +def skip_if_ci_service_error(linter, output): + error_regex = CI_SKIPPED_SERVICE_ERRORS.get(linter.name) + if error_regex is not None and utils.is_ci() and re.search(error_regex, output): + raise unittest.SkipTest( + f"{linter.name}: remote service error in CI ({error_regex})" + ) + + def test_linter_success(linter, test_self): if linter.disabled is True or "all" in getattr( linter, "descriptor_flavors_exclude", [] @@ -186,6 +201,7 @@ def test_linter_success(linter, test_self): } env_vars.update(linter.test_variables) mega_linter, output = call_mega_linter(env_vars) + skip_if_ci_service_error(linter, output) test_self.assertTrue( len(mega_linter.linters) > 0, "Linters have been created and run" ) @@ -264,6 +280,7 @@ def test_linter_failure(linter, test_self): } env_vars_failure.update(linter.test_variables) mega_linter, output = call_mega_linter(env_vars_failure) + skip_if_ci_service_error(linter, output) # Check linter run test_self.assertTrue( @@ -607,7 +624,8 @@ def test_linter_report_sarif(linter, test_self): "request_id": test_self.request_id, } env_vars.update(linter.test_variables) - mega_linter, _output = call_mega_linter(env_vars) + mega_linter, output = call_mega_linter(env_vars) + skip_if_ci_service_error(linter, output) test_self.assertTrue( len(mega_linter.linters) > 0, "Linters have been created and run" )