'Analyze filename code with pyflakes'

def process_code_analysis(self, check_results):

    self.cleanup_code_analysis()
    if (check_results is None):
        return
    self.setUpdatesEnabled(False)
    cursor = self.textCursor()
    document = self.document()
    flags = (QTextDocument.FindCaseSensitively | QTextDocument.FindWholeWords)
    for (message, line_number) in check_results:
        error = ('syntax' in message)
        block = self.document().findBlockByNumber((line_number - 1))
        data = block.userData()
        if (not data):
            data = BlockUserData(self)
        data.code_analysis.append((message, error))
        block.setUserData(data)
        refs = re.findall("\\'[a-zA-Z0-9_]*\\'", message)
        for ref in refs:
            text = ref[1:(-1)]
            def is_line_splitted(line_no):
                text = to_text_string(document.findBlockByNumber(line_no).text())
                stripped = text.strip()
                return (stripped.endswith('\\') or stripped.endswith(',') or (len(stripped) == 0))
            line2 = (line_number - 1)
            while ((line2 < (self.blockCount() - 1)) and is_line_splitted(line2)):
                line2 += 1
            cursor.setPosition(block.position())
            cursor.movePosition(QTextCursor.StartOfBlock)
            regexp = QRegExp(('\\b%s\\b' % QRegExp.escape(text)), Qt.CaseSensitive)
            color = (self.error_color if error else self.warning_color)
            cursor = document.find(regexp, cursor, flags)
            if cursor:
                while (cursor and (cursor.blockNumber() <= line2) and (cursor.blockNumber() >= (line_number - 1)) and (cursor.position() > 0)):
                    self.__highlight_selection('code_analysis', cursor, underline_color=QColor(color))
                    cursor = document.find(text, cursor, flags)
    self.update_extra_selections()
    self.setUpdatesEnabled(True)
    self.linenumberarea.update()
    self.classfuncdropdown.update()
