Skip to content
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

double_quoted_strings does not permit space escape sequence #952

Closed
optiz0r opened this issue Jul 29, 2021 · 1 comment
Closed

double_quoted_strings does not permit space escape sequence #952

optiz0r opened this issue Jul 29, 2021 · 1 comment

Comments

@optiz0r
Copy link

optiz0r commented Jul 29, 2021

The following code triggers the double_quoted_strings warning, but should not. The \s escape sequence is only valid within double-quoted strings, not in single quoted strings, so the type of quotes cannot be changed, and the string may legitimately not contain any variables.

Example false positive:

split(strip($foo),"\s")

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.

@optiz0r
Copy link
Author

optiz0r commented Jul 29, 2021

Re-raised here: puppetlabs#16

@optiz0r optiz0r closed this as completed Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant