@classmethod
def register(cls, name, description, options_registrar_cls=None):
    """Register a goal description.

        Otherwise the description must be set when registering some task on the goal,
        which is clunky, and dependent on things like registration order of tasks in the goal.

        A goal that isn't explicitly registered with a description will fall back to the description
        of the task in that goal with the same name (if any).  So singleton goals (e.g., 'clean-all')
        need not be registered explicitly.  This method is primarily useful for setting a
        description on a generic goal like 'compile' or 'test', that multiple backends will
        register tasks on.

        :API: public

        :param string name: The name of the goal; ie: the way to specify it on the command line.
        :param string description: A description of the tasks in the goal do.
        :param :class:pants.option.Optionable options_registrar_cls: A class for registering options
               at the goal scope. Useful for registering recursive options on all tasks in a goal.
        :return: The freshly registered goal.
        :rtype: :class:`_Goal`
        """
    goal = cls.by_name(name)
    goal._description = description
    goal._options_registrar_cls = options_registrar_cls.registrar_for_scope(
        name) if options_registrar_cls else None
    return goal
