Skip to content

Commit

Permalink
Update dotnet-format to address breaking changes introduced by upstre…
Browse files Browse the repository at this point in the history
…am 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.
  • Loading branch information
sini authored Sep 2, 2021
1 parent 1b08dad commit 7603fb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
ruby-version: '2.6'
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
dotnet-version: '6.0.x'
include-prerelease: true
- uses: pre-commit/action@v2.0.0

markdown-link-check:
Expand Down
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ repos:
exclude: ".*localized.*"

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

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

0 comments on commit 7603fb7

Please sign in to comment.