lib/puppet-check/cli.rb in puppet-check-1.2.1 vs lib/puppet-check/cli.rb in puppet-check-1.3.0
- old
+ new
@@ -19,16 +19,19 @@
# usage
opts.banner = 'usage: puppet-check [options] paths'
# base options
opts.on('--version', 'Display the current version.') do
- puts 'puppet-check 1.2.1'
+ puts 'puppet-check 1.3.0'
exit 0
end
# bool options
opts.on('-f', '--future', 'Enable future parser') { PuppetCheck.future_parser = true }
opts.on('-s', '--style', 'Enable style checks') { PuppetCheck.style_check = true }
+
+ # formatting options
+ opts.on('-o', '--output format', String, 'Format for results output (default is text): text, json, or yaml') { |arg| PuppetCheck.output_format = arg }
# arguments to style checkers
opts.on('--puppet-lint arg_one,arg_two', Array, 'Arguments for PuppetLint ignored checks') do |puppetlint_args|
PuppetCheck.puppetlint_args += puppetlint_args.map { |arg| "--#{arg}" }
end