Skip to content

Commit d4dacd4

Browse files
committed
Moved the whitespace check to its own job, adjusted build configuration.
1 parent f3463f8 commit d4dacd4

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

.github/workflows/dotnetcore.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
name: Build and Test
22
on: [push, pull_request]
33
jobs:
4+
Whitespace_Check:
5+
name: Whitespace Check
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v6
10+
- name: Setup .NET
11+
uses: actions/setup-dotnet@v5
12+
with:
13+
dotnet-version: 10
14+
dotnet-quality: ga
15+
- name: Restore Dependencies
16+
run: dotnet restore
17+
- name: Whitespace Check
18+
run: dotnet format whitespace --verify-no-changes --no-restore
419
Build_and_Test:
520
strategy:
621
matrix:
@@ -18,13 +33,7 @@ jobs:
1833
dotnet-quality: ga
1934
- name: Restore Dependencies
2035
run: dotnet restore
21-
# `dotnet format` runs the full formatter pipeline (whitespace + style + analyzers)
22-
# which catches a few IDE-prefixed rules, notably IDE0055 (Fix formatting), that
23-
# `dotnet build` skips even with EnforceCodeStyleInBuild=true. This step keeps CI
24-
# parity with what Visual Studio's IDE-side analysis flags.
25-
- name: Format Check
26-
run: dotnet format --verify-no-changes --no-restore
2736
- name: Build
28-
run: dotnet build --configuration ${{ matrix.configuration }} --no-restore -p:EnforceCodeStyleInBuild=false
37+
run: dotnet build --configuration ${{ matrix.configuration }} --no-restore
2938
- name: Test
3039
run: dotnet test --configuration ${{ matrix.configuration }} --no-build --nologo

0 commit comments

Comments
 (0)