def check(path)
      raise FileNotFoundError, "#{path}: no such file" unless File.exist?(path)

      valid = false
      unless disable_extension_check
        unless check_filename(path)
          errors[path] = ['File extension must be .yaml or .yml']
          return valid
        end
      end

      File.open(path, 'r') do |f|
        error_array = []
        valid = check_data(f.read, error_array)
        errors[path] = error_array unless error_array.empty?
      end

      valid
    end
def check(path)
      raise FileNotFoundError, "#{path}: no such file" unless File.exist?(path)

      valid = false
      unless disable_extension_check
        unless check_filename(path)
          errors[path] = ['File extension must be .yaml or .yml']
          return valid
        end
      end

      File.open(path, 'r') do |f|
        error_array = []
        valid = check_data(f.read, error_array)
        errors[path] = error_array unless error_array.empty?
      end

      valid
    end
Check a single file