Skip to content

Commit

Permalink
Enable auto-formatting in commit-hook.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrunwald committed May 28, 2023
1 parent aea2c50 commit c2490d7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions BuildTools/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ if [ ! -d "$DOTNET_PATH" ]; then
fi

"$DOTNET_PATH/dotnet-format.exe" --version
#if git diff --quiet --ignore-submodules; then
# "$DOTNET_PATH/dotnet-format.exe" whitespace --no-restore --verbosity detailed ILSpy.sln
# git add -u -- \*\*.cs
#else
if git diff --quiet --ignore-submodules; then
"$DOTNET_PATH/dotnet-format.exe" whitespace --no-restore --verbosity detailed ILSpy.sln
git add -u -- \*\*.cs
else
exec "$DOTNET_PATH/dotnet-format.exe" whitespace --verify-no-changes --no-restore --verbosity detailed ILSpy.sln
#fi
fi

0 comments on commit c2490d7

Please sign in to comment.