Repository is archived
No commit activity in last 3 years
No release in over 3 years
Extends puppet-lint to issue warnings if any chaining arrows ('->', '~>', '<-', '<~') are found.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

< 3.0, >= 1.1
 Project Readme

puppet-lint no chaining arrows check

Extends puppet-lint to issue warnings if any chaining arrows (->, ~>, <-, <~) are found.

Actions Status

Although puppet-lint has the included Right To Left Relationship check I wanted one that went further and warned on any use of chaining arrows. In my puppet code I'd rather have resources connected with parameters, such as require and notify. I also find the indentation nicer without the type being offset by the arrow.

  # I think this -
  file { '/tmp/foo':
    content => 'foo',
    require => Class['bar'],
    ...
  }

  # - looks nicer than this
  -> file { '/tmp/foo':
    content => 'foo',
    ...
  }

This plugin has one side effect, it disables the Right To Left Relationship check that produces

WARNING: right-to-left (<-) relationship on line $foo

This is to ensure that some relationships, specified with <- and <~, are not reported twice.

Installation

To use this plugin add the following line to your Gemfile

gem 'puppet-lint-no_chaining_arrows-check'

and then run bundle install.

Usage

This plugin provides a new check to puppet-lint.

WARNING: chaining arrow found on line 3

Other puppet-lint plugins

You can find a list of my puppet-lint plugins in the unixdaemon puppet-lint-plugins repo.

Author

Dean Wilson

License

  • MIT