PyCharm 2.7.2 Web Help

Although code analysis is performed on-the-fly, you may want to run it for the whole project or a custom scope and examine the results in a friendly view. PyCharm displays inspection results in the Inspection tool window.

Warning

Performing an inspection for a large scope, for example, the whole project, can be time consuming. It is recommended that you break your project into a number of smaller scopes.

To run inspections
  1. Open the desired file in the editor. Alternatively select a file or directory in the Project tool window. The inspection scope will be confined to the opened file or the selection.
  2. On the main menu, choose Code | Inspect Code. The Specify Inspection Scope dialog box opens.
  3. In the Inspection scope area, specify the inspection scope.
    • To have the source code of the entire project inspected, select the Whole Project option.
    • To have the source code of currently opened file, or the file/folder selected in the Project view, select the File/Module <name> option.
    • To apply inspection to a custom scope, select the Custom scope option, then select one of the pre-defined scopes from the drop-down list or click the Browse button browseButton.png and configure your own scope in the Scopes dialog box.
  4. To have test source files inspected too, select the Include test sources check box.
  5. Specify the inspection profile to apply. Do one of the following:
    • Select the desired profile from the Inspection Profile drop-down list.
    • Click the Browse button browseButton.png and configure your own profile in the Inspections dialog box.
  6. Click OK.
  7. Examine inspection results in the Inspection tool window.

    py_inspectionResults

    Each run of an inspection with a certain scope is displayed in its own tab in the tool window. Each group of inspections, for which the problems have been detected, is displayed in the left part of the tab. Click the nodes to review inspection results. Select a specific inspection to see its description in the right pane.

    In the Inspection tool window you can:

Tip

It is also possible to run inspections offline, without starting the IDE. Follow the procedure described in the section Working with PyCharm Features from Command Line.

See Also

Concepts:

Procedures:

Reference:

Web Resources: