# eric6.Plugins.PluginSyntaxChecker

Module implementing the Syntax Checker plugin.

### Global Attributes

author
autoactivate
className
deactivateable
error
longDescription
name
packageName
pyqtApi
shortDescription
version

### Classes

SyntaxCheckerPlugin | Class implementing the Syntax Checker plugin.

### Functions

None

## SyntaxCheckerPlugin

Class implementing the Syntax Checker plugin.

### Derived from

QObject

### Class Attributes

None

### Class Methods

None

### Methods

SyntaxCheckerPlugin | Constructor
__editorClosed | Private slot called, when an editor was closed.
__editorOpened | Private slot called, when a new editor was opened.
__editorShowMenu | Private slot called, when the the editor context menu or a submenu is about to be shown.
__editorSyntaxCheck | Private slot to handle the syntax check context menu action of the editors.
__getPythonOptions | Private methode to determine the syntax check options.
__initialize | Private slot to (re)initialize the plugin.
__projectBrowserShowMenu | Private slot called, when the the project browser menu or a submenu is about to be shown.
__projectBrowserSyntaxCheck | Private method to handle the syntax check context menu action of the project sources browser.
__projectShowMenu | Private slot called, when the the project menu or a submenu is about to be shown.
__projectSyntaxCheck | Private slot used to check the project files for syntax errors.
__translateSyntaxCheck | Private slot to translate the resulting messages.
activate | Public method to activate this plugin.
deactivate | Public method to deactivate this plugin.

### Static Methods

None

#### SyntaxCheckerPlugin (Constructor)

SyntaxCheckerPlugin(ui)

Constructor

ui
  reference to the user interface object (UI.UserInterface)

#### SyntaxCheckerPlugin.__editorClosed

__editorClosed(editor)

Private slot called, when an editor was closed.

editor
  reference to the editor (QScintilla.Editor)

#### SyntaxCheckerPlugin.__editorOpened

__editorOpened(editor)

Private slot called, when a new editor was opened.

editor
  reference to the new editor (QScintilla.Editor)

#### SyntaxCheckerPlugin.__editorShowMenu

__editorShowMenu(menuName, menu, editor)

Private slot called, when the the editor context menu or a submenu is about to be shown.

menuName
  name of the menu to be shown (string)
menu
  reference to the menu (QMenu)
editor
  reference to the editor

#### SyntaxCheckerPlugin.__editorSyntaxCheck

__editorSyntaxCheck()

Private slot to handle the syntax check context menu action of the editors.

#### SyntaxCheckerPlugin.__getPythonOptions

__getPythonOptions()

Private methode to determine the syntax check options.

Returns:
  state of checkFlakes and ignoreStarImportWarnings (bool, bool)

#### SyntaxCheckerPlugin.__initialize

__initialize()

Private slot to (re)initialize the plugin.

#### SyntaxCheckerPlugin.__projectBrowserShowMenu

__projectBrowserShowMenu(menuName, menu)

Private slot called, when the the project browser menu or a submenu is about to be shown.

menuName
  name of the menu to be shown (string)
menu
  reference to the menu (QMenu)

#### SyntaxCheckerPlugin.__projectBrowserSyntaxCheck

__projectBrowserSyntaxCheck()

Private method to handle the syntax check context menu action of the project sources browser.

#### SyntaxCheckerPlugin.__projectShowMenu

__projectShowMenu(menuName, menu)

Private slot called, when the the project menu or a submenu is about to be shown.

menuName
  name of the menu to be shown (string)
menu
  reference to the menu (QMenu)

#### SyntaxCheckerPlugin.__projectSyntaxCheck

__projectSyntaxCheck()

Private slot used to check the project files for syntax errors.

#### SyntaxCheckerPlugin.__translateSyntaxCheck

__translateSyntaxCheck(fn, problems)

Private slot to translate the resulting messages.

If checkFlakes is True, warnings contains a list of strings containing the warnings (marker, file name, line number, message) The values are only valid, if nok is False.

fn
  filename of the checked file (str)
problems
  dictionary with the keys 'error' and 'warnings' which hold a list containing details about the error/ warnings (file name, line number, column, codestring (only at syntax errors), the message, a list with arguments for the message)

#### SyntaxCheckerPlugin.activate

activate()

Public method to activate this plugin.

Returns:
  tuple of None and activation status (boolean)

#### SyntaxCheckerPlugin.deactivate

deactivate()

Public method to deactivate this plugin.

Up