rodjek / puppet-lint

Check that your Puppet manifests conform to the style guide
MIT License
820 stars 206 forks source link

Alignment warning when => are all aligned. #309

Closed stoney27 closed 9 years ago

stoney27 commented 9 years ago

Version 1.0.1 is giving alignment warnings on code that used to pass puppet-lint. I have code that has rocket ships aligned with two more more soft tabs and I receive warnings unless the => is only one space past the longest attribute.

Ex:

class { 'puppetdb':
    listen_address    => '0.0.0.0',
    require           => Package['puppet'],
    puppetdb_version  => latest,
  }

Unless I am miss reading the style guide to fI would consider this a bug.

Thanks. -S

ghoneycutt commented 9 years ago

I agree that this is not covered in the style guide.. though I meant for it to be there :smile:

rodjek commented 9 years ago

This is actually covered in the style guide, section 9.2:

All of the fat comma arrows (=>) in a resource’s attribute/value list should be aligned. The arrows should be placed one space ahead of the longest attribute name.

ghoneycutt commented 9 years ago

guess I should have scrolled down further :)

stoney27 commented 9 years ago

Rodjek, I guess I should have looked closer at the guide too. Thanks for looking at this, I guess I will reformat my code :)

-S

rodjek commented 9 years ago

@stoney27, just run puppet-lint --only-checks arrow_alignment --fix modules/ and let puppet-lint do it for you :)