mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Created SC1109 (markdown)
25
SC1109.md
Normal file
25
SC1109.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
## This is an unquoted HTML entity. Replace with corresponding character.
|
||||||
|
|
||||||
|
### Problematic code:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
foo && bar
|
||||||
|
```
|
||||||
|
|
||||||
|
### Correct code:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
foo && bar
|
||||||
|
```
|
||||||
|
|
||||||
|
### Rationale:
|
||||||
|
|
||||||
|
There is an unquoted HTML entity, such as `&`, `>` or `<` (instead of `&`, `>` and `<`) in your code. This usually happens when copy-pasting from a web site that has mismanaged its code formatting.
|
||||||
|
|
||||||
|
You should go through the entire script and replace HTML entities with their corresponding characters.
|
||||||
|
|
||||||
|
Don't rely on ShellCheck to detect all of them. ShellCheck only warns about certain cases in certain contexts, while this issue tends to affect the entire script.
|
||||||
|
|
||||||
|
### Exceptions:
|
||||||
|
|
||||||
|
If you want to run a command called `amp` after backgrounding another command, add a space: `foo & amp;`.
|
Reference in New Issue
Block a user