Browse Source

Enable auto-formatting in commit-hook.

pull/2990/head
Daniel Grunwald 2 years ago
parent
commit
c2490d79ec
  1. 10
      BuildTools/pre-commit

10
BuildTools/pre-commit

@ -12,9 +12,9 @@ if [ ! -d "$DOTNET_PATH" ]; then @@ -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

Loading…
Cancel
Save