New issue
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
SC2059 and $$ #1541
Comments
This is intended for people who use If you do specify a format string with values, you're obviously already aware of this, so ShellCheck assumes that your mixing of template arguments and variable expansions was intentional. I haven't actually checked whether this is a valid assumption, so that's worth looking into. |
I’d say if only instances of %s are in the format use echo. Printf for formatting implies right justify or length limiting or printing as a number. If your not doing any of those, use rxho |
|
@koalaman Thanks for the explanation. I thought there was something special with |
The following code
triggers
SC2059: Don't use variables in the printf format string. Use printf "..%s.." "$foo"
for the 1st line, but not for the second. How come?I run ShellCheck version: 0.6.0
The text was updated successfully, but these errors were encountered: