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

fix for ensure_first_param breaks heredocs #939

Open
felixdoerre opened this issue Apr 5, 2021 · 0 comments
Open

fix for ensure_first_param breaks heredocs #939

felixdoerre opened this issue Apr 5, 2021 · 0 comments

Comments

@felixdoerre
Copy link

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
  }
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

1 participant