Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dotnet linters to .NET 8 #3182

Merged
merged 7 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ RUN apk add --no-cache \
docker \
openrc \
icu-libs \
dotnet7-sdk \
openjdk17 \
perl \
perl-dev \
Expand Down Expand Up @@ -384,10 +383,10 @@ RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases
rm \
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME"

"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" \

# CSHARP installation
&& apk add --no-cache dotnet8-sdk --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
ENV PATH="${PATH}:/root/.dotnet/tools"

# DART installation
Expand Down Expand Up @@ -490,6 +489,8 @@ 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
# Next line commented because already managed by another linter
# ENV PATH="${PATH}:/root/.dotnet/tools"

# actionlint installation
Expand Down Expand Up @@ -666,6 +667,8 @@ 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
# Next line commented because already managed by another linter
# ENV PATH="${PATH}:/root/.dotnet/tools"
RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI \

Expand Down Expand Up @@ -729,6 +732,8 @@ RUN curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh |

# tsqllint 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
# Next line commented because already managed by another linter
# ENV PATH="${PATH}:/root/.dotnet/tools"
&& dotnet tool install --global TSQLLint

Expand Down
9 changes: 6 additions & 3 deletions flavors/dotnet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ RUN apk add --no-cache \
musl-dev \
openssh \
icu-libs \
dotnet7-sdk \
openjdk17 \
py3-pyflakes \
nodejs \
Expand Down Expand Up @@ -247,10 +246,10 @@ RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.4.0/po
&& mkdir -p /opt/microsoft/powershell/7 \
&& tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \
&& chmod +x /opt/microsoft/powershell/7/pwsh \
&& ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh

&& 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
ENV PATH="${PATH}:/root/.dotnet/tools"

# KOTLIN installation
Expand All @@ -267,6 +266,8 @@ 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
# Next line commented because already managed by another linter
# ENV PATH="${PATH}:/root/.dotnet/tools"

# actionlint installation
Expand Down Expand Up @@ -368,6 +369,8 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \

# tsqllint 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
# Next line commented because already managed by another linter
# ENV PATH="${PATH}:/root/.dotnet/tools"
&& dotnet tool install --global TSQLLint

Expand Down
9 changes: 6 additions & 3 deletions flavors/dotnetweb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ RUN apk add --no-cache \
musl-dev \
openssh \
icu-libs \
dotnet7-sdk \
openjdk17 \
py3-pyflakes \
nodejs \
Expand Down Expand Up @@ -267,10 +266,10 @@ RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.4.0/po
&& mkdir -p /opt/microsoft/powershell/7 \
&& tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \
&& chmod +x /opt/microsoft/powershell/7/pwsh \
&& ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh

&& 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
ENV PATH="${PATH}:/root/.dotnet/tools"

# KOTLIN installation
Expand All @@ -287,6 +286,8 @@ 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
# Next line commented because already managed by another linter
# ENV PATH="${PATH}:/root/.dotnet/tools"

# actionlint installation
Expand Down Expand Up @@ -388,6 +389,8 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \

# tsqllint 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
# Next line commented because already managed by another linter
# ENV PATH="${PATH}:/root/.dotnet/tools"
&& dotnet tool install --global TSQLLint

Expand Down
4 changes: 3 additions & 1 deletion flavors/formatters/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ RUN apk add --no-cache \
make \
musl-dev \
openssh \
dotnet7-sdk \
icu-libs \
npm \
nodejs-current \
Expand Down Expand Up @@ -162,6 +161,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
ENV PATH="${PATH}:/root/.dotnet/tools"

# POWERSHELL installation
Expand All @@ -173,6 +173,8 @@ RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.4.0/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
# Next line commented because already managed by another linter
# ENV PATH="${PATH}:/root/.dotnet/tools"

# shfmt installation
Expand Down
5 changes: 2 additions & 3 deletions flavors/security/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ RUN apk add --no-cache \
gcompat \
libc6-compat \
libstdc++ \
dotnet7-sdk \
npm \
nodejs-current \
yarn \
Expand Down Expand Up @@ -198,10 +197,10 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil

# kubescape installation
&& ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \
curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v v2.9.0

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
ENV PATH="${PATH}:/root/.dotnet/tools"
RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI \

Expand Down
2 changes: 1 addition & 1 deletion linters/csharp_csharpier/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ RUN apk add --no-cache \
make \
musl-dev \
openssh \
dotnet7-sdk \
&& git config --global core.autocrlf true
#APK__END

Expand Down Expand Up @@ -123,6 +122,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
ENV PATH="${PATH}:/root/.dotnet/tools"

# csharpier installation
Expand Down
2 changes: 1 addition & 1 deletion linters/csharp_dotnet_format/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ RUN apk add --no-cache \
make \
musl-dev \
openssh \
dotnet7-sdk \
&& git config --global core.autocrlf true
#APK__END

Expand Down Expand Up @@ -123,6 +122,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
ENV PATH="${PATH}:/root/.dotnet/tools"

#OTHER__END
Expand Down
2 changes: 1 addition & 1 deletion linters/csharp_roslynator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ RUN apk add --no-cache \
make \
musl-dev \
openssh \
dotnet7-sdk \
&& git config --global core.autocrlf true
#APK__END

Expand Down Expand Up @@ -123,6 +122,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
ENV PATH="${PATH}:/root/.dotnet/tools"

# roslynator installation
Expand Down
2 changes: 1 addition & 1 deletion linters/repository_devskim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ RUN apk add --no-cache \
make \
musl-dev \
openssh \
dotnet7-sdk \
&& git config --global core.autocrlf true
#APK__END

Expand Down Expand Up @@ -123,6 +122,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
ENV PATH="${PATH}:/root/.dotnet/tools"
RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI

Expand Down
2 changes: 1 addition & 1 deletion linters/sql_tsqllint/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ RUN apk add --no-cache \
make \
musl-dev \
openssh \
dotnet7-sdk \
&& git config --global core.autocrlf true
#APK__END

Expand Down Expand Up @@ -123,6 +122,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
ENV PATH="${PATH}:/root/.dotnet/tools"
RUN dotnet tool install --global TSQLLint

Expand Down
2 changes: 1 addition & 1 deletion linters/vbdotnet_dotnet_format/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ RUN apk add --no-cache \
make \
musl-dev \
openssh \
dotnet7-sdk \
&& git config --global core.autocrlf true
#APK__END

Expand Down Expand Up @@ -123,6 +122,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
ENV PATH="${PATH}:/root/.dotnet/tools"

#OTHER__END
Expand Down
4 changes: 2 additions & 2 deletions megalinter/descriptors/csharp.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ descriptor_flavors:
file_extensions:
- ".cs"
install:
apk:
- dotnet7-sdk
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
- ENV PATH="${PATH}:/root/.dotnet/tools"
linters:
# DOTNET FORMAT
Expand Down
4 changes: 2 additions & 2 deletions megalinter/descriptors/repository.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ linters:
- "devskim analyze ."
- "devskim analyze --file-format sarif ."
install:
apk:
- dotnet7-sdk
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
- ENV PATH="${PATH}:/root/.dotnet/tools"
- RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI
ide:
Expand Down
Loading
Loading