1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
#!/usr/bin/env bash
# Check that Scala files only exist in the scala test dir and
# that java files do not reside in the scala test dir
if `find src | grep -v '^src/test/scala' | grep -q '\.scala$' ` ; then
echo 'Found scala file(s) outside of scala test directory';
find src | grep -v '^src/test/scala' | grep '\.scala$'
exit 1;
fi
if `find src/test/scala | grep -q '\.java$' ` ; then
echo 'Found java file(s) in scala test directory';
find src/test/scala | grep '\.java$'
exit 1;
fi
|