We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
SC2004
(())
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#!/usr/bin/env bash char="-" value=10 readonly -A CHAR_VALUES=(["+"]=1 ["-"]=2 ["|"]=3) (( value += CHAR_VALUES[$char] ))
[Line 7:](javascript:setPosition(7, 25)) (( value += CHAR_VALUES[$char] )) ^-- [SC2004](https://www.shellcheck.net/wiki/SC2004) (style): $/${} is unnecessary on arithmetic variables.
Nothing, as removing the $ changes the meaning of the expression.
$
Note: If $char is changed to "$char", shellcheck no longer complains.
$char
"$char"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
For bugs
Here's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
Here's what I wanted or expected to see:
Nothing, as removing the
$
changes the meaning of the expression.Note: If
$char
is changed to"$char"
, shellcheck no longer complains.The text was updated successfully, but these errors were encountered: