All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.shellcheck.rules.shellcheck.SC2301.html Maven / Gradle / Ivy

The newest version!

Parameter expansion starts with unexpected quotes. Double check syntax.

Problematic code

echo ${"Hello World"}

Correct code

echo $"Hello World"

Rationale

ShellCheck found a parameter expansion ${...} that contains an unexpected syntax element, such as single or double quotes.

In the example, this was due to wrapping a translated string $".." with curly braces, which is not valid.

It is unclear what the intention is with invalid expansions like ${'foo'}, ${$"foo"}, so please look up how to do what you were trying to do.

Exceptions

If this warning triggers for working code, please submit a bug.

Related resources

  • Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!




© 2015 - 2025 Weber Informatics LLC | Privacy Policy