Skip to content

Commit

Permalink
hook: remove clang-format check
Browse files Browse the repository at this point in the history
  • Loading branch information
wwylele committed Feb 17, 2017
1 parent c7c1f56 commit fa5bd0a
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,3 @@ If you know what you are doing, you can try 'git commit --no-verify' to bypass t
END
exit 1
fi

for f in $(git diff --name-only --diff-filter=ACMRTUXB --cached); do
if ! echo "$f" | egrep -q "[.](cpp|h)$"; then
continue
fi
if ! echo "$f" | egrep -q "^src/"; then
continue
fi
d=$(clang-format "$f" | diff -u "$f" -)
if ! [ -z "$d" ]; then
echo "!!! $f not compliant to coding style, here is the fix:"
echo "$d"
fail=1
fi
done

exit "${fail-0}"

0 comments on commit fa5bd0a

Please sign in to comment.