From bdf9d063d6de63c97d965eaed368a5261b1d0737 Mon Sep 17 00:00:00 2001 From: Stuffed <stuffedgames@gmail.com> Date: Wed, 3 May 2017 15:54:01 +0900 Subject: [PATCH] Check for using else with a conditional --- sanityCheck | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sanityCheck b/sanityCheck index d00bf7319e6..8126908d564 100755 --- a/sanityCheck +++ b/sanityCheck @@ -11,7 +11,8 @@ ENDC='\033[0m' myprint() { while read data; do - echo -e "[$1]$WARNING" $data + echo -n -e "[$1]$WARNING" + echo "$data" done } @@ -53,6 +54,8 @@ $GREP "\$slaves\[\$i\]\. " -- 'src/*' | myprint "MissingPropertyAfterSlaves" $GREP "\$PC.refreshmentType[^ =]" -- 'src/*' | myprint "ShouldBeRefreshment" # Check, e.g., <<//if>> $GREP "<</[a-zA-Z]*[^a-zA-Z<>]\+[a-zA-Z]*>>" -- 'src/*' | myprint "DoubleSlash" +# Check, e.g. <<else $foo==4 +$GREP "<<else >\?[^>]" -- 'src/*' | myprint "ShouldBeElseIf" # Check, e.g., =to $GREP "=to" -- 'src/*' | myprint "EqualAndTo" # Check doing $slaves.foo instead of $slaves[i].foo -- GitLab