lib/rordan_gramsay/lint/kitchen_checker.rb
# Model for each file used by KitchenChecker
Model for each file used by KitchenChecker
Model for each file used by KitchenChecker
def call
        @error_count = 0
        @files.each do |file|
          errors = []
          errors << :missing_inspec_verifier unless file.inspec?
          if errors.empty?
            puts format_success_message(file)
          else
            @error_count += 1
            puts format_error_message(file, errors)
          end
        end
        if files.count.nonzero?
          puts Paint % ["\n  Files to fix: %{files_count}", :white, :bold, files_count: Paint[@error_count.to_s, (@error_count / files.count) > 0.40 ? :red : :yellow, :bold]] if @error_count.nonzero?
        end
        @done = true
      end
def call @error_count = 0 @files . each do | file | errors = [ ] errors << :missing_inspec_verifier unless file . inspec? if errors . empty? puts format_success_message ( file ) else @error_count += 1 puts format_error_message ( file , errors ) end end if files . count . nonzero? puts Paint % [ "\n  Files to fix: %{files_count}" , :white , :bold , files_count : Paint [ @error_count . to_s , ( @error_count / files . count ) > 0.40 ? :red : :yellow , :bold ] ] if @error_count . nonzero? end @done = true end
Model for each file used by KitchenChecker
Model for each file used by KitchenChecker
# errors << :windows_vm_not_headless unless file.no_windows_gui? # compile the error message