Skip to content
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
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
$inspectCodeOutputPath = Join-Path $env:RUNNER_TEMP 'jetbrains-inspectcode-results.xml'
Write-Output "INSPECT_CODE_OUTPUT_PATH=$inspectCodeOutputPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
dotnet jb inspectcode --version
dotnet jb inspectcode $env:SOLUTION_FILE --build --no-updates --dotnetcoresdk=$(dotnet --version) --output="$inspectCodeOutputPath" --format="xml" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --properties:ContinuousIntegrationBuild=false --properties:RunAnalyzers=false --properties:NuGetAudit=false --severity=WARNING --verbosity=WARN --disable-settings-layers=GlobalAll --disable-settings-layers=GlobalPerProduct --disable-settings-layers=SolutionPersonal --disable-settings-layers=ProjectPersonal
dotnet jb inspectcode $env:SOLUTION_FILE --build --no-updates --dotnetcoresdk=$(dotnet --version) --output="$inspectCodeOutputPath" --format="xml" --settings=WarningSeverities.DotSettings --properties:"Configuration=Release;RunAnalyzers=false;NuGetAudit=false;ContinuousIntegrationBuild=false" --severity=WARNING --verbosity=WARN --disable-settings-layers="GlobalAll;GlobalPerProduct;SolutionPersonal;ProjectPersonal"
- name: Upload output to artifacts
uses: actions/upload-artifact@v5
with:
Expand Down Expand Up @@ -251,14 +251,14 @@ jobs:
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash in pull request."
dotnet jb cleanupcode --version
dotnet regitlint -s $env:SOLUTION_FILE --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --no-updates --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --properties:NuGetAudit=false --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff
dotnet regitlint -s $env:SOLUTION_FILE --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --no-updates --jb --properties:"Configuration=Release;RunAnalyzers=false;NuGetAudit=false" --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff
- name: CleanupCode (on branch)
if: ${{ github.event_name == 'push' || github.event_name == 'release' || github.event_name == 'workflow_dispatch' }}
shell: pwsh
run: |
Write-Output 'Running code cleanup on all files.'
dotnet jb cleanupcode --version
dotnet regitlint -s $env:SOLUTION_FILE --print-command --skip-tool-check --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --no-updates --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --properties:NuGetAudit=false --jb --verbosity=WARN --fail-on-diff --print-diff
dotnet regitlint -s $env:SOLUTION_FILE --print-command --skip-tool-check --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --no-updates --jb --properties:"Configuration=Release;RunAnalyzers=false;NuGetAudit=false" --jb --verbosity=WARN --fail-on-diff --print-diff
publish:
timeout-minutes: 60
Expand Down
6 changes: 3 additions & 3 deletions cleanupcode.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ if ($revision) {
if ($baseCommitHash -eq $headCommitHash) {
Write-Output "Running code cleanup on staged/unstaged files."
dotnet jb cleanupcode --version
dotnet regitlint -s $solutionFile --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --no-updates --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --properties:NuGetAudit=false --jb --verbosity=WARN -f staged,modified
dotnet regitlint -s $solutionFile --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --no-updates --jb --properties:"Configuration=Release;RunAnalyzers=false;NuGetAudit=false" --jb --verbosity=WARN -f staged,modified
}
else {
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash, including staged/unstaged files."
dotnet jb cleanupcode --version
dotnet regitlint -s $solutionFile --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --no-updates --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --properties:NuGetAudit=false --jb --verbosity=WARN -f staged,modified,commits -a $headCommitHash -b $baseCommitHash
dotnet regitlint -s $solutionFile --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --no-updates --jb --properties:"Configuration=Release;RunAnalyzers=false;NuGetAudit=false" --jb --verbosity=WARN -f staged,modified,commits -a $headCommitHash -b $baseCommitHash
}
}
else {
Write-Output "Running code cleanup on all files."
dotnet jb cleanupcode --version
dotnet regitlint -s $solutionFile --print-command --skip-tool-check --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --no-updates --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --properties:NuGetAudit=false --jb --verbosity=WARN
dotnet regitlint -s $solutionFile --print-command --skip-tool-check --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="JADNC Full Cleanup" --jb --no-updates --jb --properties:"Configuration=Release;RunAnalyzers=false;NuGetAudit=false" --jb --verbosity=WARN
}
2 changes: 1 addition & 1 deletion inspectcode.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $outputPath = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), 'jetbra
$resultPath = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), 'jetbrains-inspectcode-results.html')

dotnet jb inspectcode --version
dotnet jb inspectcode $solutionFile --build --no-updates --dotnetcoresdk=$(dotnet --version) --output="$outputPath" --format="xml" --settings=WarningSeverities.DotSettings --properties:Configuration=Release --properties:RunAnalyzers=false --properties:NuGetAudit=false --severity=WARNING --verbosity=WARN --disable-settings-layers=GlobalAll --disable-settings-layers=GlobalPerProduct --disable-settings-layers=SolutionPersonal --disable-settings-layers=ProjectPersonal
dotnet jb inspectcode $solutionFile --build --no-updates --dotnetcoresdk=$(dotnet --version) --output="$outputPath" --format="xml" --settings=WarningSeverities.DotSettings --properties:"Configuration=Release;RunAnalyzers=false;NuGetAudit=false" --severity=WARNING --verbosity=WARN --disable-settings-layers="GlobalAll;GlobalPerProduct;SolutionPersonal;ProjectPersonal"

[xml]$xml = Get-Content "$outputPath"
if ($xml.report.Issues -and $xml.report.Issues.Project) {
Expand Down