def _generate_error_message_for_enum(res_dict):
    """Generate error message string for enum checks

    Args:
        res_dict (dict of string: string): mapping from the violation to the list of enum path

    Returns:
         str: the formatted error message

    """
    message_lines = ["Errors in enum checks:"]
    for error_name, lines in res_dict.items():
        message_lines.append(error_name)
        for line in lines:
            message_lines.append("\t{}".format(line))
    return "\n".join(message_lines)