Skip to content

Puppet Heredocs error #234

@deanfr

Description

@deanfr

Describe the Bug

puppet-lint version: 4.2.4
ruby version: 3.2.3-p157
platform: x86_64-linux
file path: manifests/issue.pp
file contents:

$cmd1 = @("EOT")
class_id=${class_id}
src_ips="${src_ips}"
parent=${parent}
device=${device}
| EOT

error:

NoMethodError: undefined method `length' for nil:NilClass
/opt/puppetlabs/pdk/share/cache/ruby/3.2.0/gems/puppet-lint-strict_indent-check-3.0.0/lib/puppet-lint/plugins/check_strict_indent.rb:132:in `block in check'
/opt/puppetlabs/pdk/share/cache/ruby/3.2.0/gems/puppet-lint-strict_indent-check-3.0.0/lib/puppet-lint/plugins/check_strict_indent.rb:49:in `each'
/opt/puppetlabs/pdk/share/cache/ruby/3.2.0/gems/puppet-lint-strict_indent-check-3.0.0/lib/puppet-lint/plugins/check_strict_indent.rb:49:in `check'
/opt/puppetlabs/pdk/share/cache/ruby/3.2.0/gems/puppet-lint-4.2.4/lib/puppet-lint/checkplugin.rb:21:in `run'
/opt/puppetlabs/pdk/share/cache/ruby/3.2.0/gems/puppet-lint-4.2.4/lib/puppet-lint/checks.rb:61:in `block in run'
/opt/puppetlabs/pdk/share/cache/ruby/3.2.0/gems/puppet-lint-4.2.4/lib/puppet-lint/checks.rb:58:in `each'
/opt/puppetlabs/pdk/share/cache/ruby/3.2.0/gems/puppet-lint-4.2.4/lib/puppet-lint/checks.rb:58:in `run'
/opt/puppetlabs/pdk/share/cache/ruby/3.2.0/gems/puppet-lint-4.2.4/lib/puppet-lint.rb:226:in `run'
/opt/puppetlabs/pdk/share/cache/ruby/3.2.0/gems/puppet-lint-4.2.4/lib/puppet-lint/bin.rb:85:in `block in run'
/opt/puppetlabs/pdk/share/cache/ruby/3.2.0/gems/puppet-lint-4.2.4/lib/puppet-lint/bin.rb:80:in `each'
/opt/puppetlabs/pdk/share/cache/ruby/3.2.0/gems/puppet-lint-4.2.4/lib/puppet-lint/bin.rb:80:in `run'
/opt/puppetlabs/pdk/share/cache/ruby/3.2.0/gems/puppet-lint-4.2.4/bin/puppet-lint:7:in `<top (required)>'
/opt/puppetlabs/pdk/share/cache/ruby/3.2.0/bin/puppet-lint:25:in `load'
/opt/puppetlabs/pdk/share/cache/ruby/3.2.0/bin/puppet-lint:25:in `<main>'

Expected Behavior

A clear and concise description of what you expected to happen.

Steps to Reproduce

pdk validate

Environment

puppet-lint version: 4.2.4
ruby version: 3.2.3-p157
platform: x86_64-linux

Additional Context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions