puppet-lint icon indicating copy to clipboard operation
puppet-lint copied to clipboard

2 space soft tab indentation rule seems to not apply

Open glennsarti opened this issue 6 years ago • 0 comments

With the manifest below, it produces no warnings. Expecting at least one

# Class documentation
class init {
$admin_enable = false
$admin_bind_address = '0.0.0.0:8083'
$domain_name = undef
$http_enable = true
$http_bind_address = '0.0.0.0:8086'
}

If I indent one element by one space I get a warning

# Class documentation
class init {
$admin_enable = false
$admin_bind_address = '0.0.0.0:8083'
$domain_name = undef
 $http_enable = true
$http_bind_address = '0.0.0.0:8086'
}

ERROR: two-space soft tabs not used on line 6

If I indent the same element by two spaces I don't get a warning

# Class documentation
class init {
$admin_enable = false
$admin_bind_address = '0.0.0.0:8083'
$domain_name = undef
  $http_enable = true
$http_bind_address = '0.0.0.0:8086'
}

It seems that if I indent by 0,2,4,6 spaces I don't get a warning, but 1,3,5,7 I do

Also this combination doesn't produce a warning

# Class documentation
class init {
  $admin_enable = false
  $admin_bind_address = '0.0.0.0:8083'
  $domain_name = undef
$http_enable = true
  $http_bind_address = '0.0.0.0:8086'
}

glennsarti avatar May 04 '18 06:05 glennsarti