External Code Quality Checkers

Index of All Documentation » Wing Pro Reference Manual » Code Warnings and Quality Inspection »

Errors and warnings found by external checkers like mypy, pep8 and pylint may be interleaved with those found by Wing. Wing will filter the warnings through its list of rules to disable warnings. This can be used to quickly disable warnings that are stylistic in nature and not real problems in code.

To enable any external checker, check the Enable External Checkers option at the bottom of the Configuration: Defaults page in the Code Warnings tool. Then press the Configure button to select which checkers to enable and when to run them. External checkers may be run when a file is opened, after it is saved to disk, or both. Checkers will also be re-run if warnings are updated manually from the code warnings menu in the editor or the Options menu in the Code Warnings tool.

The command line used to run the checker is configured under its tab in the Configure dialog. By default, Wing runs the Python Executable configured in Project Properties with the -m argument to load the checker. This means that the checker must be installed into the selected Python, usually with pip or conda if using Anaconda Python.

Note that some checkers take a long time to run on even moderately sized source files and may consume significant amounts of CPU time. To prevent checks from consuming too many resources, Wing will skip checks on any file above the threshold set in the Maximum File Size option in the external checker's configuration. When a file is skipped, a message will appear briefly in the status area at the bottom of the IDE window.

The configuration page for pylint includes also options for enabling or disabling warnings based on the priority assigned by Pylint (errors, warnings, and informational messages).

Once external checkers have been configured, Wing runs them, parses the output, and merges its warnings into the Code Warnings tool and editor's code warnings indicators. To view the raw output of the checkers that Wing is running, select Show Console from the Options menu in the Code Warnings tool.