Skip to content
Snippets Groups Projects
Commit 9f1e2b53 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Block files without trailing newlines"

parents cd55e8ef 16b7f0a1
No related branches found
No related tags found
No related merge requests found
[Hook Scripts]
whitespace = tools/whitespace.sh ${PREUPLOAD_FILES}
#!/bin/bash
RESULT=0
for i in "$@"; do
a="`tail -c 1 "$i"`"
if [ "$a" != "" ]; then
echo "$i does not have a trailing newline" 1>&2
RESULT=-1
fi
done
exit $RESULT
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment