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%"
}
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 }
}
Constructors
Functions
Deletes all configured build step conditions
Configures build step conditions
Copies parameters of this object to the specified target
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.
Validates this object and reports found errors to the provided consumer