7 SC1016
John Gardner edited this page 2021-12-22 18:45:15 +11:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This is a Unicode single quote. Delete and retype it.

Problematic code:

echo hello world

Correct code:

echo 'hello world'

Rationale:

Some software, like macOS, Microsoft Word, and WordPress, may automatically replace your regular quotes with slanted Unicode quotes. Try deleting and retyping them, and/or disable “smart quotes” in your editor or OS.

Status:

This error was retired after 0.4.5. In this version and earlier, ShellCheck parsed slanted quotes as a valid double-quote. This meant that the warning could not simply be ignored. It has since been replaced by SC1110 (outside quotes) and SC1112 (inside single-quotes).

Exceptions

If you want to use typographic single-quotes, you can put them in double-quotes (or typographic double-quotes in single-quotes) to make ShellCheck ignore them, e.g.,

printf "Warning: wakeonlan is not installed.\n"