Skip to content

Commit 63b933c

Browse files
askpttoddbaert
authored andcommitted
ci: Change dotnet formatter (open-feature#260)
<!-- Please use this template for your pull request. --> <!-- Please use the sections that you need and delete other sections --> ## This PR <!-- add the description of the PR here --> - This PR changes the code formatter we currently use to the new built-in in the SDK. See https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-format ### Notes - We should now use this tool since it is now shipped as part of the dotnet SDK, removing the need to install an external one. - As pointed out in the chat, this build runs in parallel and is relatively fast. I will enable all PRs instead of those focusing on changes to .cs files. --------- Signed-off-by: André Silva <[email protected]> Co-authored-by: Todd Baert <[email protected]> Signed-off-by: Artyom Tonoyan <[email protected]>
1 parent ad3fccd commit 63b933c

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

.github/workflows/dotnet-format.yml

+10-17
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,22 @@ name: dotnet format
22

33
on:
44
push:
5-
branches: [ main ]
6-
paths:
7-
- '**.cs'
8-
- '.editorconfig'
5+
branches: [main]
96
pull_request:
10-
branches: [ main ]
11-
paths:
12-
- '**.cs'
13-
- '.editorconfig'
7+
branches: [main]
148

159
jobs:
1610
check-format:
1711
runs-on: ubuntu-latest
1812

1913
steps:
20-
- name: Check out code
21-
uses: actions/checkout@v4
14+
- name: Check out code
15+
uses: actions/checkout@v4
2216

23-
- name: Setup .NET SDK
24-
uses: actions/setup-dotnet@v4
17+
- name: Setup .NET SDK
18+
uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: 8.0.x
2521

26-
- name: Install format tool
27-
run: dotnet tool install -g dotnet-format
28-
29-
- name: dotnet format
30-
run: dotnet-format --folder --check
22+
- name: dotnet format
23+
run: dotnet format --verify-no-changes OpenFeature.sln

0 commit comments

Comments
 (0)