TeamCity
 
You are viewing the documentation for an earlier version of TeamCity.

Inspections

Last modified: 20 April 2023

The Inspections Build Runner is intended to run code analysis based on IntelliJ IDEA inspections for your project. IntelliJ IDEA's code analysis engine is capable of inspecting your Java, JavaScript, HTML, XML and other code and allows to:

  • Find probable bugs

  • Locate "dead" code

  • Detect performance issues

  • Improve code structure and maintainability

  • Ensure the code conforms to guidelines, standards and specifications

Refer to IntelliJ IDEA documentation for more details.

This page contains reference information about the Inspections Build Runner fields:

IntelliJ IDEA Project Settings



Unresolved Project Modules and Path Variables



This section is displayed, when an IntelliJ IDEA module file (.iml) referenced from IntelliJ IDEA project file:

  • cannot be found

  • allows you to enter the values of path variables used in the IPR-file.

To refresh values in this section click Check/Reparse Project.

Project JDKs



This section provides the list of JDKs detected in the project.

Java Parameters



Inspection Parameters



In IntelliJ IDEA-based IDEs, the code inspections reported are configured by an inspection profile. When running the inspections in TeamCity you can specify the inspection profile to use. You need to configure the inspection profile in IntelliJ IDEA-based IDE and then specify it in TeamCity.

Please follow these rules when preparing inspection profiles:

  • if your inspection profile uses scopes, make sure the scopes are shared;

  • lock the profile (this ensures that inspections that are present in TeamCity, but not enabled in your IDEA installation will not be run by TeamCity);

  • ensure the profile does not have inspections provided by plugins not included into default IntelliJ IDEA Ultimate distribution (otherwise they will just be ignored by TeamCity);

  • for best results edit the inspection profile in the IntelliJ IDEA of the same version as used by TeamCity (can be looked up in the inspection build log).

The logic of selecting an inspection profile is as follows:

  • if the path to the inspection profile is specified, then profile will be loaded from the file. If the loading fails, inspection runner will fail too.

  • if the name of the inspection profile is specified, the profile is searched for in the project's shared profiles. If there is no such profile, inspection runner will fail.

  • if neither name nor path is specified default profile of the project is used.