Skip to content

Commit

Permalink
cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
isakiev committed Jan 7, 2015
1 parent 706229f commit fa8f6b0
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions src/app/FakeLib/DotCover.fs
Expand Up @@ -12,7 +12,7 @@ type DotCoverReportType =
| Xml = 2
| NDependXml = 3

/// The DotCover parameter type for running coverage
/// The dotCover parameter type for running coverage
type DotCoverParams =
{ ToolPath: string
WorkingDir: string
Expand All @@ -23,16 +23,16 @@ type DotCoverParams =
Filters: string
CustomParameters: string }

/// The DotCover defaeult parameters
/// The dotCover default parameters
let DotCoverDefaults =
{ ToolPath = findToolInSubPath "dotcover.exe" (currentDirectory @@ "tools" @@ "DotCover")
{ ToolPath = findToolInSubPath "dotCover.exe" (currentDirectory @@ "tools" @@ "DotCover")
WorkingDir = ""
TargetExecutable = ""
TargetArguments = ""
TargetWorkingDir = ""
Output = "DotCover.snapshot"
Filters = ""
CustomParameters = "" }
Filters = ""
Output = "dotCoverSnapshot.dcvr"
CustomParameters = "" }

type DotCoverMergeParams =
{ ToolPath: string
Expand All @@ -43,10 +43,10 @@ type DotCoverMergeParams =
CustomParameters: string }

let DotCoverMergeDefaults =
{ ToolPath = findToolInSubPath "dotcover.exe" (currentDirectory @@ "tools" @@ "DotCover")
{ ToolPath = findToolInSubPath "dotCover.exe" (currentDirectory @@ "tools" @@ "DotCover")
WorkingDir = ""
Source = []
Output = "DotCover.snapshot"
Output = "dotCoverSnapshot.dcvr"
TempDir = ""
CustomParameters = "" }

Expand All @@ -59,10 +59,10 @@ type DotCoverReportParams =
CustomParameters: string }

let DotCoverReportDefaults : DotCoverReportParams =
{ ToolPath = findToolInSubPath "dotcover.exe" (currentDirectory @@ "tools" @@ "DotCover")
{ ToolPath = findToolInSubPath "dotCover.exe" (currentDirectory @@ "tools" @@ "DotCover")
WorkingDir = ""
Source = ""
Output = "DotCover.xml"
Output = "dotCoverReport.xml"
ReportType = DotCoverReportType.Xml
CustomParameters = "" }

Expand Down Expand Up @@ -109,58 +109,58 @@ let buildParamsAndExecute parameters buildArguments toolPath workingDir =
info.Arguments <- args) TimeSpan.MaxValue
if result <> 0 then failwithf "Error running %s" toolPath

/// Runs the DotCover "cover" command, using a target executable (such as NUnit or MSpec) and generates a snapshot file.
/// Runs the dotCover "cover" command, using a target executable (such as NUnit or MSpec) and generates a snapshot file.
///
/// ## Parameters
///
/// - `setParams` - Function used to overwrite the DotCover default parameters.
/// - `setParams` - Function used to overwrite the dotCover default parameters.
let DotCover (setParams: DotCoverParams -> DotCoverParams) =
let parameters = (DotCoverDefaults |> setParams)
buildParamsAndExecute parameters buildDotCoverArgs parameters.ToolPath parameters.WorkingDir

/// Runs the DotCover "merge" command. This combines dotCover snaphots into a single
/// Runs the dotCover "merge" command. This combines dotCover snaphots into a single
/// snapshot, enabling you to merge test coverage from multiple test running frameworks
/// ## Parameters
///
/// - `setParams` - Function used to overwrite the DotCover merge default parameters.
/// - `setParams` - Function used to overwrite the dotCover merge default parameters.
///
/// ## Sample
///
/// DotCoverMerge (fun p -> { p with
/// Source = [artifactsDir @@ "NUnitDotCover.snapshot"
/// artifactsDir @@ "MSpecDotCover.snapshot"]
/// Output = artifactsDir @@ "DotCover.snapshot" })
/// Source = [artifactsDir @@ "NUnitDotCoverSnapshot.dcvr"
/// artifactsDir @@ "MSpecDotCoverSnapshot.dcvr"]
/// Output = artifactsDir @@ "dotCoverSnapshot.dcvr" })
let DotCoverMerge (setParams: DotCoverMergeParams -> DotCoverMergeParams) =
let parameters = (DotCoverMergeDefaults |> setParams)
buildParamsAndExecute parameters buildDotCoverMergeArgs parameters.ToolPath parameters.WorkingDir

/// Runs the DotCover "report" command. This generates a report from a DotCover snapshot
/// Runs the dotCover "report" command. This generates a report from a dotCover snapshot
/// ## Parameters
///
/// - `setParams` - Function used to overwrite the DotCover report default parameters.
/// - `setParams` - Function used to overwrite the dotCover report default parameters.
///
/// ## Sample
///
/// DotCoverReport (fun p -> { p with
/// Source = artifactsDir @@ "DotCover.snapshot"
/// Output = artifactsDir @@ "DotCover.xml"
/// Source = artifactsDir @@ "dotCoverSnapshot.dcvr"
/// Output = artifactsDir @@ "dotCoverReport.xml"
/// ReportType = DotCoverReportType.Xml })
let DotCoverReport (setParams: DotCoverReportParams -> DotCoverReportParams) =
let parameters = (DotCoverReportDefaults |> setParams)
buildParamsAndExecute parameters buildDotCoverReportArgs parameters.ToolPath parameters.WorkingDir

/// Runs the DotCover "cover" command against the NUnit test runner.
/// Runs the dotCover "cover" command against the NUnit test runner.
/// ## Parameters
///
/// - `setDotCoverParams` - Function used to overwrite the DotCover report default parameters.
/// - `setDotCoverParams` - Function used to overwrite the dotCover report default parameters.
/// - `setNUnitParams` - Function used to overwrite the NUnit default parameters.
///
/// ## Sample
///
/// !! (buildDir @@ buildMode @@ "/*.Unit.Tests.dll")
/// |> DotCoverNUnit
/// (fun dotCoverOptions -> { dotCoverOptions with
/// Output = artifactsDir @@ "NUnitDotCover.snapshot" })
/// Output = artifactsDir @@ "NUnitDotCoverSnapshot.dcvr" })
/// (fun nUnitOptions -> { nUnitOptions with
/// DisableShadowCopy = true })
let DotCoverNUnit (setDotCoverParams: DotCoverParams -> DotCoverParams) (setNUnitParams: NUnitParams -> NUnitParams) (assemblies: string seq) =
Expand All @@ -179,18 +179,18 @@ let DotCoverNUnit (setDotCoverParams: DotCoverParams -> DotCoverParams) (setNUni

traceEndTask "DotCoverNUnit" details

/// Runs the DotCover "cover" command against the MSpec test runner.
/// Runs the dotCover "cover" command against the MSpec test runner.
/// ## Parameters
///
/// - `setDotCoverParams` - Function used to overwrite the DotCover report default parameters.
/// - `setDotCoverParams` - Function used to overwrite the dotCover report default parameters.
/// - `setMSpecParams` - Function used to overwrite the MSpec default parameters.
///
/// ## Sample
///
/// !! (buildDir @@ buildMode @@ "/*.Unit.Tests.dll")
/// |> DotCoverMSpec
/// (fun dotCoverOptions -> { dotCoverOptions with
/// Output = artifactsDir @@ "MSpecDotCover.snapshot" })
/// Output = artifactsDir @@ "MSpecDotCoverSnapshot.dcvr" })
/// (fun mSpecOptions -> { mSpecOptions with
/// Silent = true })
let DotCoverMSpec (setDotCoverParams: DotCoverParams -> DotCoverParams) (setMSpecParams: MSpecParams -> MSpecParams) (assemblies: string seq) =
Expand Down

0 comments on commit fa8f6b0

Please sign in to comment.