FxCopStep

open class FxCopStep : BuildStep
fun BuildSteps.fxCop(init: FxCopStep.() -> Unit): FxCopStep

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
fun FxCopStep(init: FxCopStep.() -> Unit)
Link copied to clipboard
fun FxCopStep()

Types

Link copied to clipboard
sealed class FxCopInstallation : CompoundParam<FxCopStep.FxCopInstallation>
Link copied to clipboard
enum FxCopVersion : Enum<FxCopStep.FxCopVersion>
Link copied to clipboard
sealed class InspectionSource : CompoundParam<FxCopStep.InspectionSource>

Functions

Link copied to clipboard
Link copied to clipboard
fun auto(init: FxCopStep.FxCopInstallation.Auto.() -> Unit = {}): FxCopStep.FxCopInstallation.Auto

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><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 intParameter(customName: String? = null): <ERROR CLASS><Parametrized, <ERROR CLASS><Parametrized, T?>>
Link copied to clipboard
fun manual(init: FxCopStep.FxCopInstallation.Manual.() -> Unit = {}): FxCopStep.FxCopInstallation.Manual

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 project(init: FxCopStep.InspectionSource.Project.() -> Unit = {}): FxCopStep.InspectionSource.Project
Link copied to clipboard
fun removeRawParam(paramName: String)
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 additionalOptions: <ERROR 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
var conditions: BuildStepConditions

Optional collection of build step execution conditions

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 failOnAnalysisError: <ERROR 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>

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? = 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 ignoreGeneratedCode: <ERROR CLASS>

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

Link copied to clipboard
var inspectionSource: <ERROR CLASS>
Link copied to clipboard
var name: String

Build step name

Link copied to clipboard
val params: List<Parameter>
Link copied to clipboard
var reportXSLTFile: <ERROR 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>

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>

Search the assemblies referenced by targets in Global Assembly Cache.

Link copied to clipboard
var type: String

Build step type