Check the presence of the author in the AUTHORS/THANKS files.

    Rules:

    - the author full name and email must appear in AUTHORS file

    :param authors: name of AUTHORS files
    :type authors: `list`
    :param path: path to the repository home
    :type path: str
    :return: errors
    :rtype: `list`

def check_author(author, **kwargs):
    """Check the presence of the author in the AUTHORS/THANKS files.

    Rules:

    - the author full name and email must appear in AUTHORS file

    :param authors: name of AUTHORS files
    :type authors: `list`
    :param path: path to the repository home
    :type path: str
    :return: errors
    :rtype: `list`
    """
    errors = []

    authors = kwargs.get("authors")
    if not authors:
        errors.append('1:A100: ' + _author_codes['A100'])
        return errors

    exclude_author_names = kwargs.get("exclude_author_names")
    if exclude_author_names and author in exclude_author_names:
        return []

    path = kwargs.get("path")
    if not path:
        path = os.getcwd()

    for afile in authors:
        if not os.path.exists(path + os.sep + afile):
            errors.append('1:A101: ' + _author_codes['A101'].format(afile))

    if errors:
        return errors

    status = subprocess.Popen(['grep', '-q', author] +
                              [path + os.sep + afile for afile in authors],
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE,
                              cwd=path).wait()
    if status:
        errors.append('1:A102: ' + _author_codes['A102'].format(author))

    return errors