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

Check for using else with a conditional

parent b4f57dcf
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,8 @@ ENDC='\033[0m' ...@@ -11,7 +11,8 @@ ENDC='\033[0m'
myprint() { myprint() {
while read data; do while read data; do
echo -e "[$1]$WARNING" $data echo -n -e "[$1]$WARNING"
echo "$data"
done done
} }
...@@ -53,6 +54,8 @@ $GREP "\$slaves\[\$i\]\. " -- 'src/*' | myprint "MissingPropertyAfterSlaves" ...@@ -53,6 +54,8 @@ $GREP "\$slaves\[\$i\]\. " -- 'src/*' | myprint "MissingPropertyAfterSlaves"
$GREP "\$PC.refreshmentType[^ =]" -- 'src/*' | myprint "ShouldBeRefreshment" $GREP "\$PC.refreshmentType[^ =]" -- 'src/*' | myprint "ShouldBeRefreshment"
# Check, e.g., <<//if>> # Check, e.g., <<//if>>
$GREP "<</[a-zA-Z]*[^a-zA-Z<>]\+[a-zA-Z]*>>" -- 'src/*' | myprint "DoubleSlash" $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 # Check, e.g., =to
$GREP "=to" -- 'src/*' | myprint "EqualAndTo" $GREP "=to" -- 'src/*' | myprint "EqualAndTo"
# Check doing $slaves.foo instead of $slaves[i].foo # Check doing $slaves.foo instead of $slaves[i].foo
......
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