PyCharm 3.1.0 Web Help

2.0+

View | Tool Windows | Inspection

Note

  • You can access the tool window this way only when it is already opened through Code | Inspect Code.
  • After you deactivate the tool window manually by clicking the Close button close.png, the tool window is again available only through Code | Inspect Code.

The Inspection tool window displays inspection results in separate tabs. The left pane of each tab shows a tree view of the inspections, for which the problems are reported; the right pane shows summary information on each inspection.

In this topic:

Toolbar buttons

Item Shortcut Description
img Ctrl+F5Ctrl+F5Ctrl+5Ctrl+F5Ctrl+F5Ctrl+Alt+RCtrl+F5Ctrl+F5Command RControl F5Command R Click this button to execute inspection and show results in the same tab.
img Ctrl+Shift+F4Ctrl+Shift+F4Ctrl+Shift+4Ctrl+Shift+F4Ctrl+Shift+F4Ctrl+Shift+F4Ctrl+Shift+F4Ctrl+WControl Shift F4Shift Command F4Command W Click this button to close active tab.
img Ctrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCommand NumPad or Command EqualsCommand NumPad or Command EqualsCommand NumPad or Command Equals Expand all nodes
img Ctrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCommand NumPad - or Command MinusCommand NumPad - or Command MinusCommand NumPad - or Command Minus Collapse all nodes
img Ctrl+Alt+DownShift+Alt+DownCtrl+Alt+DownCtrl+Alt+DownCtrl+Alt+DownCtrl+Alt+DownAlt+DownCtrl+Alt+DownAlt Command DownAlt Command DownAlt Command Down Navigate to the next item.
img Ctrl+Alt+UpShift+Alt+UpCtrl+Alt+UpCtrl+Alt+UpCtrl+Alt+UpCtrl+Alt+UpAlt+UpCtrl+Alt+UpAlt Command UpAlt Command UpAlt Command Up Navigate to the previous item.
img Toggle the Autoscroll to source mode. When the button is pressed, every time the node is focused, the corresponding line of source code is highlighted in the editor.
2.7+ exportToTextFile Click this button to export inspection results in XML or HTML format.
img F1F1F1F1F1F1F1F1ContextHelpF1ContextHelp Show reference.
img If this button is pressed, the problems reported by the code inspection are grouped into Errors and Warnings. Otherwise, the problems are grouped by inspections.
img If this button is pressed, the items show under the corresponding directory nodes.
img When this button is pressed, the resolved and excluded items to not display in the tool window.
img If you run inspections several times in the same tab, press this button to filter differences.
img If you run inspections several times in the same tab, press this button to hide items that did not change since the previous inspection.
img Click this button to edit the current inspection settings.
img img Alt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+Enter, Shift+Alt+J or Ctrl+Shift+MAlt EnterAlt EnterCommand 1 Click this button to resolve the problem for the selected inspection item, by choosing one of the available quick fixes from the list.
img Click this button to disable, suppress of run the selected inspection.

Context menu commands

Item Shortcut Description
Jump to Source F4F4F4F4F4F4F4F12 or Ctrl+Shift+ECommand Down or F4F4F3 Open in the editor the file that contains the selected problem, and place the caret at the beginning of the respective code fragment.
Find Usages Alt+F7Shift+Alt+7Shift+Alt+7Alt+F7Alt+F7 or Shift+Alt+SShift+Alt+F7Alt+F7Ctrl+GAlt F7Alt F7Shift Command G Search for usages of the selected file.
Exclude DeleteDeleteDeleteDeleteDelete or Ctrl+DDeleteDeleteDeleteDelete or BackspaceDeleteDelete or Backspace Exclude the selected items from further examination. Excluded nodes are marked with a strikethrough. If the filter button img is pressed, the excluded nodes are hidden.
Include InsertInsertInsertInsertInsertInsertInsertInsertShift BackspaceInsertShift Backspace Include previously excluded items to the list of results. All nested subelements are included too.
img img Alt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+EnterAlt+Enter, Shift+Alt+J or Ctrl+Shift+MAlt EnterAlt EnterCommand 1 Accept one of the suggested solutions to fix the problem.
Edit Settings Change settings for the selected inspection, or group of inspections, in the Errors dialog.
Disable inspection Disable alerts for the selected inspection in the active tab of results. If the filter button img is pressed, the nodes for disabled inspections are hidden.

You can also disable an inspection in general.

Run inspection on Rerun the selected inspection and display results in a new tab.
Suppress problem/
Suppress problem for class
Suppress inspection for the selected problem in general, or for the selected class.
Local history Perform local history actions.

Inspection results report

The inspection results report appears in the right pane of the results tab, when an inspection node is selected in the left pane. The report includes the following sections:

  • Name: this is the name of the class or member where the problem has been detected.
  • Location: this is a hyperlink to the class, where the problem has been detected.
  • Problem synopsis: shows a brief description of the problem.
  • Problem resolution: this optional field provides a list of possible solutions. Clicking a hyperlink invokes the corresponding action. If no hyperlinks are present, it means that you have to fix the problem yourself.

See Also

Concepts:

Reference:

Getting Started:

Web Resources: