No release in over a year
A puppet-lint plugin to check that manifest files contain properly formatted @param comments.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Puppet lint param check

This is an extensive, opinionated check for valid parameter comments. It checks if the following criteria are matched:

  • All parameters are documented
  • @param-tags are separated from another by one empty line
  • The description of a @param tag is always indented in the next line
  • The @option comments directly follow the corresponding hash @param tag without a separator
  • @param tags are sorted like the parameters they document
# @param mandatory
#   A mandatory parameter
# @option mandatory [String] hashkey
#   A key of the hash "mandatory" named "hashkey".
#
# @param withdefault
#   A parameter with a default value
#
# @param optional
#   An optional parameter

class my_class {
    Hash $mandatory,
    Boolean $withdefault = false,
    Optional[String] $optional = undef,

Development

This check uses a finite state machine to work through the expected list of parameters.

The workflow used by the fsm can be visualized like this:

Usage

To use the plugin, add the following line to the Gemfile:

gem 'puppet-lint-param_comment-check'