Skip to content

Commit

Permalink
Fix reportgenerator docs, fixes #2535
Browse files Browse the repository at this point in the history
  • Loading branch information
matthid committed Sep 3, 2020
1 parent f2d76ff commit 206ea55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
18 changes: 4 additions & 14 deletions help/markdown/testing-reportgenerator.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,20 @@ See https://github.com/danielpalme/ReportGenerator
## Minimal working example

```fsharp
"#r "paket:
"#r paket:
nuget Fake.Core.Target
nuget Fake.Testing.ReportGenerator"
open Fake.Core
open Fake.Core.TargetOperators
open Fake.Testing
...
Target.create "Generate Reports" (fun _ ->
let parameters p = { p with TargetDir = "c:/reports/" }
!! "**/opencover.xml"
|> ReportGenerator.generateReports parameters
|> Seq.toList
|> ReportGenerator.generateReports (fun p -> { p with TargetDir = "c:/reports/" })
)
Target.create "Default" DoNothing
"Clean"
==> "SetAssemblyInfo"
==> "Build"
==> "RunCoverage"
==> "Generate Reports"
==> "Default"
Target.runOrDefault "Default"
Target.runOrDefault "Generate Reports"
```
6 changes: 3 additions & 3 deletions src/app/Fake.Testing.ReportGenerator/ReportGenerator.fs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
/// open Fake.Testing
///
/// Target.create "Generate Reports" (fun _ ->
/// let parameters p = { p with TargetDir = "c:/reports/" }
/// !! "**/opencover.xml"
/// |> ReportGenerator.generateReports parameters
/// |> Seq.toList
/// |> ReportGenerator.generateReports (fun p -> { p with TargetDir = "c:/reports/" })
/// )
/// ```
[<RequireQualifiedAccess>]
Expand Down Expand Up @@ -158,7 +158,7 @@ let internal createProcess setParams (reports : string seq) =
///
/// - `setParams` - Function used to overwrite the default ReportGenerator parameters.
/// - `reports` - Coverage reports.
let generateReports setParams (reports : string list) =
let generateReports setParams (reports : string seq) =
use __ = Trace.traceTask "ReportGenerator" "Generating reports"

match reports with
Expand Down

0 comments on commit 206ea55

Please sign in to comment.