def triage(parser, main=None, validate_args=None):
    """Triage the command-line presented.

    :param parser:
    :param main:
    :param validate_args:
    :return:
    """
    options, args = parser.parse_args()
    if options.doctest or not main:
        import doctest
    if validate_args:
        validate_args(parser, options, args)
        doctest.testmod(verbose=options.verbose)
    elif main:
        main()
    return options, args
