Updated SC1048 (markdown)

Ashay Humane
2017-07-09 21:43:39 -07:00
parent b6e8b23fbf
commit 9135679dcd

@@ -8,9 +8,7 @@ then
# TODO: handle this # TODO: handle this
fi fi
``` ```
### Correct code: ### Correct code:
```sh ```sh
if [ -e foo ] if [ -e foo ]
then then
@@ -19,14 +17,13 @@ then
fi fi
# Or use the no-op colon operator ":" # Or use the no-op colon operator ":"
```sh
if [ -e foo ] if [ -e foo ]
then then
# TODO: handle this # TODO: handle this
: :
fi fi
``` ```
```
### Rationale: ### Rationale:
Shells do not allow empty `then` clauses. They need at least one command (and comments are not commands). Shells do not allow empty `then` clauses. They need at least one command (and comments are not commands).