Skip to content

Commit 2333421

Browse files
committed
Update command-line tools to use .NET 8 (preview 4) and update Resharper to 2023.2.0-RC1
1 parent 143544d commit 2333421

File tree

5 files changed

+53
-7
lines changed

5 files changed

+53
-7
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"jetbrains.resharper.globaltools": {
6-
"version": "2023.1.2",
6+
"version": "2023.2.0-rc01",
77
"commands": [
88
"jb"
99
]

Build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function CheckLastExitCode {
88

99
function RunInspectCode {
1010
$outputPath = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), 'jetbrains-inspectcode-results.xml')
11-
dotnet jb inspectcode JsonApiDotNetCore.sln --no-build --output="$outputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
11+
dotnet jb inspectcode JsonApiDotNetCore.sln --no-build --output="$outputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal --dotnetcoresdk=8.0.100-preview.4.23260.5
1212
CheckLastExitCode
1313

1414
[xml]$xml = Get-Content "$outputPath"
@@ -51,7 +51,7 @@ function RunCleanupCode {
5151

5252
if ($baseCommitHash -ne $headCommitHash) {
5353
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash in pull request."
54-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff
54+
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff --jb --dotnetcoresdk=8.0.100-preview.4.23260.5
5555
CheckLastExitCode
5656
}
5757
}

Directory.Build.props.orig

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<Project>
2+
<PropertyGroup>
3+
<TargetFrameworkName>net8.0</TargetFrameworkName>
4+
<AspNetVersion>8.0.0-preview.4*</AspNetVersion>
5+
<EFCoreVersion>8.0.0-preview.4*</EFCoreVersion>
6+
<EFCorePostgresVersion>8.0.0-preview.4*</EFCorePostgresVersion>
7+
<MicrosoftCodeAnalysisVersion>4.6.*</MicrosoftCodeAnalysisVersion>
8+
<HumanizerVersion>2.14.1</HumanizerVersion>
9+
<<<<<<< HEAD
10+
<JsonApiDotNetCoreVersionPrefix>5.3.1</JsonApiDotNetCoreVersionPrefix>
11+
=======
12+
<!-- workaround "NU5104: A stable release of a package should not have a prerelease dependency." -->
13+
<JsonApiDotNetCoreVersionPrefix>5.2.1-net80</JsonApiDotNetCoreVersionPrefix>
14+
>>>>>>> f883077c (Update to .NET 8 and EF Core 8 (preview 4))
15+
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)CodingGuidelines.ruleset</CodeAnalysisRuleSet>
16+
<WarningLevel>9999</WarningLevel>
17+
<Nullable>enable</Nullable>
18+
<ImplicitUsings>enable</ImplicitUsings>
19+
<IsPackable>false</IsPackable>
20+
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
21+
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
22+
</PropertyGroup>
23+
24+
<ItemGroup>
25+
<PackageReference Include="JetBrains.Annotations" Version="2023.2.0" PrivateAssets="All" />
26+
<PackageReference Include="CSharpGuidelinesAnalyzer" Version="3.8.3" PrivateAssets="All" />
27+
<AdditionalFiles Include="$(MSBuildThisFileDirectory)CSharpGuidelinesAnalyzer.config" Visible="False" />
28+
</ItemGroup>
29+
30+
<PropertyGroup Condition="'$(Configuration)'=='Release'">
31+
<NoWarn>$(NoWarn);1591</NoWarn>
32+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
33+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
34+
</PropertyGroup>
35+
36+
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
37+
<NoWarn>$(NoWarn);AV2210</NoWarn>
38+
</PropertyGroup>
39+
40+
<!-- Test Project Dependencies -->
41+
<PropertyGroup>
42+
<CoverletVersion>6.0.*</CoverletVersion>
43+
<MoqVersion>4.18.*</MoqVersion>
44+
<TestSdkVersion>17.6.*</TestSdkVersion>
45+
</PropertyGroup>
46+
</Project>

cleanupcode.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ if ($revision) {
2828

2929
if ($baseCommitHash -eq $headCommitHash) {
3030
Write-Output "Running code cleanup on staged/unstaged files."
31-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f staged,modified
31+
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f staged,modified --jb --dotnetcoresdk=8.0.100-preview.4.23260.5
3232
VerifySuccessExitCode
3333
}
3434
else {
3535
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash, including staged/unstaged files."
36-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f staged,modified,commits -a $headCommitHash -b $baseCommitHash
36+
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN -f staged,modified,commits -a $headCommitHash -b $baseCommitHash --jb --dotnetcoresdk=8.0.100-preview.4.23260.5
3737
VerifySuccessExitCode
3838
}
3939
}
4040
else {
4141
Write-Output "Running code cleanup on all files."
42-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN
42+
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --max-runs=5 --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN --jb --dotnetcoresdk=8.0.100-preview.4.23260.5
4343
VerifySuccessExitCode
4444
}

inspectcode.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if ($LastExitCode -ne 0) {
1010

1111
$outputPath = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), 'jetbrains-inspectcode-results.xml')
1212
$resultPath = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), 'jetbrains-inspectcode-results.html')
13-
dotnet jb inspectcode JsonApiDotNetCore.sln --build --output="$outputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
13+
dotnet jb inspectcode JsonApiDotNetCore.sln --build --output="$outputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal --dotnetcoresdk=8.0.100-preview.4.23260.5
1414

1515
if ($LastExitCode -ne 0) {
1616
throw "Code inspection failed with exit code $LastExitCode"

0 commit comments

Comments
 (0)