Skip to content

Files

Latest commit

 

History

History
25 lines (15 loc) · 505 Bytes

SC1053.md

File metadata and controls

25 lines (15 loc) · 505 Bytes

Pattern: Use of ; after else

Issue: -

Description

else keywords should not be followed by semicolons. It's not valid shell syntax.

You can follow them directly with a line break or another command.

Example of incorrect code:

if somecommand; then echo "True"; else; echo "False"; fi

Example of correct code:

if somecommand; then echo "True"; else echo "False"; fi

Further Reading