Skip to content
Snippets Groups Projects
Commit 13ddf545 authored by Stuffed's avatar Stuffed
Browse files

Add check for <<set foo == 4>>

parent 53627497
No related branches found
No related tags found
4 merge requests!843Delete Please.,!833Pregmod master,!758Pregmod master,!189Fix family tree when activeSlave is YOU, and you have no family
...@@ -21,7 +21,7 @@ GREP="git grep -n --color" ...@@ -21,7 +21,7 @@ GREP="git grep -n --color"
$GREP "<</[^>]*>[^>]" -- 'src/*' | myprint "MissingClosingAngleBracket" $GREP "<</[^>]*>[^>]" -- 'src/*' | myprint "MissingClosingAngleBracket"
$GREP "<<[^>()]*>[^()<>"$'\r]*\r'"\?$" -- 'src/*' | myprint "MissingClosingAngleBracket" $GREP "<<[^>()]*>[^()<>"$'\r]*\r'"\?$" -- 'src/*' | myprint "MissingClosingAngleBracket"
# Check for missing left angle bracket: </if>> # Check for missing left angle bracket: </if>>
$GREP "[^<]</[^<>]*>>" -- 'src/*' | myprint "MissingOpeningAngleBracket2" $GREP "\([^<]\|^\)</\?\(if\|else\|case\)" -- 'src/*' | myprint "MissingOpeningAngleBracket2"
# Check for accidental assignment. e.g.: <<if $foo = "hello">> # Check for accidental assignment. e.g.: <<if $foo = "hello">>
$GREP "<<[ ]*if[^>=]*[^><\!=]=[^=][^>]*>>" -- 'src/*' | myprint "AccidentalAssignmentInIf" $GREP "<<[ ]*if[^>=]*[^><\!=]=[^=][^>]*>>" -- 'src/*' | myprint "AccidentalAssignmentInIf"
# Check for missing ". e.g.: <<if $foo = "hello>> # Check for missing ". e.g.: <<if $foo = "hello>>
...@@ -63,6 +63,8 @@ $GREP "=to" -- 'src/*' | myprint "EqualAndTo" ...@@ -63,6 +63,8 @@ $GREP "=to" -- 'src/*' | myprint "EqualAndTo"
$GREP -e "[$]slaves[.]" --and --not -e '[$]slaves[.]\(length\|random\|map\|filter\|deleteAt\|push\)' -- 'src/*' | myprint "MissingSlavesIndex" $GREP -e "[$]slaves[.]" --and --not -e '[$]slaves[.]\(length\|random\|map\|filter\|deleteAt\|push\)' -- '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 # 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\|actualAge\|relation\|assignment\|age\|devotion\|trust\|vagina\)' -- 'src/*' | myprint "MaybeAccidentalMixingOfSlavesAndActiveSlave" $GREP -e "activeSlave[.]" --and -e "slaves\[..\?\][.]" --and --not -e '[.]ID' --and --not -e 'slaves\[..\?\][.]\(slaveName\|actualAge\|relation\|assignment\|age\|devotion\|trust\|vagina\)' -- 'src/*' | myprint "MaybeAccidentalMixingOfSlavesAndActiveSlave"
# Check, e.g. <<set foo == 4>>
$GREP "<<set[^{>=]*==" -- 'src/*' | myprint "DoubleEqualsInSet"
# Check that we do not have any variables that we use only once. e.g. $onlyUsedOnce # Check that we do not have any variables that we use only once. e.g. $onlyUsedOnce
( (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment