import re


def trailing_whitespace(source):
    """
    Checks each item in source list for a trailing whitespace

    :param source: list of lines to check for trailing whitespace
    :return: List of offending line numbers with trailing whitespace, otherwise None
    """
    lines = []
    for counter, line in enumerate(source):
        l = line.rstrip('\n\r')
        if re.search(r'\s+$', l):
            lines.append(counter + 1)

    return lines if lines else None