Pattern: Use of elseif
/elsif
Issue: -
You appear to be using elseif
or elsif
as a keyword. This is not valid.
sh
instead uses elif
as its alternative branch keyword.
Example of incorrect code:
if false
then
echo "hi"
elseif true
then
echo "ho"
fi
Example of correct code:
if false
then
echo "hi"
elif true
then
echo "ho"
fi
If you have made your own function called elseif
and intend to call it, you can ignore this message.