FAKE - F# Make - A DSL for build tasks and more FAKE
6.1.3

Lookig for older versions of the documentation, pre FAKE v6? See 

v5.fake.build

FxCop Module

Contains a task to invoke the FxCop tool

Example


 Target.create "FxCop" (fun _ ->
            Directory.ensure "./_Reports"
            let rules = [ "-Microsoft.Design#CA1011"   // maybe sometimes
                          "-Microsoft.Design#CA1062" ] // null checks,  In F#!
            !! ("**/bin/Debug/*.dll")
            |> FxCop.run { FxCop.Params.Create() with WorkingDirectory = "."
                                                      UseGAC = true
                                                      Verbose = false
                                                      ReportFileName = "_Reports/FxCopReport.xml"
                                                      Rules = rules
                                                      FailOnError = FxCop.ErrorLevel.Warning
                                                      IgnoreGeneratedCode = true})

Types

Type Description

ErrorLevel

The FxCop error reporting level : warning, critical warning, error, critical error, tool error, don't fail build (Default: DontFailBuild)

Params

Parameter type for the FxCop tool

Functions and values

Function or value Description

FxCop.run param assemblies

Full Usage: FxCop.run param assemblies

Parameters:
    param : Params - The FxCop parameters
    assemblies : seq<string> - Sequence of assemblies to run FxCop against

Run FxCop on a group of assemblies.

param : Params

The FxCop parameters

assemblies : seq<string>

Sequence of assemblies to run FxCop against