FxCopStep

open class FxCopStep : BuildStep

An FxCop build step is intended for inspecting .NET assemblies and reporting possible design, localization, performance, and security improvements.

Example. Runs FxCop for the specified assembly files and reports inspections results to the TeamCity server. The location of the FxCop installation on the agent is determined automatically.

buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
        fxCop {
fxCopInstallation = auto {
version = FxCopStep.FxCopVersion.v16_0
}
inspectionSource = assemblies {
files = "build/*.dll"
}
}






}
}




*/

See also

Constructors

Link copied to clipboard
constructor(init: FxCopStep.() -> Unit)
constructor()

Types

Properties

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

Additional options for calling FxCopCmd executable. All entered options will be added to the beginning of the command line parameters.

Link copied to clipboard

Optional collection of build step execution conditions

Link copied to clipboard

Specifies whether the step is enabled, true by default

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

Fails build on analysis errors from FxCop such as: ANALYSIS_ERROR, ASSEMBLY_LOAD_ERROR, ASSEMBLY_REFERENCES_ERROR, PROJECT_LOAD_ERROR, RULE_LIBRARY_LOAD_ERROR, UNKNOWN_ERROR, OUTPUT_ERROR

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

When a build agent is started, it detects automatically whether FxCop is installed. If FxCop is detected, TeamCity defines the %system.FxCopRoot% agent system property. You can also use a custom installation of FxCop or the use FxCop checked in your version control.

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 ignoreGeneratedCode: <Error class: unknown class>

Sets /ignoregeneratedcode for FxCopCmd (note: it's supported since FxCop 1.36). Speeds up inspection.

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

Build step name

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

The path to the XSLT transformation file relative to the Build Checkout Directory or absolute on the agent machine. You can use the path to the detected FxCop on the target machine (i.e. %system.FxCopRoot%/Xml/FxCopReport.xsl). When the Report XSLT file option is set, the build runner will apply an XSLT transform to FxCop XML output and display the resulting HTML in a new FxCop tab on the build results page.

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

Search the assemblies referenced by targets in the specified directories separated by spaces. Sets /d: options for FxCopCmd

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

Search the assemblies referenced by targets in Global Assembly Cache.

Link copied to clipboard

Build step type

Functions

Link copied to clipboard

Select to use the FxCop installation on an agent.

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
fun intParameter(customName: String? = null): <Error class: unknown class><Parametrized, <Error class: unknown class><Parametrized, T?>>
Link copied to clipboard

Select to use a custom installation of FxCop (not the autodetected one), or if you do not have FxCop installed on the build agent (for example, you can place the FxCop tool in your source control, and check it out with the build sources).

Link copied to clipboard
fun param(name: String, value: String)

Adds parameter with specified name and value

Link copied to clipboard
fun removeRawParam(paramName: String)
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