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

indentation of => is not properly aligned in hash within array #333

Closed
PierreR opened this issue Sep 26, 2014 · 4 comments
Closed

indentation of => is not properly aligned in hash within array #333

PierreR opened this issue Sep 26, 2014 · 4 comments
Milestone

Comments

@PierreR
Copy link

PierreR commented Sep 26, 2014

Using the latest 1.1.0, this snippet issue the following warnings:

WARNING: indentation of => is not properly aligned on line 32
WARNING: indentation of => is not properly aligned on line 33
WARNING: indentation of => is not properly aligned on line 34
WARNING: indentation of => is not properly aligned on line 35
WARNING: indentation of => is not properly aligned on line 43
  apache::vhost { 'graphite':
    aliases                     => [
      { alias => '/media',
        path  => "${python_sitelib}/django/contrib/admin/media/"},
      { alias => '/content',
        path  => "${docroot}/content"},
    ],
    wsgi_script_aliases         => { '/' => $wsgi_file },
  }

PS: The puppet-lint fix command completely broke it.

@PierreR
Copy link
Author

PierreR commented Oct 1, 2014

A workaround is to use:

    aliases                     => [
      {
        alias => '/media',
        path  => "${python_sitelib}/django/contrib/admin/media/" },
      {
        alias => '/content',
        path  => "${docroot}/content" },
    ],

Apparently the rule forces a line return after }
is it intended ?

@rodjek rodjek added this to the 1.1.1 milestone Oct 8, 2014
@cyberious
Copy link

Very much a headache as it doesn't tell you what column it occurs at and if nested within a hash.

@ericqweinstein
Copy link

FYI, this happens if you don't use the minimum amount of space you can:

      # OKAY
      #
      # foo  => bar,
      # quux => baz,
      #
      # NOT OKAY
      #
      # foo   => bar,
      # quux  => baz, <--- note the two spaces before the => here >_<

@rnelson0 rnelson0 modified the milestones: 2.1.0, 1.1.1 Aug 2, 2016
@rnelson0
Copy link
Collaborator

Validated this is still an issue in 2.0.3.pre.

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

5 participants