mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Created SC1015 (markdown)
19
SC1015.md
Normal file
19
SC1015.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
## This is a unicode double quote. Delete and retype it.
|
||||||
|
|
||||||
|
### Problematic code:
|
||||||
|
|
||||||
|
echo “hello world”
|
||||||
|
|
||||||
|
### Correct code:
|
||||||
|
|
||||||
|
echo "hello world"
|
||||||
|
|
||||||
|
### Rationale:
|
||||||
|
|
||||||
|
Blog software and word processors frequently replaces ASCII quotes `""` with fancy Unicode quotes, `“”`. To bash, Unicode quotes are considered regular literals and not quotes at all.
|
||||||
|
|
||||||
|
Simply delete them and retype them in your editor.
|
||||||
|
|
||||||
|
### Contraindications
|
||||||
|
|
||||||
|
If you really want literal Unicode double quotes, you can put them in single quotes (or unicode single quotes in double quotes) to make shellcheck ignore them.
|
Reference in New Issue
Block a user