Skip to content

Commit 3d00fa5

Browse files
Migrates to .NET 9, adopts central package management, new solution format and other updates (#226)
* Bump the nuget group across 1 directory with 14 updates Bumps the nuget group with 14 updates in the /GitHubIssueFormsParser directory: | Package | From | To | | --- | --- | --- | | [Meziantou.Analyzer](https://github.com/meziantou/Meziantou.Analyzer) | `2.0.172` | `2.0.187` | | [Microsoft.VisualStudio.Threading.Analyzers](https://github.com/microsoft/vs-threading) | `17.11.20` | `17.13.2` | | [Roslynator.Analyzers](https://github.com/dotnet/roslynator) | `4.12.8` | `4.13.0` | | [Roslynator.CodeAnalysis.Analyzers](https://github.com/dotnet/roslynator) | `4.12.8` | `4.13.0` | | [Roslynator.Formatting.Analyzers](https://github.com/dotnet/roslynator) | `4.12.8` | `4.13.0` | | [YamlDotNet](https://github.com/aaubry/YamlDotNet) | `16.1.3` | `16.3.0` | | [coverlet.collector](https://github.com/coverlet-coverage/coverlet) | `6.0.2` | `6.0.4` | | [coverlet.msbuild](https://github.com/coverlet-coverage/coverlet) | `6.0.2` | `6.0.4` | | [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) | `17.11.1` | `17.13.0` | | [NSubstitute](https://github.com/nsubstitute/NSubstitute) | `5.1.0` | `5.3.0` | | [Shouldly](https://github.com/shouldly/shouldly) | `4.2.1` | `4.3.0` | | [xunit](https://github.com/xunit/xunit) | `2.9.2` | `2.9.3` | | [xunit.analyzers](https://github.com/xunit/xunit.analyzers) | `1.16.0` | `1.18.0` | | [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) | `2.8.2` | `3.0.2` | Updates `Meziantou.Analyzer` from 2.0.172 to 2.0.187 - [Release notes](https://github.com/meziantou/Meziantou.Analyzer/releases) - [Commits](meziantou/Meziantou.Analyzer@2.0.172...2.0.187) Updates `Microsoft.VisualStudio.Threading.Analyzers` from 17.11.20 to 17.13.2 - [Release notes](https://github.com/microsoft/vs-threading/releases) - [Commits](microsoft/vs-threading@v17.11.20...v17.13.2) Updates `Roslynator.Analyzers` from 4.12.8 to 4.13.0 - [Release notes](https://github.com/dotnet/roslynator/releases) - [Changelog](https://github.com/dotnet/roslynator/blob/main/ChangeLog.md) - [Commits](dotnet/roslynator@v4.12.8...v4.13.0) Updates `Roslynator.CodeAnalysis.Analyzers` from 4.12.8 to 4.13.0 - [Release notes](https://github.com/dotnet/roslynator/releases) - [Changelog](https://github.com/dotnet/roslynator/blob/main/ChangeLog.md) - [Commits](dotnet/roslynator@v4.12.8...v4.13.0) Updates `Roslynator.Formatting.Analyzers` from 4.12.8 to 4.13.0 - [Release notes](https://github.com/dotnet/roslynator/releases) - [Changelog](https://github.com/dotnet/roslynator/blob/main/ChangeLog.md) - [Commits](dotnet/roslynator@v4.12.8...v4.13.0) Updates `YamlDotNet` from 16.1.3 to 16.3.0 - [Release notes](https://github.com/aaubry/YamlDotNet/releases) - [Commits](aaubry/YamlDotNet@v16.1.3...v16.3.0) Updates `coverlet.collector` from 6.0.2 to 6.0.4 - [Release notes](https://github.com/coverlet-coverage/coverlet/releases) - [Commits](coverlet-coverage/coverlet@v6.0.2...v6.0.4) Updates `coverlet.msbuild` from 6.0.2 to 6.0.4 - [Release notes](https://github.com/coverlet-coverage/coverlet/releases) - [Commits](coverlet-coverage/coverlet@v6.0.2...v6.0.4) Updates `Microsoft.NET.Test.Sdk` from 17.11.1 to 17.13.0 - [Release notes](https://github.com/microsoft/vstest/releases) - [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md) - [Commits](microsoft/vstest@v17.11.1...v17.13.0) Updates `NSubstitute` from 5.1.0 to 5.3.0 - [Release notes](https://github.com/nsubstitute/NSubstitute/releases) - [Changelog](https://github.com/nsubstitute/NSubstitute/blob/main/CHANGELOG.md) - [Commits](nsubstitute/NSubstitute@v5.1.0...v5.3.0) Updates `Shouldly` from 4.2.1 to 4.3.0 - [Release notes](https://github.com/shouldly/shouldly/releases) - [Changelog](https://github.com/shouldly/shouldly/blob/master/BREAKING%20CHANGES.txt) - [Commits](shouldly/shouldly@4.2.1...4.3.0) Updates `xunit` from 2.9.2 to 2.9.3 - [Commits](xunit/xunit@v2-2.9.2...v2-2.9.3) Updates `xunit.analyzers` from 1.16.0 to 1.18.0 - [Commits](xunit/xunit.analyzers@1.16.0...1.18.0) Updates `xunit.runner.visualstudio` from 2.8.2 to 3.0.2 - [Release notes](https://github.com/xunit/visualstudio.xunit/releases) - [Commits](xunit/visualstudio.xunit@2.8.2...3.0.2) --- updated-dependencies: - dependency-name: Meziantou.Analyzer dependency-type: direct:production update-type: version-update:semver-patch dependency-group: nuget - dependency-name: Microsoft.VisualStudio.Threading.Analyzers dependency-type: direct:production update-type: version-update:semver-minor dependency-group: nuget - dependency-name: Roslynator.Analyzers dependency-type: direct:production update-type: version-update:semver-minor dependency-group: nuget - dependency-name: Roslynator.CodeAnalysis.Analyzers dependency-type: direct:production update-type: version-update:semver-minor dependency-group: nuget - dependency-name: Roslynator.Formatting.Analyzers dependency-type: direct:production update-type: version-update:semver-minor dependency-group: nuget - dependency-name: YamlDotNet dependency-type: direct:production update-type: version-update:semver-minor dependency-group: nuget - dependency-name: coverlet.collector dependency-type: direct:production update-type: version-update:semver-patch dependency-group: nuget - dependency-name: coverlet.msbuild dependency-type: direct:production update-type: version-update:semver-patch dependency-group: nuget - dependency-name: Microsoft.NET.Test.Sdk dependency-type: direct:production update-type: version-update:semver-minor dependency-group: nuget - dependency-name: NSubstitute dependency-type: direct:production update-type: version-update:semver-minor dependency-group: nuget - dependency-name: Shouldly dependency-type: direct:production update-type: version-update:semver-minor dependency-group: nuget - dependency-name: xunit dependency-type: direct:production update-type: version-update:semver-patch dependency-group: nuget - dependency-name: xunit.analyzers dependency-type: direct:production update-type: version-update:semver-minor dependency-group: nuget - dependency-name: xunit.runner.visualstudio dependency-type: direct:production update-type: version-update:semver-major dependency-group: nuget ... Signed-off-by: dependabot[bot] <[email protected]> * Migrates solution to .slnx format Updates the solution file format from .sln to .slnx for improved structure and performance. Updates the .gitattributes, build workflow, and documentation to reflect the new solution file extension. Additionally, the .editorconfig file is updated to correctly recognize both solution file extensions. * Uses central package management Migrates to central package management for managing package versions. Removes version attributes from package references in project files. Adds Directory.Packages.props to define package versions centrally. Updates the target framework to net9.0. * Fix global.json Updates the .NET SDK version to 9.0.300 and sets rollForward to latestMinor. This ensures the project uses the latest minor version of the specified SDK. * Updates Dockerfiles to use .NET 9 Updates the base and build Docker images to use .NET 9.0. This ensures the application is built and run with the latest .NET runtime and SDK. * Updates package versions Updates various NuGet package versions to pick up latest features and fixes. Also, configures xunit.analyzers to be private and included as assets. * Disables specific Roslyn and Meziantou analyzers Disables CA1515 due to numerous open issues and false positives. Disables MA0165 as it suggests changes that are not always desirable. Also, simplifies the creation of checkbox options using collection expressions for conciseness. * Copies build properties files to build image Copies the Directory.Build.props and Directory.Packages.props files to the build image to ensure proper build configuration during the Docker build process. This ensures that common properties and package versions are available during the build. * Updates StyleCop Analyzers Updates to the unstable version of StyleCop Analyzers. This ensures access to the latest rules and fixes for code style analysis. * Allows 429 status code to be considered alive Updates markdown link check configuration to treat 429 status codes as alive. This change prevents false link breakage reports due to rate limiting. --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 1f48308 commit 3d00fa5

File tree

14 files changed

+83
-77
lines changed

14 files changed

+83
-77
lines changed

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@
1313
*.cs text=auto diff=csharp
1414

1515
*.csproj text=auto
16-
*.sln text=auto eol=crlf
16+
*.sln text=auto eol=crlf
17+
*.slnx text=auto eol=crlf

.github/markdown-link-check-config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
},
2323
"description": "Avoids 403s from GitHub docs"
2424
}
25-
]
25+
],
26+
"aliveStatusCodes": [429, 200]
2627
}

.github/workflows/build-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
runs-on: ${{ matrix.os }}
2828
env:
2929
SLN_DIR: GitHubIssueFormsParser
30-
SLN_FILENAME: GitHubIssueFormsParser.sln
30+
SLN_FILENAME: GitHubIssueFormsParser.slnx
3131
TEST_RESULTS_ARTIFACT_NAME: test-results
3232
CODE_COVERAGE_ARTIFACT_NAME: code-coverage-report
3333
steps:

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://hub.docker.com/_/microsoft-dotnet-runtime/ for list of tags for dotnet runtime
33
# See https://hub.docker.com/_/microsoft-dotnet-sdk for list of tags for dotnet sdk
44

5-
FROM mcr.microsoft.com/dotnet/runtime:8.0-alpine AS base
5+
FROM mcr.microsoft.com/dotnet/runtime:9.0-alpine AS base
66
# install powershell as per https://docs.microsoft.com/en-us/powershell/scripting/install/install-alpine
77
# the official docs install libssl1.1 but that started to fail and I tried ussing libssl3 which seems to work
88
ARG PWSH_VERSION=7.4.1
@@ -28,10 +28,12 @@ RUN chmod +x /opt/microsoft/powershell/7/pwsh
2828
RUN ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh
2929
# end of install powershell
3030

31-
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
31+
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
3232
WORKDIR /github-issue-forms-parser
3333
COPY ["GitHubIssueFormsParser/NuGet.Config", "GitHubIssueFormsParser/"]
3434
COPY ["GitHubIssueFormsParser/src/GitHubIssuesParserCli/GitHubIssuesParserCli.csproj", "GitHubIssueFormsParser/src/GitHubIssuesParserCli/"]
35+
COPY ["GitHubIssueFormsParser/Directory.Build.props", "GitHubIssueFormsParser/"]
36+
COPY ["GitHubIssueFormsParser/Directory.Packages.props", "GitHubIssueFormsParser/"]
3537
RUN dotnet restore "GitHubIssueFormsParser/src/GitHubIssuesParserCli/GitHubIssuesParserCli.csproj"
3638
COPY . .
3739
WORKDIR "/github-issue-forms-parser/GitHubIssueFormsParser/src/GitHubIssuesParserCli"

GitHubIssueFormsParser/.editorconfig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ trim_trailing_whitespace = true
2626
##########################################
2727

2828
# Visual Studio Solution Files
29-
[*.sln]
29+
[*.{sln,slnx}]
3030
indent_style = tab
3131

3232
# Visual Studio XML Project Files
@@ -96,6 +96,7 @@ dotnet_diagnostic.CA1303.severity = none # CA1303: Do not pass literals a
9696
dotnet_diagnostic.CA1308.severity = none # CA1308: Normalize strings to uppercase
9797
# Maintainability rules https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/maintainability-warnings
9898
dotnet_diagnostic.CA1508.severity = none # CA1508: Avoid dead conditional code # This one seems to flag false positives in some cases
99+
dotnet_diagnostic.CA1515.severity = none # CA1515: Consider making public types internal # As of writing this there are several open issues about this rule but this one seems to sum the problem https://github.com/dotnet/roslyn-analyzers/issues/7192. Other issues: https://github.com/dotnet/roslyn-analyzers/issues?q=ca1515
99100
# Naming rules https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/naming-warnings
100101
dotnet_diagnostic.CA1711.severity = none # CA1711: Identifiers should not have incorrect suffix
101102
# Reliability rules https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/reliability-warnings
@@ -399,6 +400,7 @@ dotnet_diagnostic.MA0032.severity = warning # MA0032 Use an overload with a Canc
399400
dotnet_diagnostic.MA0048.severity = none # MA0048 File name must match type name
400401
dotnet_diagnostic.MA0076.severity = none # MA0076 Do not use implicit culture-sensitive ToString in interpolated strings
401402
dotnet_diagnostic.MA0101.severity = none # MA0101 String contains an implicit end of line character
403+
dotnet_diagnostic.MA0165.severity = none # MA0165 Make interpolated string. See https://github.com/meziantou/Meziantou.Analyzer/issues/764
402404

403405
##########################################
404406
# Rules for Microsoft.VisualStudio.Threading.Analyzers

GitHubIssueFormsParser/Directory.Build.props

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,43 +41,46 @@
4141
</PropertyGroup>
4242

4343
<ItemGroup>
44-
<PackageReference Include="Meziantou.Analyzer" Version="2.0.172">
44+
<PackageReference Include="Meziantou.Analyzer">
4545
<PrivateAssets>all</PrivateAssets>
4646
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4747
</PackageReference>
48-
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.11.20">
48+
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers">
4949
<PrivateAssets>all</PrivateAssets>
5050
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
5151
</PackageReference>
52-
<PackageReference Include="Roslynator.Analyzers" Version="4.12.8">
52+
<PackageReference Include="Roslynator.Analyzers">
5353
<PrivateAssets>all</PrivateAssets>
5454
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
5555
</PackageReference>
56-
<PackageReference Include="Roslynator.CodeAnalysis.Analyzers" Version="4.12.8">
56+
<PackageReference Include="Roslynator.CodeAnalysis.Analyzers">
5757
<PrivateAssets>all</PrivateAssets>
5858
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
5959
</PackageReference>
60-
<PackageReference Include="Roslynator.Formatting.Analyzers" Version="4.12.8">
60+
<PackageReference Include="Roslynator.Formatting.Analyzers">
6161
<PrivateAssets>all</PrivateAssets>
6262
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
6363
</PackageReference>
64-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
64+
<PackageReference Include="StyleCop.Analyzers.Unstable">
6565
<PrivateAssets>all</PrivateAssets>
6666
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
6767
</PackageReference>
6868
</ItemGroup>
6969

7070
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
71-
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
71+
<PackageReference Include="coverlet.msbuild">
7272
<PrivateAssets>all</PrivateAssets>
7373
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
7474
</PackageReference>
75-
<PackageReference Include="NSubstitute" Version="5.1.0" />
76-
<PackageReference Include="Shouldly" Version="4.2.1" />
77-
<PackageReference Include="xunit.analyzers" Version="1.16.0" />
78-
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.17" />
79-
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1" />
80-
<PackageReference Include="LiquidTestReports.Custom" Version="1.0.9" />
75+
<PackageReference Include="NSubstitute" />
76+
<PackageReference Include="Shouldly" />
77+
<PackageReference Update="xunit.analyzers">
78+
<PrivateAssets>all</PrivateAssets>
79+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
80+
</PackageReference>
81+
<PackageReference Include="NSubstitute.Analyzers.CSharp" />
82+
<PackageReference Include="GitHubActionsTestLogger" />
83+
<PackageReference Include="LiquidTestReports.Custom" />
8184
</ItemGroup>
8285

8386
</Project>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<Project>
2+
<PropertyGroup>
3+
<!-- Enable central package management, https://learn.microsoft.com/en-us/nuget/consume-packages/Central-Package-Management -->
4+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
5+
</PropertyGroup>
6+
<ItemGroup>
7+
<PackageVersion Include="CliFx" Version="2.3.6" />
8+
<PackageVersion Include="SlugGenerator" Version="2.0.2" />
9+
<PackageVersion Include="YamlDotNet" Version="16.3.0" />
10+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
11+
<PackageVersion Include="xunit" Version="2.9.3" />
12+
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.0" />
13+
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
14+
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.201" />
15+
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.14.15" />
16+
<PackageVersion Include="Roslynator.Analyzers" Version="4.13.1" />
17+
<PackageVersion Include="Roslynator.CodeAnalysis.Analyzers" Version="4.13.1" />
18+
<PackageVersion Include="Roslynator.Formatting.Analyzers" Version="4.13.1" />
19+
<PackageVersion Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556" />
20+
<PackageVersion Include="coverlet.msbuild" Version="6.0.4" />
21+
<PackageVersion Include="NSubstitute" Version="5.3.0" />
22+
<PackageVersion Include="Shouldly" Version="4.3.0" />
23+
<PackageVersion Include="xunit.analyzers" Version="1.21.0" />
24+
<PackageVersion Include="NSubstitute.Analyzers.CSharp" Version="1.0.17" />
25+
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />
26+
<PackageVersion Include="LiquidTestReports.Custom" Version="1.0.9" />
27+
</ItemGroup>
28+
</Project>

GitHubIssueFormsParser/GitHubIssueFormsParser.sln

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Solution>
2+
<Folder Name="/src/">
3+
<Project Path="src/GitHubIssuesParserCli/GitHubIssuesParserCli.csproj" />
4+
</Folder>
5+
<Folder Name="/tests/">
6+
<Project Path="tests/GitHubIssuesParserCli.Tests/GitHubIssuesParserCli.Tests.csproj" />
7+
</Folder>
8+
</Solution>

GitHubIssueFormsParser/global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"sdk": {
3-
"version": "8.0.x",
4-
"rollForward": "disable",
3+
"version": "9.0.300",
4+
"rollForward": "latestMinor",
55
"allowPrerelease": false
66
}
77
}

0 commit comments

Comments
 (0)