Skip to content
Snippets Groups Projects
Commit 4c4a3058 authored by Nick Kralevich's avatar Nick Kralevich Committed by android-build-merger
Browse files

Merge "Block files without trailing newlines"

am: 9f1e2b53

Change-Id: I3776436edf8a24db6e2de60fd257295072997eac
parents e07f6634 9f1e2b53
Branches
Tags
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.
Please register or to comment