Inspections
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
Option | Description |
|---|---|
Project file type | To be able to run IntelliJ IDEA inspections on your code, TeamCity requires either IntelliJ IDEA project file/directory, or Maven2 pom.xml to be specified here. |
Path to the project | Depending on what type of project you have selected in the Project file type, specify here:
|
Detect global libraries and module-based JDK in the *.iml files | This option is available, if you use IntelliJ IDEA project to run the inspections. In IntelliJ IDEA module settings are stored in *.iml files, thus if this option is checked, all the module files will be automatically scanned for references to the global libraries and module JDKs when saved. This helps you ensure all references will be properly resolved. |
Check/Reparse Project | Click this button to reparse your Maven2/IntelliJ IDEA project and import build settings right from the project, for example the list of JDKs. |
Working directory | Enter a path to a build working directory, if it differs from the build checkout directory. Optional, specify if differs from the checkout directory. |
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.
Option | Description |
|---|---|
<path_variable_name> | This field appears, if the project file contains path macros, defined in the Path Variables dialog of IntelliJ IDEA's Settings dialog. In the Set value to field, specify a path to project resources, to be used on different build agents. |
Project JDKs
This section provides the list of JDKs detected in the project.
Option | Description |
|---|---|
JDK Home | Use this field to specify JDK home for the project. |
JDK Jar File Patterns | Click this link to open a text area, where you can define templates for the jar files of the project JDK. Use Ant rules to define the jar file patterns. The default value is used for Linux and Windows operating systems: For Mac OS X, use the following lines: |
IDEA Home | If your project uses the IDEA JDK, specify the location of IDEA home directory |
IDEA Jar Files Patterns | Click this link to open a text area, where you can define templates for the jar files of the IDEA JDK. |
Java Parameters
Option | Description |
|---|---|
JDK home path | Use this field to specify the path to your custom JDK which should be used to run the build. If the field is left blank, the path to JDK Home is read either from the |
JVM command line parameters | Specify the desired Java Virtual Machine parameters, for example maximum heap size. These settings are passed to the JVM used to run your build. Example: |
Inspection Parameters
In IntelliJ IDEA, an inspection profile is a customized set of inspections tied to a project. Regardless of project type you use, it has to contain configured inspection profiles to enable inspections running on TeamCity.
Option | Description |
|---|---|
Inspections profile path | Use this text field to specify the path to inspections profiles file relative to the project root directory. By default, the profile path is specified in the IntelliJ IDEA project files, and the field is left blank. Use this field, if you want to override project profile mapping. |
Inspections profile name | Select the name of the desired shared profile from the combo box. By default, the name is unspecified, which means that project modules will be inspected according to their own settings. |
Maximum error limit | Fail build if the specified number of errors is exceeded. By default first error that occurs will fail the build. |
Warnings limit | Fail build if the specified number of warnings is exceeded. Leave blank if there is no limit. |