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

Upgrade dotnet to v6 #1680

Merged
merged 91 commits into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
e2f8c5b
Upgrade dotnet to v6 + list_of_files for dotnet-format
nvuillam Jul 24, 2022
cf820a9
Fixes
nvuillam Jul 25, 2022
e794e49
Fixes
nvuillam Jul 25, 2022
92e3137
Merge branch 'main' into features/dotnet-upgrade
nvuillam Jul 30, 2022
c140688
Adding dotnet project files
Jul 31, 2022
35fca2b
Better .cs examples of bad code
Jul 31, 2022
be35811
Dotnet Upgrade project files (#1679)
lextatic Jul 31, 2022
072621f
Merge branch 'main' into features/dotnet-upgrade
nvuillam Jul 31, 2022
14c527d
Update doc
nvuillam Jul 31, 2022
bfc1ba7
Adding .csproj files to sample_project_fixes
Jul 31, 2022
14d70b6
Added .sln info on linter_text property
Jul 31, 2022
ba6e914
Merge remote-tracking branch 'oxsecirity/features/dotnet-upgrade' int…
Jul 31, 2022
4433588
Updated linter URL and added {{WORKSPACE}} CLI arg
Jul 31, 2022
bec39b4
Unifying vb and csharp projects into one single solution
Jul 31, 2022
995e9df
Upgrade dotnet version on linter dockers
Jul 31, 2022
08e80ba
Really upgrade dotnet everywhere
nvuillam Jul 31, 2022
f8b92cc
Merge remote-tracking branch 'oxsecirity/features/dotnet-upgrade' int…
Aug 1, 2022
ff77273
Merge branch 'main' into features/dotnet-upgrade
nvuillam Aug 1, 2022
c96e1e9
Revert "Upgrade dotnet version on linter dockers"
Aug 1, 2022
dae34ab
Merge branch 'features/dotnet-upgrade' into features/dotnet-upgrade-p…
Aug 4, 2022
f751c73
Testing some Dockerfile configs
Aug 4, 2022
d84ae29
dotnet info
Aug 4, 2022
33c246b
Trying to figure out dotnet version running on each test case
Aug 5, 2022
f6d5342
Checking root's workspace
Aug 5, 2022
0bdb723
Checking for tool versions
Aug 5, 2022
0a855ab
Merge branch 'main' into features/dotnet-upgrade
nvuillam Aug 5, 2022
ec6c581
Merge branch 'features/dotnet-upgrade' into features/dotnet-upgrade-p…
Aug 13, 2022
be93ed6
Removing dotnet-format install from Docker images
Aug 13, 2022
fa059af
Updating linter versions and helps for dotnet-format
Aug 13, 2022
dea1008
Reverting pre_coomands and configuring new dotnet format params
Aug 13, 2022
c27e374
Forgot the "format" argument
Aug 13, 2022
ecd5cf0
Updating test reports
Aug 13, 2022
c01d946
Fixed ERROR paths
Aug 13, 2022
af93486
Merge branch 'main' into features/dotnet-upgrade
nvuillam Aug 15, 2022
4c32a7c
Merge branch 'features/dotnet-upgrade' into features/dotnet-upgrade-p…
Nov 6, 2022
37eca7c
Merge remote-tracking branch 'oxsecirity/main' into features/dotnet-u…
Nov 6, 2022
5bff146
Merge remote-tracking branch 'origin/main' into features/dotnet-upgra…
nvuillam Nov 24, 2022
e20508e
Undowngrade DevSkim version
nvuillam Nov 24, 2022
3d7d0fe
changelog
nvuillam Nov 24, 2022
fb40391
Remove version from DevSkim install line
nvuillam Nov 24, 2022
960d165
Update TSQLLint version
nvuillam Nov 24, 2022
2d9d566
fix dotnet format call
nvuillam Nov 24, 2022
92f57bc
Using relative paths for worksapces
Nov 26, 2022
4c26868
Detailed logging for debug
Nov 26, 2022
ae80122
Revert "Using relative paths for worksapces"
Nov 26, 2022
a38264f
Disabling list_of_files mode.
Nov 26, 2022
1210aa7
Reverting back to list_of_files
lextatic Nov 26, 2022
45402ec
Echoing linting command
lextatic Nov 27, 2022
d25dced
Checking workspace path
lextatic Nov 27, 2022
51288cc
Fixing descriptor parsing
lextatic Nov 27, 2022
8f1362d
Fix parse
lextatic Nov 27, 2022
d23c648
Trying to figure out why --include is failing
lextatic Nov 27, 2022
7f136ba
Testing the exact computed command manually
lextatic Nov 27, 2022
a6fa5d6
Testing relative paths
lextatic Nov 27, 2022
a754088
Checking file contnt before testing linter
lextatic Nov 27, 2022
6d9ba3a
Checking editorconfig contents
lextatic Nov 27, 2022
1320ac6
Adding editorconfigs to validate whitespaces.
lextatic Nov 27, 2022
cd30160
Re-enabling detailed logging
lextatic Nov 27, 2022
f457abc
Adding style error to csharp_bad_02.cs.
lextatic Nov 27, 2022
0082851
Testing whitespace formatting for vb only
lextatic Nov 27, 2022
4a85cdb
I don't know anymore
lextatic Nov 27, 2022
7d881e6
Fixed VB descriptor
lextatic Nov 28, 2022
86fe8ed
A few mroe tests with editorconfigs
lextatic Nov 29, 2022
677f1ef
Fixed pre-command syntax
lextatic Nov 29, 2022
02df457
Testing lint without --include parameter
lextatic Nov 30, 2022
1e93976
Trying several path styles
lextatic Nov 30, 2022
6adfc7a
Testing some different paths
lextatic Nov 30, 2022
e5603c2
Testing echo
lextatic Nov 30, 2022
912ae6b
More tests
lextatic Nov 30, 2022
dc97fd8
Checking versions
lextatic Dec 1, 2022
028dce9
Adding dotnet --info
lextatic Dec 1, 2022
a189a83
Upgrade to dotnet 7 and removed list_of_files
lextatic Dec 1, 2022
8ba59da
Revert some changes for --list-of-files
lextatic Dec 1, 2022
1e0944a
More experiments
lextatic Dec 2, 2022
b6e30f3
Ops
lextatic Dec 2, 2022
b220d13
Fixing malformed file
lextatic Dec 2, 2022
bd24fc0
Whoa, python sux
lextatic Dec 2, 2022
01c88dc
Change dotnet command
lextatic Dec 2, 2022
699d6ad
Updating reports for tests
lextatic Dec 2, 2022
1ec2fad
Success linters also format bad files
lextatic Dec 2, 2022
83d3277
Separating good and bad test projects
lextatic Dec 3, 2022
cc99469
Revert back to dotnet6
lextatic Dec 3, 2022
46a5a1a
Updated success report files
lextatic Dec 3, 2022
272def5
Merge remote-tracking branch 'oxsecirity/main' into features/dotnet-u…
lextatic Dec 3, 2022
e54901b
Removing unused import from DotnetFormatLinter.py
lextatic Dec 3, 2022
dc5d945
Merge remote-tracking branch 'oxsecirity/main' into features/dotnet-u…
lextatic Dec 10, 2022
4e5b040
Merge remote-tracking branch 'oxsecirity/main' into features/dotnet-u…
lextatic Jan 5, 2023
7630633
Upgrade to dotnet 7
lextatic Jan 5, 2023
7a8d094
Removing csharpier version specification from install cli
lextatic Jan 5, 2023
bde05c3
Revert "Upgrade to dotnet 7"
lextatic Jan 6, 2023
7f206ca
Updating changelog, removed 'list_of_files' for now
lextatic Jan 6, 2023
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
35 changes: 20 additions & 15 deletions .automation/generated/linter-helps.json
Original file line number Diff line number Diff line change
Expand Up @@ -1563,30 +1563,35 @@
" list Shows list of available checks [aliases: l]"
],
"dotnet-format": [
"dotnet-format",
" dotnet-format",
"Description:",
" Formats code to match editorconfig settings.",
"",
"Usage:",
" dotnet-format [options] [<workspace>]",
" dotnet format [<PROJECT | SOLUTION>] [command] [options]",
"",
"Arguments:",
" <workspace> A path to a solution file, a project file, or a folder containing a solution or project file. If a path is not specified then the current directory is used. [default: ]",
" <PROJECT | SOLUTION> The project or solution file to operate on. If a file is not specified, the command will search the current directory for one. [default: ]",
"",
"Options:",
" --diagnostics <diagnostics> A space separated list of diagnostic ids to use as a filter when fixing code style or 3rd party issues.",
" [default: whichever ids are listed in the editorconfig file]",
" --severity <error|info|warn> The severity of diagnostics to fix. Allowed values are info, warn, and error.",
" --no-restore Doesn't execute an implicit restore before formatting.",
" -f, --folder Whether to treat the `<workspace>` argument as a simple folder of files.",
" -w, --fix-whitespace Run whitespace formatting. Run by default when not applying fixes.",
" -s, --fix-style <error|info|warn> Run code style analyzers and apply fixes.",
" -a, --fix-analyzers <error|info|warn> Run 3rd party analyzers and apply fixes.",
" --diagnostics <diagnostics> A space separated list of diagnostic ids to use as a filter when fixing code style or 3rd party issues. [default: ]",
" --include <include> A list of relative file or folder paths to include in formatting. All files are formatted if empty. [default: ]",
" --exclude <exclude> A list of relative file or folder paths to exclude from formatting. [default: ]",
" --check Formats files without saving changes to disk. Terminates with a non-zero exit code if any files were formatted.",
" --report <report-path> Accepts a file path, which if provided, will produce a json report in the given directory.",
" --verify-no-changes Verify no formatting changes would be performed. Terminates with a non-zero exit code if any files would have",
" been formatted.",
" --include <include> A list of relative file or folder paths to include in formatting. All files are formatted if empty. [default:",
" all files in the solution or project]",
" --exclude <exclude> A list of relative file or folder paths to exclude from formatting. [default: none]",
" --include-generated Format files generated by the SDK.",
" -v, --verbosity <d|detailed|diag|diagnostic|m|minimal|n|normal|q|quiet> Set the verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]",
" --binarylog <binary-log-path> Log all project or solution load information to a binary log file.",
" --version Show version information",
" -?, -h, --help Show help and usage information",
" --report <report-path> Accepts a file path, which if provided, will produce a json report in the given directory.",
" -?, -h, --help Show command line help.",
"",
"Commands:",
" whitespace <PROJECT | SOLUTION> Run whitespace formatting. [default: ]",
" style <PROJECT | SOLUTION> Run code style analyzers and apply fixes. [default: ]",
" analyzers <PROJECT | SOLUTION> Run 3rd party analyzers and apply fixes. [default: ]",
""
],
"dustilock": [
Expand Down
2 changes: 1 addition & 1 deletion .automation/generated/linter-versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"djlint": "1.19.4",
"dockerfilelint": "1.8.0",
"dotenv-linter": "3.2.0",
"dotnet-format": "000",
"dotnet-format": "6.3.322007",
"dustilock": "0.0.0",
"editorconfig-checker": "2.4.0",
"eslint": "8.27.0",
Expand Down
Binary file modified .automation/test/csharp/csharp_bad_01.cs
Binary file not shown.
12 changes: 12 additions & 0 deletions .automation/test/csharp/csharp_bad_02.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;

namespace HelloWorld
{
class Program
{
static void Main (string[] args)
{
Console.WriteLine ("Hello World!");
}
}
}
12 changes: 12 additions & 0 deletions .automation/test/csharp/csharp_good_02.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;

namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
10 changes: 10 additions & 0 deletions .automation/test/csharp/csharp_project.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
Results of dotnet-format linter (version 4.1.131201)
Results of dotnet-format linter (version 6.3.322007)
See documentation on https://megalinter.github.io/descriptors/csharp_dotnet_format/
-----------------------------------------------

[ERROR] .automation/test/csharp/csharp_bad_01.cs
Formatting code files in workspace '.automation/test/csharp'.
csharp/csharp_bad_01.cs(1,33): Fix whitespace formatting.
Formatted code file '.automation/test/csharp/csharp_bad_01.cs'.
Format complete in 1295ms.
.automation/test/csharp/csharp_bad_01.cs(5,18): error WHITESPACE: Fix whitespace formatting. Replace 1 characters with '\r\n\s\s\s\s'. [.automation/test/csharp/csharp_project.csproj]

Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Results of dotnet-format linter (version 4.1.131201)
Results of dotnet-format linter (version 6.3.322007)
See documentation on https://megalinter.github.io/descriptors/csharp_dotnet_format/
-----------------------------------------------

[SUCCESS] .automation/test/csharp/csharp_good_01.cs
Formatting code files in workspace '.automation/test/csharp'.
Format complete in 1181ms.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
31 changes: 31 additions & 0 deletions .automation/test/sample_project_fixes/dotnet_solution.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32630.192
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "csharp_project", "csharp_project\csharp_project.csproj", "{FF219771-9DBB-4FB0-8217-F77034831035}"
EndProject
Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "vbdotnet_project", "vbdotnet_project\vbdotnet_project.vbproj", "{AF06A915-8734-4B54-836D-A0E2BAE228EB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FF219771-9DBB-4FB0-8217-F77034831035}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF219771-9DBB-4FB0-8217-F77034831035}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF219771-9DBB-4FB0-8217-F77034831035}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FF219771-9DBB-4FB0-8217-F77034831035}.Release|Any CPU.Build.0 = Release|Any CPU
{AF06A915-8734-4B54-836D-A0E2BAE228EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AF06A915-8734-4B54-836D-A0E2BAE228EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AF06A915-8734-4B54-836D-A0E2BAE228EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AF06A915-8734-4B54-836D-A0E2BAE228EB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4DFF31ED-FADA-4A6E-B9D4-51D89C3C1FFC}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<RootNamespace>vb_projecty</RootNamespace>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
Results of dotnet-format linter (version 4.1.131201)
Results of dotnet-format linter (version 6.3.322007)
See documentation on https://megalinter.github.io/descriptors/vbdotnet_dotnet_format/
-----------------------------------------------

[ERROR] .automation/test/vbdotnet/vbdotnet_bad_1.vb
Formatting code files in workspace '.automation/test/vbdotnet'.
vbdotnet/vbdotnet_bad_1.vb(4,4): Fix whitespace formatting.
vbdotnet/vbdotnet_bad_1.vb(4,20): Fix whitespace formatting.
vbdotnet/vbdotnet_bad_1.vb(5,7): Fix whitespace formatting.
Formatted code file '.automation/test/vbdotnet/vbdotnet_bad_1.vb'.
Format complete in 1188ms.
.automation/test/vbdotnet/vbdotnet_bad_1.vb(3,20): error WHITESPACE: Fix whitespace formatting. Replace 4 characters with '\r\n\s\s\s\s'. [.automation/test/vbdotnet/vb_projecty.vbproj]
.automation/test/vbdotnet/vbdotnet_bad_1.vb(4,20): error WHITESPACE: Fix whitespace formatting. Delete 2 characters. [.automation/test/vbdotnet/vb_projecty.vbproj]
.automation/test/vbdotnet/vbdotnet_bad_1.vb(4,23): error WHITESPACE: Fix whitespace formatting. Replace 7 characters with '\r\n\s\s\s\s\s\s\s\s'. [.automation/test/vbdotnet/vb_projecty.vbproj]

Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Results of dotnet-format linter (version 4.1.131201)
Results of dotnet-format linter (version 6.3.322007)
See documentation on https://megalinter.github.io/descriptors/vbdotnet_dotnet_format/
-----------------------------------------------

[SUCCESS] .automation/test/vbdotnet/vbdotnet_good_1.vb
Formatting code files in workspace '.automation/test/vbdotnet'.
Format complete in 1063ms.
[SUCCESS] .automation/test/vbdotnet/vbdotnet_good_1.vb

9 changes: 9 additions & 0 deletions .automation/test/vbdotnet/vb_projecty.vbproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<RootNamespace>vb_projecty</RootNamespace>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

</Project>
7 changes: 7 additions & 0 deletions .automation/test/vbdotnet/vbdotnet_bad_2.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Imports System

Public Module Hello
Public Sub Main( )
Console.WriteLine("hello, world"
End Sub
End Module
7 changes: 7 additions & 0 deletions .automation/test/vbdotnet/vbdotnet_good_2.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Imports System

Public Module Hello
Public Sub Main()
Console.WriteLine("hello, world")
End Sub
End Module
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l
- Allow cspell to also analyze file names (new variable SPELL_CSPELL_ANALYZE_FILE_NAMES) ([#2009](https://github.com/oxsecurity/megalinter/issues/2009))
- Fix bicep version regex

- Upgrade to dotnet 6.0 + `list_of_files` for dotnet-format CLI lint mode to improve performances (requires `.csproj` or `.vbproj` in the repo)

- Linter versions upgrades
- [actionlint](https://rhysd.github.io/actionlint/) from 1.6.21 to **1.6.22**
- [bicep_linter](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/linter) from 0.11.1 to to **0.12.1**
Expand Down
12 changes: 4 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ RUN rc-update add docker boot && rc-service docker start || true \
# CSHARP installation
&& wget --tries=5 -q -O dotnet-install.sh https://dot.net/v1/dotnet-install.sh \
&& chmod +x dotnet-install.sh \
&& ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 5.0 -version latest
&& ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 6.0 -version latest

ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet"

Expand Down Expand Up @@ -373,7 +373,7 @@ RUN wget --tries=5 -q -O phive.phar https://phar.io/releases/phive.phar \
# Next line commented because already managed by another linter
# RUN wget --tries=5 -q -O dotnet-install.sh https://dot.net/v1/dotnet-install.sh \
# && chmod +x dotnet-install.sh \
# && ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 5.0 -version latest
# && ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 6.0 -version latest
# Next line commented because already managed by another linter
# ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet"

Expand Down Expand Up @@ -547,7 +547,7 @@ ENV PATH="~/.raku/bin:/opt/rakudo-pkg/bin:/opt/rakudo-pkg/share/perl6/site/bin:$
# Next line commented because already managed by another linter
# RUN wget --tries=5 -q -O dotnet-install.sh https://dot.net/v1/dotnet-install.sh \
# && chmod +x dotnet-install.sh \
# && ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 5.0 -version latest
# && ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 6.0 -version latest
# Next line commented because already managed by another linter
# ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet"
RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI --version 0.6.9 \
Expand Down Expand Up @@ -606,7 +606,7 @@ RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI --version 0.6.9 \
# Next line commented because already managed by another linter
# RUN wget --tries=5 -q -O dotnet-install.sh https://dot.net/v1/dotnet-install.sh \
# && chmod +x dotnet-install.sh \
# && ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 5.0 -version latest
# && ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 6.0 -version latest
# Next line commented because already managed by another linter
# ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet"
&& dotnet tool install --global --version 1.14.5 TSQLLint \
Expand All @@ -629,10 +629,6 @@ RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI --version 0.6.9 \
ENV KICS_QUERIES_PATH=/opt/kics/assets/queries KICS_LIBRARIES_PATH=/opt/kics/assets/libraries
# Managed with COPY --from=kics /app/bin/assets /opt/kics/assets/

# dotnet-format installation
# Next line commented because already managed by another linter
# RUN /usr/share/dotnet/dotnet tool install -g dotnet-format

#OTHER__END

################################
Expand Down
10 changes: 3 additions & 7 deletions flavors/dotnet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ RUN mkdir -p ${PWSH_DIRECTORY} \
# CSHARP installation
&& wget --tries=5 -q -O dotnet-install.sh https://dot.net/v1/dotnet-install.sh \
&& chmod +x dotnet-install.sh \
&& ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 5.0 -version latest
&& ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 6.0 -version latest

ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet"

Expand All @@ -252,7 +252,7 @@ ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet"
# Next line commented because already managed by another linter
# RUN wget --tries=5 -q -O dotnet-install.sh https://dot.net/v1/dotnet-install.sh \
# && chmod +x dotnet-install.sh \
# && ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 5.0 -version latest
# && ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 6.0 -version latest
# Next line commented because already managed by another linter
# ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet"

Expand Down Expand Up @@ -354,15 +354,11 @@ RUN curl --retry 5 --retry-delay 5 -sLO "${ARM_TTK_URI}" \
# Next line commented because already managed by another linter
# RUN wget --tries=5 -q -O dotnet-install.sh https://dot.net/v1/dotnet-install.sh \
# && chmod +x dotnet-install.sh \
# && ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 5.0 -version latest
# && ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 6.0 -version latest
# Next line commented because already managed by another linter
# ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet"
&& dotnet tool install --global --version 1.14.5 TSQLLint

# dotnet-format installation
# Next line commented because already managed by another linter
# RUN /usr/share/dotnet/dotnet tool install -g dotnet-format

#OTHER__END

################################
Expand Down
2 changes: 1 addition & 1 deletion flavors/security/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil
# devskim installation
&& wget --tries=5 -q -O dotnet-install.sh https://dot.net/v1/dotnet-install.sh \
&& chmod +x dotnet-install.sh \
&& ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 5.0 -version latest
&& ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 6.0 -version latest

ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet"
RUN dotnet tool install --global Microsoft.CST.DevSkim.CLI --version 0.6.9 \
Expand Down
5 changes: 1 addition & 4 deletions linters/csharp_dotnet_format/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,10 @@ ENV PATH="/node_modules/.bin:${PATH}"
# CSHARP installation
RUN wget --tries=5 -q -O dotnet-install.sh https://dot.net/v1/dotnet-install.sh \
&& chmod +x dotnet-install.sh \
&& ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 5.0 -version latest
&& ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 6.0 -version latest

ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet"

# dotnet-format installation
RUN /usr/share/dotnet/dotnet tool install -g dotnet-format

#OTHER__END

######################
Expand Down
2 changes: 1 addition & 1 deletion linters/sql_tsqllint/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ ENV PATH="/node_modules/.bin:${PATH}"
# tsqllint installation
RUN wget --tries=5 -q -O dotnet-install.sh https://dot.net/v1/dotnet-install.sh \
&& chmod +x dotnet-install.sh \
&& ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 5.0 -version latest
&& ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 6.0 -version latest

ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet"
RUN dotnet tool install --global TSQLLint
Expand Down
5 changes: 1 addition & 4 deletions linters/vbdotnet_dotnet_format/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,10 @@ ENV PATH="/node_modules/.bin:${PATH}"
# VBDOTNET installation
RUN wget --tries=5 -q -O dotnet-install.sh https://dot.net/v1/dotnet-install.sh \
&& chmod +x dotnet-install.sh \
&& ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 5.0 -version latest
&& ./dotnet-install.sh --install-dir /usr/share/dotnet -channel 6.0 -version latest

ENV PATH="${PATH}:/root/.dotnet/tools:/usr/share/dotnet"

# dotnet-format installation
RUN /usr/share/dotnet/dotnet tool install -g dotnet-format

#OTHER__END

######################
Expand Down
Loading