Skip to content

Unhandled error - NoMethodError: undefined method `prev_token' for nil:NilClass #223

@jmichaels42

Description

@jmichaels42

Describe the Bug

Puppet-lint is not able to validate heredoc syntax

Expected Behavior

The heredoc format succeeds

Steps to Reproduce

Steps to reproduce the behavior:

  1. pkd validate --parallel

Environment

  • Version 11
  • Platform - Windows

Additional Context

Whoops! It looks like puppet-lint has encountered an error that it doesn't
know how to handle. Please open an issue at https://github.com/puppetlabs/puppet-lint
and paste the following output into the issue description.

puppet-lint version: 4.2.4
ruby version: 2.7.8-p225
platform: x64-mingw32
file path: C:/git/puppet/DEVOPS-3355_production_dev_pd_web_sa_SQL_LOGIN/puppet-main/site/profile/manifests/test.pp
file contents:

define profile::iis_app_manage_application_pools () {
  $repository_content      = @("REPO_CONTENT")
    [${repository_name}]
    name=${repository_display_name}
    baseurl=${repository_url}
    enabled=1
    gpgcheck=1
    gpgkey=${repository_url}repodata/repomd.xml.key
    | REPO_CONTENT
}

error:

NoMethodError: undefined method `prev_token' for nil:NilClass

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions