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

Strings ending in backslash cause exceptions #142

Closed
aroben opened this issue Aug 30, 2012 · 0 comments
Closed

Strings ending in backslash cause exceptions #142

aroben opened this issue Aug 30, 2012 · 0 comments
Milestone

Comments

@aroben
Copy link

aroben commented Aug 30, 2012

define foo::test() {
  $a = 'string ending in \\'
}

Run puppet-lint on that and you'll get an exception:

puppet-lint-0.2.1/bin/../lib/puppet-lint/lexer.rb:130:in `tokenise': undefined method `[]' for nil:NilClass (NoMethodError)
    from /Users/aroben/github/puppet/vendor/gems/ruby/1.8/gems/puppet-lint-0.2.1/bin/../lib/puppet-lint/plugin.rb:38:in `load_data'
    from /Users/aroben/github/puppet/vendor/gems/ruby/1.8/gems/puppet-lint-0.2.1/bin/../lib/puppet-lint/plugin.rb:44:in `run'
    from /Users/aroben/github/puppet/vendor/gems/ruby/1.8/gems/puppet-lint-0.2.1/bin/../lib/puppet-lint.rb:143:in `run'
    from /Users/aroben/github/puppet/vendor/gems/ruby/1.8/gems/puppet-lint-0.2.1/bin/../lib/puppet-lint/bin.rb:102:in `run'
    from /Users/aroben/github/puppet/vendor/gems/ruby/1.8/gems/puppet-lint-0.2.1/bin/../lib/puppet-lint/bin.rb:99:in `each'
    from /Users/aroben/github/puppet/vendor/gems/ruby/1.8/gems/puppet-lint-0.2.1/bin/../lib/puppet-lint/bin.rb:99:in `run'
    from /Users/aroben/github/puppet/vendor/gems/ruby/1.8/gems/puppet-lint-0.2.1/bin/puppet-lint:7
    from bin/puppet-lint:12:in `load'
    from bin/puppet-lint:12
@rodjek rodjek closed this as completed in e4f2577 Sep 10, 2012
ekohl pushed a commit to ekohl/puppet-lint that referenced this issue Aug 30, 2023
…erpolations_check

(CAT-1301) Add check unsafe interpolations check
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

2 participants