def basic_status_and_output(messages)
      status =
        if messages.any? { |message| message.type == :error }
          :fail
        elsif messages.any? { |message| message.type == :warning }
          :warn
        else
          :pass
        end

      output = ''
      if messages.any?
        output += messages.join("\n") + "\n"
      end

      [status, output]
    end
def basic_status_and_output(messages)
      status =
        if messages.any? { |message| message.type == :error }
          :fail
        elsif messages.any? { |message| message.type == :warning }
          :warn
        else
          :pass
        end

      output = ''
      if messages.any?
        output += messages.join("\n") + "\n"
      end

      [status, output]
    end
Returns status and output for messages assuming no special treatment of
 messages occurring on unmodified lines.