Idea Inspections
The Inspections (IntelliJ IDEA) build runner is intended to run code analysis based on IntelliJ IDEA inspections for your project.
Example. Adds a simple Inspections (IntelliJ IDEA) build step with project JDK setup, default bundled IDEA and JVM settings, default inspection profile and patterns.
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
ideaInspections {
name = "My Inspections step"
pathToProject = ""
jdk {
name = "13"
path = "%env.JDK_13_0%"
patterns("jre/lib/*.jar", "jre/lib/ext/jfxrt.jar")
extAnnotationPatterns("%teamcity.tool.idea%/lib/jdkAnnotations.jar")
}
ideaAppHome = "%teamcity.tool.intellij.DEFAULT%"
}
Content copied to clipboard }
}
Example. Adds an Inspections (IntelliJ IDEA) build step with custom JVM setup, custom IDEA tool, include/exclude patterns and profile. This build step will run even if some previous build steps are failed.
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
ideaInspections {
name = "My Inspections Step"
executionMode = BuildStep.ExecutionMode.RUN_ON_FAILURE
pathToProject = ""
jdk {
name = "13"
path = "%env.JDK_13_0%"
patterns("jre/lib/*.jar", "jre/lib/ext/jfxrt.jar")
extAnnotationPatterns("%teamcity.tool.idea%/lib/jdkAnnotations.jar")
}
jvmArgs = "-Xmx1024m -XX:ReservedCodeCacheSize=512m"
targetJdkHome = "%env.JDK_11%"
ideaAppHome = "%teamcity.tool.intellij.ideaIU-2022.2.3%"
includeExcludePatterns = """
+:pattern1
-:pattern2
""".trimIndent()
disabledPlugins = "disabled_plugin1"
profileName = "my_profile"
profilePath = "path/to/profile"
}
Content copied to clipboard }
}
Properties
Optional collection of build step execution conditions
List of identifiers of IntelliJ IDEA disabled plugins. If plugin is disabled it won't be loaded when IntelliJ IDEA starts on the agent. Please refer to ${user.home}/.IntelliJIdea/config/disabled_plugins.txt on the machine where IntelliJ IDEA is installed for an example of such a list.
Build step execution mode
IntelliJ Inspections and Duplicates Engine Home path
Newline-delimited set or rules in the form of +:|-:pattern
The path to the project file (.ipr) or path to the project directory (root directory of the project that contains .idea directory). The path should be relative to the checkout directory.
Name of the desired shared project profile. If the field is left blank and no profile path is specified, the default project profile will be used.
Specify the path to inspections profiles file relative to the project root directory. Use this field only if you do not want to use the shared project profile specified in profileName.
The path to your custom JDK used to run the build
Functions
Deletes all configured build step conditions
Configures build step conditions
Copies parameters of this object to the specified target
Validates this object and reports found errors to the provided consumer