You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The double_quoted_strings raises a false positive for a double quoted string which contains the \s escape sequence. This sequence is only valid within double-quoted strings, not in single quoted strings, so the type of quotes cannot be changed, and a string using this sequence may legitimately not contain any variables.
Prior to this commit, if the `\s` escape sequence was used, this
would cause a F+ from the `double_quoted_strings` check.
This commit updates the `double_quoted_string` check to permit the
`\s` string literal.
Describe the Bug
The
double_quoted_strings
raises a false positive for a double quoted string which contains the\s
escape sequence. This sequence is only valid within double-quoted strings, not in single quoted strings, so the type of quotes cannot be changed, and a string using this sequence may legitimately not contain any variables.Expected Behavior
No lint warning to be raised
Steps to Reproduce
Include the following code in a manifest:
"\s"
Example:
Environment
Additional Context
https://github.com/rodjek/puppet-lint/blob/master/lib/puppet-lint/plugins/check_strings/double_quoted_strings.rb#L7 should include
\\s
as an additional case for a valid string to not fail the check.The text was updated successfully, but these errors were encountered: