code: def register_plugin(self):
          
          self.pylint.treewidget.sig_edit_goto.connect(self.main.editor.load)
          self.pylint.redirect_stdio.connect(
              self.main.redirect_internalshell_stdio)
          self.main.add_dockwidget(self)
          
          pylint_act = create_action(self, _("Run static code analysis"),
                                     triggered=self.run_pylint)
          pylint_act.setEnabled(is_module_installed('pylint'))
          self.register_shortcut(pylint_act, context="Pylint",
                                 name="Run analysis")
          
          self.main.source_menu_actions += [MENU_SEPARATOR, pylint_act]
          self.main.editor.pythonfile_dependent_actions += [pylint_act]
docs: Register plugin in Spyder's main window