1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 16:42:50 -05:00

Add git hook for formating (#2224)

This commit is contained in:
Oscar Hinton
2022-09-08 10:27:17 +02:00
committed by GitHub
parent 5ecf7b9440
commit b612426782
2 changed files with 12 additions and 8 deletions

8
.git-hooks/pre-commit Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
FILES=$(git diff --cached --name-only --diff-filter=ACM "*.cs")
if [ -n "$FILES" ]
then
dotnet format ./bitwarden-server.sln --no-restore --include $FILES
echo "$FILES" | xargs git add
fi