-
Notifications
You must be signed in to change notification settings - Fork 204
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
Unrecognized escape sequences don't raise warnings #907
Comments
Okay ... a quick shows the test is only accidentally working. The "problem" it's getting is; {:message=>"double quoted string containing no variables", :line=>1, :column=>12, :token=><Token :STRING (this string contains l random esape) @1:12>, :kind=>:warning, :check=>:double_quoted_strings, :fullpath=>"C:/Source/puppet-lint", :path=>"", :filename=>""} If you change the test string to
|
I believe this statement in the style guide would warrant puppet-lint raising an error for it
|
After taking a look at the tests and the implementation I read this issue as a feature request. The current implementation doesn't try to warn on unrecognized escape sequences and the mentioned test was explicitly written to warn about double quoting the string with a random escape sequence -- not to warn about the escaping itself. That being said, I'd also like to get a warning from the linter about unrecognized escape sequences. Probably it could be done in a plugin as well. |
Given a manifest of:
Running puppet lint I get the following warnings:
However when running puppet parser validate:
Note this appears to be tested as part of
puppet-lint/spec/puppet-lint/plugins/check_strings/double_quoted_strings_spec.rb
Lines 114 to 124 in 5bc211f
Environment:
OS - Windows 10 - 1903
Ruby - ruby 2.5.1p57 (2018-03-29 revision 63029) [x64-mingw32]
Puppet Lint - puppet-lint 2.4.2
The text was updated successfully, but these errors were encountered: