Skip to content

fix for ensure_first_param breaks heredocs #939

Description

@felixdoerre

Input:

  file{'/path/to/file':
    content => @(HERE),
    Contents1
    Contents2
    | HERE
    ensure => file,
  }

Command:

$ puppet-lint --fix fixed.pp 
FIXED: indentation of => is not properly aligned (expected in column 13, but found it in column 12) on line 6
FIXED: ensure found on line but it's not the first attribute on line 6

Output:

  file{'/path/to/file':
    ensure  => file,
    Contents1
    Contents2
    | HERE
    content => @(HERE),
  }

Notice, how the "fix" completely broke the HEREDOC structure. However, I am not completely sure if heredoc is considered to be supported by puppet-lint.

Expected Output:

  file{'/path/to/file':
    ensure  => file,
    content => @(HERE),
    Contents1
    Contents2
    | HERE
  }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions