IdeaInspections

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%"
}









}
}




*/

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"
}



















}
}




*/

Constructors

Link copied to clipboard
constructor(init: IdeaInspections.() -> Unit = {})

Properties

Link copied to clipboard

Optional collection of build step execution conditions

Link copied to clipboard
var disabledPlugins: <Error class: unknown class>

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.

Link copied to clipboard

Specifies whether the step is enabled, true by default

Link copied to clipboard
Link copied to clipboard
var id: String?

Optional id of the step. Usually the id is not required, however if a build configuration inherits from a template and wants to override a build step defined there, then both steps should have the same id.

Link copied to clipboard
var ideaAppHome: <Error class: unknown class>

IntelliJ Inspections and Duplicates Engine Home path

Link copied to clipboard
var includeExcludePatterns: <Error class: unknown class>

Newline-delimited set or rules in the form of +:|-:pattern

Link copied to clipboard
var jvmArgs: <Error class: unknown class>

JVM command line parameters which are passed by the JVM used to run your build

Link copied to clipboard

Build step name

Link copied to clipboard
Link copied to clipboard

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.

Link copied to clipboard
var profileName: <Error class: unknown class>

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.

Link copied to clipboard
var profilePath: <Error class: unknown class>

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.

Link copied to clipboard
var targetJdkHome: <Error class: unknown class>

The path to your custom JDK used to run the build

Link copied to clipboard

Build step type

Functions

Link copied to clipboard
fun booleanParameter(customName: String? = null, trueValue: String? = "true", falseValue: String? = "false"): <Error class: unknown class><Parametrized, <Error class: unknown class><Parametrized, T?>>
Link copied to clipboard
fun clear()
Link copied to clipboard

Deletes all configured build step conditions

Link copied to clipboard
fun <T : CompoundParam<T>> compoundParameter(customName: String? = null): <Error class: unknown class><Parametrized, <Error class: unknown class><Parametrized, T?>>
Link copied to clipboard
Link copied to clipboard
fun <T : Parametrized> copyParamsTo(target: T): T

Copies parameters of this object to the specified target

Link copied to clipboard
open fun create(): BuildStep

Creates an instance of this build step via reflection using a no argument constructor, used during copying. Throws an error if this class doesn't have a default constructor. Subclasses can override it to create an instance without using a default constructor.

Link copied to clipboard
fun doubleParameter(customName: String? = null): <Error class: unknown class><Parametrized, <Error class: unknown class><Parametrized, T?>>
Link copied to clipboard
fun <E : Enum<E>> enumParameter(customName: String? = null, mapping: Map<E, String?>? = null): <Error class: unknown class><Parametrized, <Error class: unknown class><Parametrized, T?>>
Link copied to clipboard
fun findRawParam(paramName: String): Parameter?
Link copied to clipboard
fun hasParam(paramName: String): Boolean
Link copied to clipboard
Link copied to clipboard
fun intParameter(customName: String? = null): <Error class: unknown class><Parametrized, <Error class: unknown class><Parametrized, T?>>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun param(name: String, value: String)

Adds parameter with specified name and value

Link copied to clipboard
Link copied to clipboard
fun removeRawParam(paramName: String)
Link copied to clipboard
Link copied to clipboard
open fun stringParameter(customName: String? = null): <Error class: unknown class><Parametrized, <Error class: unknown class><Parametrized, T?>>
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun validate(consumer: ErrorConsumer)

Validates this object and reports found errors to the provided consumer