Skip to content

Commit

Permalink
Use dotnet-format
Browse files Browse the repository at this point in the history
  - Due to dotnet/sdk#23972 and dotnet/format#1519, i'm going to start using the `dotnet-format` tool instead of the version integrated into the SDK.
  • Loading branch information
craigktreasure committed Mar 11, 2022
1 parent 2a2252f commit 5b68d34
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
"commands": [
"nbgv"
]
},
"dotnet-format": {
"version": "6.3.315103",
"commands": [
"dotnet-format"
]
}
}
}
5 changes: 4 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ jobs:
- name: Install dependencies
run: dotnet restore

- name: Install .NET tools
run: dotnet tool restore

- name: DotNet Format
run: dotnet format --no-restore --verify-no-changes
run: dotnet dotnet-format --no-restore --verify-no-changes

- name: Build
run: dotnet build --configuration Release --no-restore
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ jobs:
- name: Install dependencies
run: dotnet restore

- name: Install .NET tools
run: dotnet tool restore

- name: DotNet Format
run: dotnet format --no-restore --verify-no-changes
run: dotnet dotnet-format --no-restore --verify-no-changes

- name: Build
run: dotnet build --configuration Release --no-restore
Expand Down
9 changes: 9 additions & 0 deletions nuget.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,14 @@
<packageSources>
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet6" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json" />
</packageSources>
<packageSourceMapping>
<packageSource key="nuget">
<package pattern="*" />
</packageSource>
<packageSource key="dotnet6">
<package pattern="dotnet-format" />
</packageSource>
</packageSourceMapping>
</configuration>

0 comments on commit 5b68d34

Please sign in to comment.