def process_hook_return_value(hook_return_value)
      if hook_return_value.is_a?(Array) &&
         (hook_return_value.first.is_a?(Message) || hook_return_value.empty?)
        # Process messages into a status and output
        Overcommit::MessageProcessor.new(
          self,
          @config['problem_on_unmodified_line'],
        ).hook_result(hook_return_value)
      else
        # Otherwise return as-is
        hook_return_value
      end
    end
def process_hook_return_value(hook_return_value)
      if hook_return_value.is_a?(Array) &&
         (hook_return_value.first.is_a?(Message) || hook_return_value.empty?)
        # Process messages into a status and output
        Overcommit::MessageProcessor.new(
          self,
          @config['problem_on_unmodified_line'],
        ).hook_result(hook_return_value)
      else
        # Otherwise return as-is
        hook_return_value
      end
    end
Converts the hook's return value into a canonical form of a tuple
 containing status (pass/warn/fail) and output.

 This is intended to support various shortcuts for writing hooks so that
 hook authors don't need to work with {Overcommit::Hook::Message} objects
 for simple pass/fail hooks. It also saves you from needing to manually
 encode logic like "if there are errors, fail; if there are warnings, warn,
 otherwise pass." by simply returning an array of
 {Overcommit::Hook::Message} objects.

 @param hook_return_value [Symbol, Array<Symbol,String>, Array<Message>]
 @return [Array<Symbol,String>] tuple of status and output