Skip to content

Commit f0461ae

Browse files
author
Bart Koelman
committed
Fix code cleanup (#1107)
* Disable GlobalPerProduct setting layer in cleanupcode/inspectcode * Temporary code change to verify cleanupcode still fails in cibuild * Revert "Temporary code change to verify cleanupcode still fails in cibuild" This reverts commit 037b58f. * Adapted to latest version of ReGitLint
1 parent cbe94a8 commit f0461ae

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.config/dotnet-tools.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
]
1010
},
1111
"regitlint": {
12-
"version": "2.1.4",
12+
"version": "6.0.6",
1313
"commands": [
1414
"regitlint"
1515
]

Build.ps1

+2-2
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=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
1212
CheckLastExitCode
1313

1414
[xml]$xml = Get-Content "$outputPath"
@@ -47,7 +47,7 @@ function RunCleanupCode {
4747
$mergeCommitHash = git rev-parse "HEAD"
4848
$targetCommitHash = git rev-parse "$env:APPVEYOR_REPO_BRANCH"
4949

50-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --jb --profile --jb --profile='\"JADNC Full Cleanup\"' --jb --properties:Configuration=Release --jb --verbosity=WARN -f commits -a $mergeCommitHash -b $targetCommitHash --fail-on-diff --print-diff
50+
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --disable-jb-path-hack --jb --profile='\"JADNC Full Cleanup\"' --jb --properties:Configuration=Release --jb --verbosity=WARN -f commits -a $mergeCommitHash -b $targetCommitHash --fail-on-diff --print-diff
5151
CheckLastExitCode
5252
}
5353
}

cleanupcode.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ if ($LASTEXITCODE -ne 0) {
1414
throw "Package restore failed with exit code $LASTEXITCODE"
1515
}
1616

17-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --jb --profile --jb --profile='\"JADNC Full Cleanup\"' --jb --properties:Configuration=Release --jb --verbosity=WARN
17+
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --disable-jb-path-hack --jb --profile='\"JADNC Full Cleanup\"' --jb --properties:Configuration=Release --jb --verbosity=WARN

inspectcode.ps1

+1-1
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=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
1414

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

0 commit comments

Comments
 (0)