diff --git a/sanityCheck.sh b/sanityCheck.sh index 500558d0cfb2486b91921873687c2d1525039ba2..e6de353a4457cf41f5b6dd6e41ff2f16b7edd95b 100755 --- a/sanityCheck.sh +++ b/sanityCheck.sh @@ -50,7 +50,7 @@ $GREP "<<else >\?[^>]" -- 'src/*' | myprint "ShouldBeElseIf" # Check, e.g., =to $GREP "=to" -- 'src/*' | myprint "EqualAndTo" # Check doing $slaves.foo instead of $slaves[i].foo -$GREP -e "[$]slaves[.]" --and --not -e '[$]slaves[.]\(length\|random\|map\|filter\|deleteAt\|push\|find\|includes\|delete\|forEach\)' -- 'src/*' | myprint "MissingSlavesIndex" +$GREP -e "[$]slaves[.]" --and --not -e '[$]slaves[.]\(length\|random\|map\|filter\|deleteAt\|push\|find\|includes\|delete\|forEach\|some\|reduce\|splice\)' -- 'src/*' | myprint "MissingSlavesIndex" # Try to check for accidentally mixing slaves[] and activeSlave. This can have a lot of false matches, but has caught a lot of bugs so it's worth the pain $GREP -e "activeSlave[.]" --and -e "slaves\[..\?\][.]" --and --not -e '[.]ID' --and --not -e 'slaves\[..\?\][.]\(slaveName\|slaveSurname\|actualAge\|relation\|assignment\|age\|devotion\|trust\|vagina\|mother\|father\|training\)' -- 'src/*' | myprint "MaybeAccidentalMixingOfSlavesAndActiveSlave" # Check, e.g. <<set foo == 4>>