IdeaDuplicates
The Duplicates Finder (Java) build runner is intended for catching similar code fragments and providing a report on discovered repetitive blocks of Java code.
Example. Adds a Duplicates Finder (Java) build step with custom JVM setup, default IDEA tool, include/exclude patterns and disabled plugins. This build step will run even if some previous build steps are failed.
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
ideaDuplicates {
name = "My Duplicates 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 = "-Xmx1G -XX:ReservedCodeCacheSize=512m"
targetJdkHome = "%env.JDK_11%"
ideaAppHome = "%teamcity.tool.intellij.DEFAULT%"
lowerBound = 10
discardCost = 0
distinguishVariables = true
distinguishFields = true
distinguishMethods = true
distinguishTypes = true
distinguishLiterals = true
extractSubexpressions = true
includeTestSources = true
includeExcludePatterns = """
+:pattern1
-:pattern2
""".trimIndent()
disabledPlugins = "disabled_plugin1"
}
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