IntelliJ IDEA 13.1 Web Help

Although code analysis is performed on-the-fly in all open files, you may want to run it for the whole project or a custom scope and examine the results in a friendly view.

Note

  • Inspecting code in a large scope, for example, the whole project, can be time consuming. For large projects, it is recommended to create a number of smaller scopes and run analysis in each of them separately.
  • If you do not want to have some code issues in the analysis report, you can disable some inspections.
To run code inspection
  1. Open the desired file in the editor. Alternatively select files or directories in the Project tool window. For multiple selection, click the items holding down the Ctrl key. The initial inspection scope will be confined to the opened file or the selection.
  2. On the main menu, choose Analyze | Inspect Code . The Specify Inspection Scope dialog box opens.
  3. In the Inspection scope area, specify which files should be inspected.
    • To have the source code of the entire project inspected, select the Whole Project option.
    • If you are using version control integration, you can choose to only inspect uncommitted files.
    • To have the source code of currently opened file, or the file(s)/folder(s) selected in the Project view, select the File/Module <name> option.
    • To apply inspect code in a specific scope, select the Custom scope option, then choose the desired scope from the drop-down list or click the Browse button browseButton and configure a new 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:
  6. Click OK to run code analysis.
  7. Examine results in the Inspection window.

img

Tip

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

See Also

Concepts:

Procedures:

Reference:

Web Resources: