Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Resources are not highlighted after using puppet-lint due to chaining arrow #52

@HanSooloo

Description

@HanSooloo

Imagine a simple class definition as below ... using puppet-lint on the file, it will move the chaining arrow to the beginning of the 'file_line' resource. But this results in language-puppet NOT doing syntax highlighting for 'file'.

puppet-lint, I believe, follows guidelines set here: https://docs.puppet.com/puppet/4.9/style_guide.html#chaining-arrow-syntax

In the first example, Atom/language-puppet will properly syntax highlight the file_line keyword in purple.
However, when the chaining-arrow linting is done, -> file_line will NOT have purple highlight for file_line.

Is that a (known) issue?

Syntax highlighting WORKS, puppet-lint WARNING

# server.pp
class profiles::vault::server {
  class { '::vault':
    version  => '0.7.0',
    backend  => { 'inmem' => {}, },
    listener => { 'tcp' => {
                            'address'     => '0.0.0.0:8200',
                            'tls_disable' =>  1,
                          },
                        },
  } ->
  # Syntax highlighting for `file_line` works here; but puppet-lint throws warning
  file_line { 'vault_addr':
    ensure => present,
    path   => '/etc/environment',
    line   => 'VAULT_ADDR=http://127.0.0.1:8200',
  }
}

Syntax highlighting DOES NOT WORK, puppet-lint OK

# server.pp
class profiles::vault::server {
  class { '::vault':
    version  => '0.7.0',
    backend  => { 'inmem' => {}, },
    listener => { 'tcp' => {
                            'address'     => '0.0.0.0:8200',
                            'tls_disable' =>  1,
                          },
                        },
  } 
  # Syntax highlighting for `file_line` DOES NOT work here; and puppet-lint is happy!
  -> file_line { 'vault_addr':
    ensure => present,
    path   => '/etc/environment',
    line   => 'VAULT_ADDR=http://127.0.0.1:8200',
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions