Created
December 23, 2015 05:33
-
-
Save DanielHeath/b51088b76a38087a7804 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "${BOLD}Checking for missing @flow comments${END}" | |
HAVE_FLOW=true | |
for file in $( git ls-files '**/*.js' ); do | |
if [ -e "$file" ] ; then | |
read flowtype < "$file" | |
if test "x$flowtype" = 'x/* flow:disable */'; then | |
echo "Skipping disabled file $file" > /dev/null | |
elif test "x$flowtype" != 'x/* @flow */'; then | |
HAVE_FLOW=false | |
cat << EOF | |
$file is not annotated for flowtype (must be the first line)! - got "$flowtype" | |
EOF | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment