precommit: check trailing space in java sources too

Change-Id: I85820763b6c1075f5c8ff5d793b082bd11181931
This commit is contained in:
mpl 2013-02-25 19:28:06 +01:00
parent c67b53465a
commit 6e5ee35085
1 changed files with 4 additions and 0 deletions

View File

@ -21,6 +21,7 @@ committed=`git diff-index --cached --name-only HEAD`
for c in $committed
do
gofile=`echo $c | grep -E '.*\.go$'`
javafile=`echo $c | grep -E '.*\.java$'`
if [ -n "$gofile" ]
then
fmtdiff=`gofmt -d $c 2>&1`
@ -29,6 +30,9 @@ do
echo "gofmt needed on "$c
exitstatus=1
fi
fi
if [ -n "$gofile" -o -n "$javafile" ]
then
trailspace=`git diff-index --cached --check HEAD $c | grep 'trailing whitespace'`
if [ -n "$trailspace" ]
then