From d3367e6da7ef1a9b3d747e79be1754e4362b2435 Mon Sep 17 00:00:00 2001 From: Tom Date: Sun, 23 Jun 2024 19:26:02 +0100 Subject: [PATCH 1/5] csharp dotnet format updated --- .../csharp.megalinter-descriptor.yml | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/megalinter/descriptors/csharp.megalinter-descriptor.yml b/megalinter/descriptors/csharp.megalinter-descriptor.yml index 0888cc178c4..ec9c7e42c81 100644 --- a/megalinter/descriptors/csharp.megalinter-descriptor.yml +++ b/megalinter/descriptors/csharp.megalinter-descriptor.yml @@ -9,8 +9,7 @@ file_extensions: - ".cs" install: dockerfile: - # https://github.com/dotnet/sdk/issues/37790#issuecomment-1918068016 - - RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community + - RUN apk add --no-cache dotnet8-sdk - ENV PATH="${PATH}:/root/.dotnet/tools" linters: # DOTNET FORMAT @@ -20,12 +19,17 @@ linters: linter_text: | dotnet-format requires a `.sln` or `.csproj` file to run correctly. linter_url: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-format - linter_repo: https://github.com/dotnet/format + linter_repo: https://github.com/dotnet/sdk + linter_rules_configuration_url: https://github.com/dotnet/sdk/tree/main/documentation/format/docs linter_image_url: https://user-images.githubusercontent.com/9797472/61659851-6bbdc880-ac7d-11e9-95f7-d30c7de1a18a.png + cli_lint_errors_count: regex_count + cli_lint_errors_regex: ".cs\\([0-9]+,[0-9]+\\):\\s(?:warning|error)" cli_executable: dotnet + cli_lint_mode: project cli_lint_extra_args: - "format" - - "{{WORKSPACE}}" + cli_lint_extra_args_after: + - "--include **/*.cs" - "--verify-no-changes" cli_lint_fix_arg_name: "--megalinter-fix-flag" # Workaround for DotnetFormatLinter class behavior cli_lint_fix_remove_args: @@ -33,8 +37,12 @@ linters: cli_help_extra_args: - format examples: - - "dotnet format {{WORKSPACE}} --verify-no-changes" - - "dotnet format {{WORKSPACE}}" # Fix + - "dotnet format --verify-no-changes" + - "dotnet format Solution.sln --verify-no-changes" + - "dotnet format Folder/Solution.sln --verify-no-changes" + - "dotnet format Project.csproj --verify-no-changes" + - "dotnet format" # Fix + # CSharpier - class: DotNetToolLinter linter_name: csharpier @@ -71,6 +79,7 @@ linters: vscode: - name: csharpier-vscode url: https://marketplace.visualstudio.com/items?itemName=csharpier.csharpier-vscode + # Roslynator - class: RoslynatorLinter linter_name: roslynator From 6a266359d9f67612031aee1a120b8729637b329a Mon Sep 17 00:00:00 2001 From: Tom Date: Sun, 23 Jun 2024 19:28:12 +0100 Subject: [PATCH 2/5] vb dotnet format updated --- .../vbdotnet.megalinter-descriptor.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/megalinter/descriptors/vbdotnet.megalinter-descriptor.yml b/megalinter/descriptors/vbdotnet.megalinter-descriptor.yml index f67887fb178..72cefef6751 100644 --- a/megalinter/descriptors/vbdotnet.megalinter-descriptor.yml +++ b/megalinter/descriptors/vbdotnet.megalinter-descriptor.yml @@ -9,8 +9,7 @@ file_extensions: - ".vb" install: dockerfile: - # https://github.com/dotnet/sdk/issues/37790#issuecomment-1918068016 - - RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community + - RUN apk add --no-cache dotnet8-sdk - ENV PATH="${PATH}:/root/.dotnet/tools" linters: # DOTNET FORMAT @@ -20,12 +19,17 @@ linters: linter_text: | dotnet-format requires a `.sln` or `.vbproj` file to run correctly. linter_url: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-format - linter_repo: https://github.com/dotnet/format + linter_repo: https://github.com/dotnet/sdk + linter_rules_configuration_url: https://github.com/dotnet/sdk/tree/main/documentation/format/docs linter_image_url: https://user-images.githubusercontent.com/9797472/61659851-6bbdc880-ac7d-11e9-95f7-d30c7de1a18a.png + cli_lint_errors_count: regex_count + cli_lint_errors_regex: ".vb\\([0-9]+,[0-9]+\\):\\s(?:warning|error)" cli_executable: dotnet + cli_lint_mode: project cli_lint_extra_args: - "format" - - "{{WORKSPACE}}" + cli_lint_extra_args_after: + - "--include **/*.vb" - "--verify-no-changes" cli_lint_fix_arg_name: "--megalinter-fix-flag" # Workaround to allow fix cli_lint_fix_remove_args: @@ -33,5 +37,8 @@ linters: cli_help_extra_args: - format examples: - - "dotnet format {{WORKSPACE}} --verify-no-changes" - - "dotnet format {{WORKSPACE}}" # Fix + - "dotnet format --verify-no-changes" + - "dotnet format Solution.sln --verify-no-changes" + - "dotnet format Folder/Solution.sln --verify-no-changes" + - "dotnet format Project.vbproj --verify-no-changes" + - "dotnet format" # Fix From e4581f3739b85d18cd8e3c59cbdca25ae636ef39 Mon Sep 17 00:00:00 2001 From: Tom Date: Sun, 23 Jun 2024 19:33:05 +0100 Subject: [PATCH 3/5] repository edge not required --- .trivyignore | 4 ---- Dockerfile | 10 +++++----- docs/descriptors/csharp.md | 2 +- docs/descriptors/csharp_csharpier.md | 2 +- docs/descriptors/csharp_roslynator.md | 2 +- docs/descriptors/repository_devskim.md | 2 +- docs/descriptors/sql_tsqllint.md | 2 +- docs/descriptors/vbdotnet.md | 2 +- flavors/dotnet/Dockerfile | 6 +++--- flavors/dotnetweb/Dockerfile | 6 +++--- flavors/formatters/Dockerfile | 6 +++--- flavors/security/Dockerfile | 4 ++-- linters/csharp_csharpier/Dockerfile | 2 +- linters/csharp_dotnet_format/Dockerfile | 2 +- linters/csharp_roslynator/Dockerfile | 2 +- linters/repository_devskim/Dockerfile | 2 +- linters/sql_tsqllint/Dockerfile | 2 +- linters/vbdotnet_dotnet_format/Dockerfile | 2 +- .../descriptors/repository.megalinter-descriptor.yml | 3 +-- megalinter/descriptors/sql.megalinter-descriptor.yml | 3 +-- 20 files changed, 30 insertions(+), 36 deletions(-) diff --git a/.trivyignore b/.trivyignore index 246531a8c02..27308007f95 100644 --- a/.trivyignore +++ b/.trivyignore @@ -1,7 +1,3 @@ -# .NET sdk -# https://github.com/dotnet/sdk/issues/37790#issuecomment-1918068016 -CVE-2024-0057 - # Devskim CVE-2018-8292 CVE-2019-0820 diff --git a/Dockerfile b/Dockerfile index eb83ea16cd0..e16c101f7c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,7 @@ FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:${EDITORCONFIG_CHECKER_VERSION} as editorconfig-checker FROM golang:1-alpine as revive ## The golang image used as a builder is a temporary workaround (https://github.com/mgechev/revive/issues/787) -## for the released revive binaries not returning version numbers (devel). +## for the released revive binaries not returning version numbers (devel). ## The install command should then be what is commented in the go.megalinter-descriptor.yml RUN GOBIN=/usr/bin go install github.com/mgechev/revive@latest @@ -284,7 +284,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ && echo "Changing owner of node_modules files…" \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ && echo "Removing extra node_module files…" \ - && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete + && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete WORKDIR / #NPM__END @@ -402,7 +402,7 @@ RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" \ # CSHARP installation - && apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community + && apk add --no-cache dotnet8-sdk ENV PATH="${PATH}:/root/.dotnet/tools" # DART installation @@ -507,7 +507,7 @@ RUN sf plugins install @salesforce/plugin-packaging \ # VBDOTNET installation # Next line commented because already managed by another linter -# RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community +# RUN apk add --no-cache dotnet8-sdk # Next line commented because already managed by another linter # ENV PATH="${PATH}:/root/.dotnet/tools" @@ -690,7 +690,7 @@ ENV PATH="~/.raku/bin:/opt/rakudo-pkg/bin:/opt/rakudo-pkg/share/perl6/site/bin:$ # devskim installation # Next line commented because already managed by another linter -# RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community +# RUN apk add --no-cache dotnet8-sdk # Next line commented because already managed by another linter # ENV PATH="${PATH}:/root/.dotnet/tools" RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI \ diff --git a/docs/descriptors/csharp.md b/docs/descriptors/csharp.md index e0ab6d0a5bf..e88d5857e24 100644 --- a/docs/descriptors/csharp.md +++ b/docs/descriptors/csharp.md @@ -36,7 +36,7 @@ description: dotnet-format, csharpier, roslynator are available to analyze CSHAR - Dockerfile commands : ```dockerfile -RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community +RUN apk add --no-cache dotnet8-sdk ENV PATH="${PATH}:/root/.dotnet/tools" ``` diff --git a/docs/descriptors/csharp_csharpier.md b/docs/descriptors/csharp_csharpier.md index 605d44306d2..1f47afcef87 100644 --- a/docs/descriptors/csharp_csharpier.md +++ b/docs/descriptors/csharp_csharpier.md @@ -120,7 +120,7 @@ Options: - Dockerfile commands : ```dockerfile # Parent descriptor install -RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community +RUN apk add --no-cache dotnet8-sdk ENV PATH="${PATH}:/root/.dotnet/tools" # Linter install RUN dotnet tool install --global csharpier diff --git a/docs/descriptors/csharp_roslynator.md b/docs/descriptors/csharp_roslynator.md index 7a327545ace..4280fccbda5 100644 --- a/docs/descriptors/csharp_roslynator.md +++ b/docs/descriptors/csharp_roslynator.md @@ -111,7 +111,7 @@ Run 'roslynator help [command]' for more information on a command. - Dockerfile commands : ```dockerfile # Parent descriptor install -RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community +RUN apk add --no-cache dotnet8-sdk ENV PATH="${PATH}:/root/.dotnet/tools" # Linter install RUN dotnet tool install -g roslynator.dotnet.cli diff --git a/docs/descriptors/repository_devskim.md b/docs/descriptors/repository_devskim.md index 25382e5b2f1..58ef42ae786 100644 --- a/docs/descriptors/repository_devskim.md +++ b/docs/descriptors/repository_devskim.md @@ -119,7 +119,7 @@ devskim 1.0.33+9dba5c6c1f - Dockerfile commands : ```dockerfile -RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community +RUN apk add --no-cache dotnet8-sdk ENV PATH="${PATH}:/root/.dotnet/tools" RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI ``` diff --git a/docs/descriptors/sql_tsqllint.md b/docs/descriptors/sql_tsqllint.md index 0f38b25f6b9..8d3f828361e 100644 --- a/docs/descriptors/sql_tsqllint.md +++ b/docs/descriptors/sql_tsqllint.md @@ -108,7 +108,7 @@ tsqllint [options] [file.sql] | [dir] | [file.sql | dir] - Dockerfile commands : ```dockerfile -RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community +RUN apk add --no-cache dotnet8-sdk ENV PATH="${PATH}:/root/.dotnet/tools" RUN dotnet tool install --global TSQLLint ``` diff --git a/docs/descriptors/vbdotnet.md b/docs/descriptors/vbdotnet.md index 4fe73f9c67d..7d5fa88875e 100644 --- a/docs/descriptors/vbdotnet.md +++ b/docs/descriptors/vbdotnet.md @@ -34,7 +34,7 @@ description: dotnet-format is available to analyze VBDOTNET files in MegaLinter - Dockerfile commands : ```dockerfile -RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community +RUN apk add --no-cache dotnet8-sdk ENV PATH="${PATH}:/root/.dotnet/tools" ``` diff --git a/flavors/dotnet/Dockerfile b/flavors/dotnet/Dockerfile index d9028d110f2..fd0be0a72ea 100644 --- a/flavors/dotnet/Dockerfile +++ b/flavors/dotnet/Dockerfile @@ -199,7 +199,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ && echo "Changing owner of node_modules files…" \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ && echo "Removing extra node_module files…" \ - && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete + && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete WORKDIR / #NPM__END @@ -256,7 +256,7 @@ RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/po && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh \ # CSHARP installation - && apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community + && apk add --no-cache dotnet8-sdk ENV PATH="${PATH}:/root/.dotnet/tools" # KOTLIN installation @@ -273,7 +273,7 @@ ENV PATH="$JAVA_HOME/bin:${PATH}" # VBDOTNET installation # Next line commented because already managed by another linter -# RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community +# RUN apk add --no-cache dotnet8-sdk # Next line commented because already managed by another linter # ENV PATH="${PATH}:/root/.dotnet/tools" diff --git a/flavors/dotnetweb/Dockerfile b/flavors/dotnetweb/Dockerfile index 1267acffec0..8d385c29a13 100644 --- a/flavors/dotnetweb/Dockerfile +++ b/flavors/dotnetweb/Dockerfile @@ -221,7 +221,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ && echo "Changing owner of node_modules files…" \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ && echo "Removing extra node_module files…" \ - && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete + && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete WORKDIR / #NPM__END @@ -278,7 +278,7 @@ RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/po && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh \ # CSHARP installation - && apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community + && apk add --no-cache dotnet8-sdk ENV PATH="${PATH}:/root/.dotnet/tools" # KOTLIN installation @@ -295,7 +295,7 @@ ENV PATH="$JAVA_HOME/bin:${PATH}" # VBDOTNET installation # Next line commented because already managed by another linter -# RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community +# RUN apk add --no-cache dotnet8-sdk # Next line commented because already managed by another linter # ENV PATH="${PATH}:/root/.dotnet/tools" diff --git a/flavors/formatters/Dockerfile b/flavors/formatters/Dockerfile index 0d578ebd1f6..09780b05333 100644 --- a/flavors/formatters/Dockerfile +++ b/flavors/formatters/Dockerfile @@ -129,7 +129,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ && echo "Changing owner of node_modules files…" \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ && echo "Removing extra node_module files…" \ - && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete + && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete WORKDIR / #NPM__END @@ -164,7 +164,7 @@ COPY --link --from=terragrunt /bin/terraform /usr/bin/ ############################################################################################# #OTHER__START # CSHARP installation -RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community +RUN apk add --no-cache dotnet8-sdk ENV PATH="${PATH}:/root/.dotnet/tools" # POWERSHELL installation @@ -176,7 +176,7 @@ RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/po # VBDOTNET installation # Next line commented because already managed by another linter -# RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community +# RUN apk add --no-cache dotnet8-sdk # Next line commented because already managed by another linter # ENV PATH="${PATH}:/root/.dotnet/tools" diff --git a/flavors/security/Dockerfile b/flavors/security/Dockerfile index 712141607c2..8958ddbeb1f 100644 --- a/flavors/security/Dockerfile +++ b/flavors/security/Dockerfile @@ -145,7 +145,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ && echo "Changing owner of node_modules files…" \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ && echo "Removing extra node_module files…" \ - && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete + && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete WORKDIR / #NPM__END @@ -206,7 +206,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.9.0 \ # devskim installation - && apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community + && apk add --no-cache dotnet8-sdk ENV PATH="${PATH}:/root/.dotnet/tools" RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI \ diff --git a/linters/csharp_csharpier/Dockerfile b/linters/csharp_csharpier/Dockerfile index e02acd130d4..ae79c80b7c2 100644 --- a/linters/csharp_csharpier/Dockerfile +++ b/linters/csharp_csharpier/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # CSHARP installation -RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community +RUN apk add --no-cache dotnet8-sdk ENV PATH="${PATH}:/root/.dotnet/tools" # csharpier installation diff --git a/linters/csharp_dotnet_format/Dockerfile b/linters/csharp_dotnet_format/Dockerfile index cad7653bed5..9f7936474c5 100644 --- a/linters/csharp_dotnet_format/Dockerfile +++ b/linters/csharp_dotnet_format/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # CSHARP installation -RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community +RUN apk add --no-cache dotnet8-sdk ENV PATH="${PATH}:/root/.dotnet/tools" #OTHER__END diff --git a/linters/csharp_roslynator/Dockerfile b/linters/csharp_roslynator/Dockerfile index 41c2381b3e0..f58ad14c31e 100644 --- a/linters/csharp_roslynator/Dockerfile +++ b/linters/csharp_roslynator/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # CSHARP installation -RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community +RUN apk add --no-cache dotnet8-sdk ENV PATH="${PATH}:/root/.dotnet/tools" # roslynator installation diff --git a/linters/repository_devskim/Dockerfile b/linters/repository_devskim/Dockerfile index e7d633b3325..9ade3dcd3b5 100644 --- a/linters/repository_devskim/Dockerfile +++ b/linters/repository_devskim/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # devskim installation -RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community +RUN apk add --no-cache dotnet8-sdk ENV PATH="${PATH}:/root/.dotnet/tools" RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI diff --git a/linters/sql_tsqllint/Dockerfile b/linters/sql_tsqllint/Dockerfile index 5871ef0b9dd..945415abfa8 100644 --- a/linters/sql_tsqllint/Dockerfile +++ b/linters/sql_tsqllint/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # tsqllint installation -RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community +RUN apk add --no-cache dotnet8-sdk ENV PATH="${PATH}:/root/.dotnet/tools" RUN dotnet tool install --global TSQLLint diff --git a/linters/vbdotnet_dotnet_format/Dockerfile b/linters/vbdotnet_dotnet_format/Dockerfile index 806b8196839..c151bb8c31d 100644 --- a/linters/vbdotnet_dotnet_format/Dockerfile +++ b/linters/vbdotnet_dotnet_format/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # VBDOTNET installation -RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community +RUN apk add --no-cache dotnet8-sdk ENV PATH="${PATH}:/root/.dotnet/tools" #OTHER__END diff --git a/megalinter/descriptors/repository.megalinter-descriptor.yml b/megalinter/descriptors/repository.megalinter-descriptor.yml index 5a8e5c26c5a..357b0c8f93f 100644 --- a/megalinter/descriptors/repository.megalinter-descriptor.yml +++ b/megalinter/descriptors/repository.megalinter-descriptor.yml @@ -103,8 +103,7 @@ linters: - "devskim analyze --file-format sarif --options-json config --source-code ." install: dockerfile: - # https://github.com/dotnet/sdk/issues/37790#issuecomment-1918068016 - - RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community + - RUN apk add --no-cache dotnet8-sdk - ENV PATH="${PATH}:/root/.dotnet/tools" - RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI ide: diff --git a/megalinter/descriptors/sql.megalinter-descriptor.yml b/megalinter/descriptors/sql.megalinter-descriptor.yml index e546ed57ddd..c995aea73f4 100644 --- a/megalinter/descriptors/sql.megalinter-descriptor.yml +++ b/megalinter/descriptors/sql.megalinter-descriptor.yml @@ -76,8 +76,7 @@ linters: - "tsqllint myfile.sql myfile2.sql" install: dockerfile: - # https://github.com/dotnet/sdk/issues/37790#issuecomment-1918068016 - - RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community + - RUN apk add --no-cache dotnet8-sdk - ENV PATH="${PATH}:/root/.dotnet/tools" - RUN dotnet tool install --global TSQLLint ide: From 250d94e422518ddb7b7cfcb889cebb6c2317cfa9 Mon Sep 17 00:00:00 2001 From: Tom Date: Sun, 23 Jun 2024 19:42:07 +0100 Subject: [PATCH 4/5] updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e4675c2d37..5355d73a85b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l - [Powershell](https://github.com/PowerShell/PSScriptAnalyzer#readme) added missing schema property `POWERSHELL_POWERSHELL_FORMATTER_OUTPUT_ENCODING` - [tflint](https://github.com/terraform-linters/tflint) added missing schema property `TERRAFORM_TFLINT_SECURED_ENV` - [xmllint](https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home) added missing schema properties `XML_XMLLINT_AUTOFORMAT` and `XML_XMLLINT_INDENT` + - [dotnet-format](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-format) various performance improvements and ability to specify sln or proj paths - Doc From 5b5cee4ce78438ffe4575d410e06d12e3b3dd8ac Mon Sep 17 00:00:00 2001 From: TommyE123 Date: Tue, 25 Jun 2024 19:08:15 +0100 Subject: [PATCH 5/5] Revert "repository edge not required" This reverts commit e4581f3739b85d18cd8e3c59cbdca25ae636ef39. --- .trivyignore | 4 ++++ Dockerfile | 10 +++++----- docs/descriptors/csharp.md | 2 +- docs/descriptors/csharp_csharpier.md | 2 +- docs/descriptors/csharp_roslynator.md | 2 +- docs/descriptors/repository_devskim.md | 2 +- docs/descriptors/sql_tsqllint.md | 2 +- docs/descriptors/vbdotnet.md | 2 +- flavors/dotnet/Dockerfile | 6 +++--- flavors/dotnetweb/Dockerfile | 6 +++--- flavors/formatters/Dockerfile | 6 +++--- flavors/security/Dockerfile | 4 ++-- linters/csharp_csharpier/Dockerfile | 2 +- linters/csharp_dotnet_format/Dockerfile | 2 +- linters/csharp_roslynator/Dockerfile | 2 +- linters/repository_devskim/Dockerfile | 2 +- linters/sql_tsqllint/Dockerfile | 2 +- linters/vbdotnet_dotnet_format/Dockerfile | 2 +- .../descriptors/repository.megalinter-descriptor.yml | 3 ++- megalinter/descriptors/sql.megalinter-descriptor.yml | 3 ++- 20 files changed, 36 insertions(+), 30 deletions(-) diff --git a/.trivyignore b/.trivyignore index 27308007f95..246531a8c02 100644 --- a/.trivyignore +++ b/.trivyignore @@ -1,3 +1,7 @@ +# .NET sdk +# https://github.com/dotnet/sdk/issues/37790#issuecomment-1918068016 +CVE-2024-0057 + # Devskim CVE-2018-8292 CVE-2019-0820 diff --git a/Dockerfile b/Dockerfile index e16c101f7c1..eb83ea16cd0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,7 @@ FROM hadolint/hadolint:v2.12.0-alpine as hadolint FROM mstruebing/editorconfig-checker:${EDITORCONFIG_CHECKER_VERSION} as editorconfig-checker FROM golang:1-alpine as revive ## The golang image used as a builder is a temporary workaround (https://github.com/mgechev/revive/issues/787) -## for the released revive binaries not returning version numbers (devel). +## for the released revive binaries not returning version numbers (devel). ## The install command should then be what is commented in the go.megalinter-descriptor.yml RUN GOBIN=/usr/bin go install github.com/mgechev/revive@latest @@ -284,7 +284,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ && echo "Changing owner of node_modules files…" \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ && echo "Removing extra node_module files…" \ - && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete + && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete WORKDIR / #NPM__END @@ -402,7 +402,7 @@ RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" \ # CSHARP installation - && apk add --no-cache dotnet8-sdk + && apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community ENV PATH="${PATH}:/root/.dotnet/tools" # DART installation @@ -507,7 +507,7 @@ RUN sf plugins install @salesforce/plugin-packaging \ # VBDOTNET installation # Next line commented because already managed by another linter -# RUN apk add --no-cache dotnet8-sdk +# RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community # Next line commented because already managed by another linter # ENV PATH="${PATH}:/root/.dotnet/tools" @@ -690,7 +690,7 @@ ENV PATH="~/.raku/bin:/opt/rakudo-pkg/bin:/opt/rakudo-pkg/share/perl6/site/bin:$ # devskim installation # Next line commented because already managed by another linter -# RUN apk add --no-cache dotnet8-sdk +# RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community # Next line commented because already managed by another linter # ENV PATH="${PATH}:/root/.dotnet/tools" RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI \ diff --git a/docs/descriptors/csharp.md b/docs/descriptors/csharp.md index e88d5857e24..e0ab6d0a5bf 100644 --- a/docs/descriptors/csharp.md +++ b/docs/descriptors/csharp.md @@ -36,7 +36,7 @@ description: dotnet-format, csharpier, roslynator are available to analyze CSHAR - Dockerfile commands : ```dockerfile -RUN apk add --no-cache dotnet8-sdk +RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community ENV PATH="${PATH}:/root/.dotnet/tools" ``` diff --git a/docs/descriptors/csharp_csharpier.md b/docs/descriptors/csharp_csharpier.md index 1f47afcef87..605d44306d2 100644 --- a/docs/descriptors/csharp_csharpier.md +++ b/docs/descriptors/csharp_csharpier.md @@ -120,7 +120,7 @@ Options: - Dockerfile commands : ```dockerfile # Parent descriptor install -RUN apk add --no-cache dotnet8-sdk +RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community ENV PATH="${PATH}:/root/.dotnet/tools" # Linter install RUN dotnet tool install --global csharpier diff --git a/docs/descriptors/csharp_roslynator.md b/docs/descriptors/csharp_roslynator.md index 4280fccbda5..7a327545ace 100644 --- a/docs/descriptors/csharp_roslynator.md +++ b/docs/descriptors/csharp_roslynator.md @@ -111,7 +111,7 @@ Run 'roslynator help [command]' for more information on a command. - Dockerfile commands : ```dockerfile # Parent descriptor install -RUN apk add --no-cache dotnet8-sdk +RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community ENV PATH="${PATH}:/root/.dotnet/tools" # Linter install RUN dotnet tool install -g roslynator.dotnet.cli diff --git a/docs/descriptors/repository_devskim.md b/docs/descriptors/repository_devskim.md index 58ef42ae786..25382e5b2f1 100644 --- a/docs/descriptors/repository_devskim.md +++ b/docs/descriptors/repository_devskim.md @@ -119,7 +119,7 @@ devskim 1.0.33+9dba5c6c1f - Dockerfile commands : ```dockerfile -RUN apk add --no-cache dotnet8-sdk +RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community ENV PATH="${PATH}:/root/.dotnet/tools" RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI ``` diff --git a/docs/descriptors/sql_tsqllint.md b/docs/descriptors/sql_tsqllint.md index 8d3f828361e..0f38b25f6b9 100644 --- a/docs/descriptors/sql_tsqllint.md +++ b/docs/descriptors/sql_tsqllint.md @@ -108,7 +108,7 @@ tsqllint [options] [file.sql] | [dir] | [file.sql | dir] - Dockerfile commands : ```dockerfile -RUN apk add --no-cache dotnet8-sdk +RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community ENV PATH="${PATH}:/root/.dotnet/tools" RUN dotnet tool install --global TSQLLint ``` diff --git a/docs/descriptors/vbdotnet.md b/docs/descriptors/vbdotnet.md index 7d5fa88875e..4fe73f9c67d 100644 --- a/docs/descriptors/vbdotnet.md +++ b/docs/descriptors/vbdotnet.md @@ -34,7 +34,7 @@ description: dotnet-format is available to analyze VBDOTNET files in MegaLinter - Dockerfile commands : ```dockerfile -RUN apk add --no-cache dotnet8-sdk +RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community ENV PATH="${PATH}:/root/.dotnet/tools" ``` diff --git a/flavors/dotnet/Dockerfile b/flavors/dotnet/Dockerfile index fd0be0a72ea..d9028d110f2 100644 --- a/flavors/dotnet/Dockerfile +++ b/flavors/dotnet/Dockerfile @@ -199,7 +199,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ && echo "Changing owner of node_modules files…" \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ && echo "Removing extra node_module files…" \ - && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete + && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete WORKDIR / #NPM__END @@ -256,7 +256,7 @@ RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/po && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh \ # CSHARP installation - && apk add --no-cache dotnet8-sdk + && apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community ENV PATH="${PATH}:/root/.dotnet/tools" # KOTLIN installation @@ -273,7 +273,7 @@ ENV PATH="$JAVA_HOME/bin:${PATH}" # VBDOTNET installation # Next line commented because already managed by another linter -# RUN apk add --no-cache dotnet8-sdk +# RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community # Next line commented because already managed by another linter # ENV PATH="${PATH}:/root/.dotnet/tools" diff --git a/flavors/dotnetweb/Dockerfile b/flavors/dotnetweb/Dockerfile index 8d385c29a13..1267acffec0 100644 --- a/flavors/dotnetweb/Dockerfile +++ b/flavors/dotnetweb/Dockerfile @@ -221,7 +221,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ && echo "Changing owner of node_modules files…" \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ && echo "Removing extra node_module files…" \ - && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete + && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete WORKDIR / #NPM__END @@ -278,7 +278,7 @@ RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/po && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh \ # CSHARP installation - && apk add --no-cache dotnet8-sdk + && apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community ENV PATH="${PATH}:/root/.dotnet/tools" # KOTLIN installation @@ -295,7 +295,7 @@ ENV PATH="$JAVA_HOME/bin:${PATH}" # VBDOTNET installation # Next line commented because already managed by another linter -# RUN apk add --no-cache dotnet8-sdk +# RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community # Next line commented because already managed by another linter # ENV PATH="${PATH}:/root/.dotnet/tools" diff --git a/flavors/formatters/Dockerfile b/flavors/formatters/Dockerfile index 09780b05333..0d578ebd1f6 100644 --- a/flavors/formatters/Dockerfile +++ b/flavors/formatters/Dockerfile @@ -129,7 +129,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ && echo "Changing owner of node_modules files…" \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ && echo "Removing extra node_module files…" \ - && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete + && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete WORKDIR / #NPM__END @@ -164,7 +164,7 @@ COPY --link --from=terragrunt /bin/terraform /usr/bin/ ############################################################################################# #OTHER__START # CSHARP installation -RUN apk add --no-cache dotnet8-sdk +RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community ENV PATH="${PATH}:/root/.dotnet/tools" # POWERSHELL installation @@ -176,7 +176,7 @@ RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/po # VBDOTNET installation # Next line commented because already managed by another linter -# RUN apk add --no-cache dotnet8-sdk +# RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community # Next line commented because already managed by another linter # ENV PATH="${PATH}:/root/.dotnet/tools" diff --git a/flavors/security/Dockerfile b/flavors/security/Dockerfile index 8958ddbeb1f..712141607c2 100644 --- a/flavors/security/Dockerfile +++ b/flavors/security/Dockerfile @@ -145,7 +145,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \ && echo "Changing owner of node_modules files…" \ && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \ && echo "Removing extra node_module files…" \ - && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete + && find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete WORKDIR / #NPM__END @@ -206,7 +206,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.9.0 \ # devskim installation - && apk add --no-cache dotnet8-sdk + && apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community ENV PATH="${PATH}:/root/.dotnet/tools" RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI \ diff --git a/linters/csharp_csharpier/Dockerfile b/linters/csharp_csharpier/Dockerfile index ae79c80b7c2..e02acd130d4 100644 --- a/linters/csharp_csharpier/Dockerfile +++ b/linters/csharp_csharpier/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # CSHARP installation -RUN apk add --no-cache dotnet8-sdk +RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community ENV PATH="${PATH}:/root/.dotnet/tools" # csharpier installation diff --git a/linters/csharp_dotnet_format/Dockerfile b/linters/csharp_dotnet_format/Dockerfile index 9f7936474c5..cad7653bed5 100644 --- a/linters/csharp_dotnet_format/Dockerfile +++ b/linters/csharp_dotnet_format/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # CSHARP installation -RUN apk add --no-cache dotnet8-sdk +RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community ENV PATH="${PATH}:/root/.dotnet/tools" #OTHER__END diff --git a/linters/csharp_roslynator/Dockerfile b/linters/csharp_roslynator/Dockerfile index f58ad14c31e..41c2381b3e0 100644 --- a/linters/csharp_roslynator/Dockerfile +++ b/linters/csharp_roslynator/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # CSHARP installation -RUN apk add --no-cache dotnet8-sdk +RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community ENV PATH="${PATH}:/root/.dotnet/tools" # roslynator installation diff --git a/linters/repository_devskim/Dockerfile b/linters/repository_devskim/Dockerfile index 9ade3dcd3b5..e7d633b3325 100644 --- a/linters/repository_devskim/Dockerfile +++ b/linters/repository_devskim/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # devskim installation -RUN apk add --no-cache dotnet8-sdk +RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community ENV PATH="${PATH}:/root/.dotnet/tools" RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI diff --git a/linters/sql_tsqllint/Dockerfile b/linters/sql_tsqllint/Dockerfile index 945415abfa8..5871ef0b9dd 100644 --- a/linters/sql_tsqllint/Dockerfile +++ b/linters/sql_tsqllint/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # tsqllint installation -RUN apk add --no-cache dotnet8-sdk +RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community ENV PATH="${PATH}:/root/.dotnet/tools" RUN dotnet tool install --global TSQLLint diff --git a/linters/vbdotnet_dotnet_format/Dockerfile b/linters/vbdotnet_dotnet_format/Dockerfile index c151bb8c31d..806b8196839 100644 --- a/linters/vbdotnet_dotnet_format/Dockerfile +++ b/linters/vbdotnet_dotnet_format/Dockerfile @@ -131,7 +131,7 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # VBDOTNET installation -RUN apk add --no-cache dotnet8-sdk +RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community ENV PATH="${PATH}:/root/.dotnet/tools" #OTHER__END diff --git a/megalinter/descriptors/repository.megalinter-descriptor.yml b/megalinter/descriptors/repository.megalinter-descriptor.yml index 357b0c8f93f..5a8e5c26c5a 100644 --- a/megalinter/descriptors/repository.megalinter-descriptor.yml +++ b/megalinter/descriptors/repository.megalinter-descriptor.yml @@ -103,7 +103,8 @@ linters: - "devskim analyze --file-format sarif --options-json config --source-code ." install: dockerfile: - - RUN apk add --no-cache dotnet8-sdk + # https://github.com/dotnet/sdk/issues/37790#issuecomment-1918068016 + - RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community - ENV PATH="${PATH}:/root/.dotnet/tools" - RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI ide: diff --git a/megalinter/descriptors/sql.megalinter-descriptor.yml b/megalinter/descriptors/sql.megalinter-descriptor.yml index c995aea73f4..e546ed57ddd 100644 --- a/megalinter/descriptors/sql.megalinter-descriptor.yml +++ b/megalinter/descriptors/sql.megalinter-descriptor.yml @@ -76,7 +76,8 @@ linters: - "tsqllint myfile.sql myfile2.sql" install: dockerfile: - - RUN apk add --no-cache dotnet8-sdk + # https://github.com/dotnet/sdk/issues/37790#issuecomment-1918068016 + - RUN apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community - ENV PATH="${PATH}:/root/.dotnet/tools" - RUN dotnet tool install --global TSQLLint ide: