Skip to content

SC2016 should not apply to single-quoted printf patterns #1293

@blueyed

Description

@blueyed
In t-printf-I2016.sh line 5:
printf 'eval "$(pyenv init - %s)"' "$shell"
       ^-- SC2016: Expressions don't expand in single quotes, use double quotes for that.

Here printf is used on purpose, and therefore SC2016 should not be emitted.

btw: when using double quotes and a variable in there you will get:

Don't use variables in the printf format string. Use printf "..%s.." "$foo". (I2059)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions