'Update warning list menu'

def update_warning_menu(self):

    editorstack = self.get_current_editorstack()
    check_results = editorstack.get_analysis_results()
    self.warning_menu.clear()
    filename = self.get_current_filename()
    for (message, line_number) in check_results:
        error = ('syntax' in message)
        text = (message[:1].upper() + message[1:])
        icon = (ima.icon('error') if error else ima.icon('warning'))
        if (not (API == 'pyside')):
            slot = (lambda _checked, _l=line_number: self.load(filename, goto=_l))
        else:
            slot = (lambda _l=line_number: self.load(filename, goto=_l))
        action = create_action(self, text=text, icon=icon, triggered=slot)
        self.warning_menu.addAction(action)
