FxCop

Contains a task to invoke the FxCop tool

Sample

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
   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})

Nested types and modules

TypeDescription
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 valueDescription
FxCop.run param assemblies
Signature: param:Params -> assemblies:seq<string> -> unit

Run FxCop on a group of assemblies.