Skip to content

Commit f83612c

Browse files
sinimaryamhonari
authored andcommitted
Update dotnet-format to address breaking changes introduced by upstream changes (#5528)
Pre-commit is using a version of dotnet and dotnet-format and has picked up a newer version of the utility that is not compatible with .NET 3.1 or 5.x -- it installs it's packages using dotnet tool install. This version's default entrypoint is also incompatible with our project structure, as the style and analyzer subcommands are now run by default and do not support the --folder option. The entrypoint can be over-ridden to specify the whitespace module, which should match previous behavior.
1 parent ebb2697 commit f83612c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/pre-commit.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ jobs:
1818
ruby-version: '2.6'
1919
- uses: actions/setup-dotnet@v1
2020
with:
21-
dotnet-version: '3.1.x'
21+
dotnet-version: '6.0.x'
22+
include-prerelease: true
2223
- uses: pre-commit/action@v2.0.0
2324

2425
markdown-link-check:

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,10 @@ repos:
8484
exclude: ".*localized.*"
8585

8686
- repo: https://github.com/dotnet/format
87-
rev: "7e343070a0355c86f72bdee226b5e19ffcbac931" # TODO - update to a tagged version when one that includes the hook is ready.
87+
rev: v5.1.225507
8888
hooks:
8989
- id: dotnet-format
90+
entry: dotnet-format whitespace
9091
args: [--folder, --include]
9192

9293
# "Local" hooks, see https://pre-commit.com/#repository-local-hooks

0 commit comments

Comments
 (0)