lib/puppet-lint/checks.rb
# Internal: Run the lint checks over the manifest code.
#
# fileinfo - A Hash containing the following:
#   :fullpath - The expanded path to the file as a String.
#   :filename - The name of the file as a String.
#   :path     - The original path to the file as passed to puppet-lint as
#               a String.
# data     - The String manifest code to be checked.
#
# Returns an Array of problem Hashes.
Run the lint checks over the manifest code.
fileinfo - A Hash containing the following:
:fullpath - The expanded path to the file as a String.
:filename - The name of the file as a String.
:path     - The original path to the file as passed to puppet-lint as
a String.
data     - The String manifest code to be checked.

Returns an Array of problem Hashes.
Run the lint checks over the manifest code . fileinfo - A Hash containing the following : : fullpath - The expanded path to the file as a String . : filename - The name of the file as a String . : path - The original path to the file as passed to puppet - lint as a String . data - The String manifest code to be checked . Returns an Array of problem Hashes .
def run(fileinfo, data)
    load_data(fileinfo, data)
    checks_run = []
    enabled_checks.each do |check|
      klass = PuppetLint.configuration.check_object[check].new
      problems = klass.run
      if PuppetLint.configuration.fix
        checks_run << klass
      else
        @problems.concat(problems)
      end
    end
    checks_run.each do |check|
      @problems.concat(check.fix_problems)
    end
    @problems
  end
def run ( fileinfo , data ) load_data ( fileinfo , data ) checks_run = [ ] enabled_checks . each do | check | klass = PuppetLint . configuration . check_object [ check ] . new problems = klass . run if PuppetLint . configuration . fix checks_run << klass else @problems . concat ( problems ) end end checks_run . each do | check | @problems . concat ( check . fix_problems ) end @problems end
Internal: Run the lint checks over the manifest code.
Internal : Run the lint checks over the manifest code .
fileinfo
data