def patch_to_undercover_message(patch)
      offending_line_numbers(patch).map do |warning, msg_line_no|
        patch
          .added_lines
          .select { |line| line.new_lineno == msg_line_no }
          .map do |line|
            lines = untested_lines_for(warning)
            path = line.patch.delta.new_file[:path]
            msg = "#{warning.node.human_name} #{warning.node.name} missing tests" \
                  " for line#{'s' if lines.size > 1} #{lines.join(', ')}" \
                  " (coverage: #{warning.coverage_f})"
            Message.new(path, line, DEFAULT_LEVEL, msg, nil, self.class)
          end
      end
    end
def patch_to_undercover_message(patch)
      offending_line_numbers(patch).map do |warning, msg_line_no|
        patch
          .added_lines
          .select { |line| line.new_lineno == msg_line_no }
          .map do |line|
            lines = untested_lines_for(warning)
            path = line.patch.delta.new_file[:path]
            msg = "#{warning.node.human_name} #{warning.node.name} missing tests" \
                  " for line#{'s' if lines.size > 1} #{lines.join(', ')}" \
                  " (coverage: #{warning.coverage_f})"
            Message.new(path, line, DEFAULT_LEVEL, msg, nil, self.class)
          end
      end
    end
rubocop:disable Metrics/MethodLength, Metrics/AbcSize