Display Order Of Parameters


In parameterized class and defined resource type declarations, parameters that are required should be listed before optional parameters (i.e. parameters with defaults) (style guide).

What you have done

class ntp (
  $options   = "iburst",
  $servers,
  $multicast = false
) {}

What you should have done:

class ntp (
  $servers,
  $options   = "iburst",
  $multicast = false
) {}

Disabling the check

To disable this check you can add --no-parameter_order-check to your puppet-lint command line.

$ puppet-lint --no-parameter_order-check path/to/file.pp

Alternatively, if you’re calling puppet-lint via the Rake task, you should insert the following line to your Rakefile.

PuppetLint.configuration.send('disable_parameter_order')

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant