Inspections

Documentation Index

Inspections

This page contains reference information about the Inspections Build Runner fields. This runner is intended for gathering inspection results in the IntelliJ IDEA or Maven2 projects.

Option Description
Build runner Select Inspections from the drop-down list. This runner is used for gathering IntelliJ IDEA inspections results.

IntelliJ IDEA Project Settings

Option Description
Project file type Select a radio button to choose the type of the project (IntelliJ IDEA or Maven2).

Path to the project file
Use this field to specify the path to the project file (.ipr or pom.xml). This build runner requires this file to understand the structure of the project.
Specified path can be relative to the project root directory or absolute. If the path is absolute, the project file should be accessible under this path on the server and on each of the build agents.
Detect global libraries and module-based JDK in *.iml files
If this option is checked, the form all of 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.
Warning
When this opinion is selected, the process of opening and saving the build runner becomes settings may become time-consuming, because it involves loading and parsing all project module files.

Unresolved Project Modules and Path Variables

This section displays messages when an IntelliJ IDEA module file (.iml) referenced from IPR file cannot be found as well as allows you to enter the values of path variables used in the IPR file. You may want to click the Save button to refresh values in this section.

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 file.

Option Description
JDK Home
Use this field to specify JDK home for the project.
When building with the Ipr runner, this JDK will be used to compile the sources of corresponding IDEA modules. For Inspections and Duplicate Finder builds, this JDK will be used internally to resolve the Java API used in your project.
To run the build process itself the JDK specified in the JAVA_HOME environment variable will be used.
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:
jre/lib/*.jar
For Mac OS X, use the following lines:
lib/*.jar

../Classes/*.jar
IDEA Home
If your project uses the IDEA JDK, specify the location of IDEA's 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.

You can use references to external properties when defining the values, like %system.idea_home% or %env.JDK_1_3%. This will add a requirement for the corresponding property.

Project Global Libraries

This section appears if your project has references to global libraries (option Detect global libraries and module-based JDK in *.iml files should be enabled).

Option Description
Path to Library Use this field to specify root directory which contains library jar files.
Library Jar Files Patterns Click this link to open a text area, where you can define templates for the jar files of the library (default *.jar)

You can use references to external properties when defining the values, like %env.CATALINA_BASE%. This will add a requirement for the corresponding property.

JVM Settings

Option Description
JVM command line parameters Specify the desired Java Virtual Machine parameters, such as maximum heap size or parameters that enable remote debugging. These settings are passed to the JVM used to run your build.
Example:
-Xmx512m -Xms256m

Additional Pre Processing (Ant)

Option Description
Run before build In the appropriate fields, enter the Ant scripts and targets (optional) that you want to run prior to starting the build. The path to the Ant file should be relative to the project root directory.

Inspections Parameters

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 file *.ipr, 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.
Errors limit
Fail build if specified number of errors exceeded. By default first error that occurs will fail the build.
Warnings limit
Fail build if specified number of warnings exceeded. Leave blank if there is no limit.

If you need to restrict the sources scope on which to tun the Inspections runner, you can specify additional JVM paramenters (in the JVM command line parameters field).

Example:

-Didea.exclude.patterns=testData/**;testdata/**;help/**;test/**;maverick/**;src/tips/**;[testData]/**
-Didea.include.patterns=testData/tables/**
  • all patters must end with either ** or * (this effectively limits the patterns to only the directories level, they do not support file-level patterns)
  • includes have precedence over excludes
  • references to modules can be included as [module_name]/<path_within_module>
  • "include" pattern has a special behaviour (due to underlying limitations): it includes the directory specified and all the files residing directly in the directories above the one specified. (in the example above, testData/basicTest.xml file will be included into the analysis)

Labels

 
(None)