'Process file to determine if it is a Mako template file and
if it is safe.
Arguments:
directory (string): The directory of the file to be checked
file_name (string): A filename for a potential Mako file
Returns:
The file results containing any violations.'

def process_file(self, directory, file_name):

    mako_file_full_path = os.path.normpath(((directory + '/') + file_name))
    results = FileResults(mako_file_full_path)
    if (not results.is_file):
        return results
    if (not self._is_valid_directory(directory)):
        return results
    if (not (file_name.lower().endswith('.html') or file_name.lower().endswith('.xml'))):
        return results
    return self._load_and_check_file_is_safe(mako_file_full_path, self._check_mako_file_is_safe, results)
