#!/usr/bin/env ruby require 'puppet-doc-lint' abort 'puppet-doc-lint: no arguments given ' if ARGV[0].nil? runner = PuppetDocLint::Runner.new path = ARGV[0] if File.directory?(path) puppet_files = Dir.glob("#{path}/**/*.pp") puts "Puppet docs to be checked: #{puppet_files}" results = runner.run(puppet_files) else results = runner.run(ARGV) end results.each do |result| result.result_report end