IdeaInspections

open class IdeaInspections : IdeaSettingsBasedRunner
fun BuildSteps.ideaInspections(init: IdeaInspections.() -> Unit = {})

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
fun IdeaInspections(init: IdeaInspections.() -> Unit = {})

Functions

Link copied to clipboard
fun androidsdk(init: IdeaSettingsBasedRunner.IdeaSettings.AndroidSdk.() -> Unit)
Link copied to clipboard
fun booleanParameter(    customName: String? = null,     trueValue: String? = "true",     falseValue: String? = "false"): <ERROR CLASS><Parametrized, <ERROR CLASS><Parametrized, T?>>
Link copied to clipboard
fun clear()
Link copied to clipboard
fun clearConditions()

Deletes all configured build step conditions

Link copied to clipboard
fun <T : CompoundParam<T>> compoundParameter(customName: String? = null): <ERROR CLASS><Parametrized, <ERROR CLASS><Parametrized, T?>>
Link copied to clipboard
fun conditions(init: BuildStepConditions.() -> Unit = {})
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><Parametrized, <ERROR CLASS><Parametrized, T?>>
Link copied to clipboard
fun <E : Enum<E>> enumParameter(customName: String? = null, mapping: Map<E, String?>? = null): <ERROR CLASS><Parametrized, <ERROR 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
fun ideajdk(init: IdeaSettingsBasedRunner.IdeaSettings.IdeaJdk.() -> Unit)
Link copied to clipboard
fun intParameter(customName: String? = null): <ERROR CLASS><Parametrized, <ERROR CLASS><Parametrized, T?>>
Link copied to clipboard
fun jdk(init: IdeaSettingsBasedRunner.IdeaSettings.Jdk.() -> Unit)
Link copied to clipboard
fun library(init: IdeaSettingsBasedRunner.IdeaSettings.Library.() -> Unit)
Link copied to clipboard
fun param(name: String, value: String)

Adds parameter with specified name and value

Link copied to clipboard
fun pathvars(init: IdeaSettingsBasedRunner.IdeaSettings.PathVariables.() -> Unit)
Link copied to clipboard
fun removeRawParam(paramName: String)
Link copied to clipboard
fun sdk(init: IdeaSettingsBasedRunner.IdeaSettings.Sdk.() -> Unit)
Link copied to clipboard
open fun stringParameter(customName: String? = null): <ERROR CLASS><Parametrized, <ERROR 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

Properties

Link copied to clipboard
var conditions: BuildStepConditions

Optional collection of build step execution conditions

Link copied to clipboard
var disabledPlugins: <ERROR 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
var enabled: Boolean = true

Specifies whether the step is enabled, true by default

Link copied to clipboard
var executionMode: BuildStep.ExecutionMode

Build step execution mode

Link copied to clipboard
var id: String? = null

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>

IntelliJ Inspections and Duplicates Engine Home path

Link copied to clipboard
var includeExcludePatterns: <ERROR CLASS>

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

Link copied to clipboard
var jvmArgs: <ERROR CLASS>

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

Link copied to clipboard
var name: String

Build step name

Link copied to clipboard
val params: List<Parameter>
Link copied to clipboard
var pathToProject: String

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>

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>

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>

The path to your custom JDK used to run the build

Link copied to clipboard
var type: String

Build step type