Skip to content

Commit 93c082c

Browse files
committed
Fix leading whitespace
1 parent 9bdcf33 commit 93c082c

File tree

1 file changed

+81
-81
lines changed

1 file changed

+81
-81
lines changed

.github/workflows/build.yml

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -146,93 +146,93 @@ jobs:
146146
path: docs/_site
147147

148148
inspect-code:
149-
timeout-minutes: 60
150-
strategy:
151-
fail-fast: false
152-
matrix:
153-
os: [ubuntu-latest, windows-latest, macos-latest]
154-
runs-on: ${{ matrix.os }}
155-
steps:
156-
- name: Git checkout
157-
uses: actions/checkout@v3
158-
- name: Setup .NET
159-
uses: actions/setup-dotnet@v3
160-
with:
161-
dotnet-version: 6.0.x
162-
- name: Restore tools
163-
run: |
164-
dotnet tool restore
165-
- name: InspectCode
166-
shell: pwsh
167-
run: |
168-
$inspectCodeOutputPath = Join-Path $env:RUNNER_TEMP 'jetbrains-inspectcode-results.xml'
169-
Write-Output "INSPECT_CODE_OUTPUT_PATH=$inspectCodeOutputPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
170-
dotnet jb inspectcode JsonApiDotNetCore.sln --build --output="$inspectCodeOutputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --properties:ContinuousIntegrationBuild=false --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
171-
- name: Verify outcome
172-
shell: pwsh
173-
run: |
174-
[xml]$xml = Get-Content $env:INSPECT_CODE_OUTPUT_PATH
175-
if ($xml.report.Issues -and $xml.report.Issues.Project) {
176-
foreach ($project in $xml.report.Issues.Project) {
177-
if ($project.Issue.Count -gt 0) {
178-
$project.ForEach({
179-
Write-Output "`nProject $($project.Name)"
180-
$failed = $true
149+
timeout-minutes: 60
150+
strategy:
151+
fail-fast: false
152+
matrix:
153+
os: [ubuntu-latest, windows-latest, macos-latest]
154+
runs-on: ${{ matrix.os }}
155+
steps:
156+
- name: Git checkout
157+
uses: actions/checkout@v3
158+
- name: Setup .NET
159+
uses: actions/setup-dotnet@v3
160+
with:
161+
dotnet-version: 6.0.x
162+
- name: Restore tools
163+
run: |
164+
dotnet tool restore
165+
- name: InspectCode
166+
shell: pwsh
167+
run: |
168+
$inspectCodeOutputPath = Join-Path $env:RUNNER_TEMP 'jetbrains-inspectcode-results.xml'
169+
Write-Output "INSPECT_CODE_OUTPUT_PATH=$inspectCodeOutputPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
170+
dotnet jb inspectcode JsonApiDotNetCore.sln --build --output="$inspectCodeOutputPath" --profile=WarningSeverities.DotSettings --properties:Configuration=Release --properties:ContinuousIntegrationBuild=false --severity=WARNING --verbosity=WARN -dsl=GlobalAll -dsl=GlobalPerProduct -dsl=SolutionPersonal -dsl=ProjectPersonal
171+
- name: Verify outcome
172+
shell: pwsh
173+
run: |
174+
[xml]$xml = Get-Content $env:INSPECT_CODE_OUTPUT_PATH
175+
if ($xml.report.Issues -and $xml.report.Issues.Project) {
176+
foreach ($project in $xml.report.Issues.Project) {
177+
if ($project.Issue.Count -gt 0) {
178+
$project.ForEach({
179+
Write-Output "`nProject $($project.Name)"
180+
$failed = $true
181181
182-
$_.Issue.ForEach({
183-
$issueType = $xml.report.IssueTypes.SelectSingleNode("IssueType[@Id='$($_.TypeId)']")
184-
$severity = $_.Severity ?? $issueType.Severity
182+
$_.Issue.ForEach({
183+
$issueType = $xml.report.IssueTypes.SelectSingleNode("IssueType[@Id='$($_.TypeId)']")
184+
$severity = $_.Severity ?? $issueType.Severity
185185
186-
Write-Output "[$severity] $($_.File):$($_.Line) $($_.TypeId): $($_.Message)"
187-
})
188-
})
189-
}
190-
}
186+
Write-Output "[$severity] $($_.File):$($_.Line) $($_.TypeId): $($_.Message)"
187+
})
188+
})
189+
}
190+
}
191191
192-
if ($failed) {
193-
Write-Error "One or more projects failed code inspection."
194-
}
195-
}
192+
if ($failed) {
193+
Write-Error "One or more projects failed code inspection."
194+
}
195+
}
196196
197197
cleanup-code:
198-
timeout-minutes: 60
199-
strategy:
200-
fail-fast: false
201-
matrix:
202-
os: [ubuntu-latest, windows-latest, macos-latest]
203-
runs-on: ${{ matrix.os }}
204-
steps:
205-
- name: Git checkout
206-
uses: actions/checkout@v3
207-
with:
208-
fetch-depth: 2
209-
- name: Setup .NET
210-
uses: actions/setup-dotnet@v3
211-
with:
212-
dotnet-version: 6.0.x
213-
- name: Restore tools
214-
run: |
215-
dotnet tool restore
216-
- name: Restore packages
217-
run: |
218-
dotnet restore
219-
- name: CleanupCode (on PR diff)
220-
if: github.event_name == 'pull_request'
221-
shell: pwsh
222-
run: |
223-
# Not using the environment variables for SHAs, because they may be outdated. This may happen on force-push after the build is queued, but before it starts.
224-
# The below works because HEAD is detached (at the merge commit), so HEAD~1 is at the base branch. When a PR contains no commits, this job will not run.
225-
$headCommitHash = git rev-parse HEAD
226-
$baseCommitHash = git rev-parse HEAD~1
198+
timeout-minutes: 60
199+
strategy:
200+
fail-fast: false
201+
matrix:
202+
os: [ubuntu-latest, windows-latest, macos-latest]
203+
runs-on: ${{ matrix.os }}
204+
steps:
205+
- name: Git checkout
206+
uses: actions/checkout@v3
207+
with:
208+
fetch-depth: 2
209+
- name: Setup .NET
210+
uses: actions/setup-dotnet@v3
211+
with:
212+
dotnet-version: 6.0.x
213+
- name: Restore tools
214+
run: |
215+
dotnet tool restore
216+
- name: Restore packages
217+
run: |
218+
dotnet restore
219+
- name: CleanupCode (on PR diff)
220+
if: github.event_name == 'pull_request'
221+
shell: pwsh
222+
run: |
223+
# Not using the environment variables for SHAs, because they may be outdated. This may happen on force-push after the build is queued, but before it starts.
224+
# The below works because HEAD is detached (at the merge commit), so HEAD~1 is at the base branch. When a PR contains no commits, this job will not run.
225+
$headCommitHash = git rev-parse HEAD
226+
$baseCommitHash = git rev-parse HEAD~1
227227
228-
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash in pull request."
229-
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
230-
- name: CleanupCode (on branch)
231-
if: github.event_name == 'push'
232-
shell: pwsh
233-
run: |
234-
Write-Output "Running code cleanup on all files."
235-
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN --fail-on-diff --print-diff
228+
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash in pull request."
229+
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
230+
- name: CleanupCode (on branch)
231+
if: github.event_name == 'push'
232+
shell: pwsh
233+
run: |
234+
Write-Output "Running code cleanup on all files."
235+
dotnet regitlint -s JsonApiDotNetCore.sln --print-command --skip-tool-check --jb-profile="JADNC Full Cleanup" --jb --properties:Configuration=Release --jb --verbosity=WARN --fail-on-diff --print-diff
236236
237237
publish:
238238
timeout-minutes: 60

0 commit comments

Comments
 (0)