voxpupuli / puppet-lint-strict_indent-check

indent check for puppet-lint
Mozilla Public License 2.0
4 stars 11 forks source link

puppet-lint-strict_indent-check --fix makes it worse instead of better #33

Open shibumi opened 1 year ago

shibumi commented 1 year ago

Hi,

We have the following code:

  file { ['/opt/foo/var',
          '/opt/foo/log',
          '/opt/foo/bar']:
    ensure => directory,
    owner  => 'root',
    group  => 'root',
    mode   => '0755',
  }

The formatter makes out of this perfectly fine code something like this:

  file { ['/opt/dbe/dirtdb',
      '/opt/dbe/log',
    '/opt/dbe/sox']:
      ensure => directory,
      owner  => 'root',
      group  => 'root',
      mode   => '0755',
  }

This is not the only occurence. Looks like the formatter is formatting code incorrectly in several other places as well. For example in one occurence it made out of a file:

class bar::foo {
...
exec { 'foobarbazinga':
    command => '/usr/sbin/command',
    unless  => '/usr/sbin/command2',
  }
}

Something like this:

class bar::foo {
...
exec { 'foobarbazinga':
    command => '/usr/sbin/command',
    unless  => '/usr/sbin/command2',
} }