Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 5.18.3 #2421

Merged
merged 5 commits into from
Nov 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes

## 5.18.3 - 2019-11-04

* BUGFIX: `Fake.DotNet.Testing.Coverlet` was not working, thanks @Tarmil - https://github.com/fsharp/FAKE/pull/2424

## 5.18.2 - 2019-10-26

* NEW: Add `Fake.DotNet.Testing.Coverlet`, thanks @Tarmil - https://github.com/fsharp/FAKE/pull/2413
Expand Down
24 changes: 12 additions & 12 deletions src/app/Fake.DotNet.Testing.Coverlet/Coverlet.fs
Original file line number Diff line number Diff line change
Expand Up @@ -89,28 +89,28 @@ let withMSBuildArguments (param: CoverletParams -> CoverletParams) (args: MSBuil
let param = param defaults
let properties =
[
"CollectCoverage", "true"
"OutputFormat", outputFormatToString param.OutputFormat
"CoverletOutput", param.Output
yield "CollectCoverage", "true"
yield "OutputFormat", outputFormatToString param.OutputFormat
yield "CoverletOutput", param.Output
if not (List.isEmpty param.Include) then
"Include", namespacesToString param.Include
yield "Include", namespacesToString param.Include
if not (List.isEmpty param.Exclude) then
"Exclude", namespacesToString param.Exclude
yield "Exclude", namespacesToString param.Exclude
if not (List.isEmpty param.ExcludeByAttribute) then
"ExcludeByAttribute", String.concat "," param.ExcludeByAttribute
yield "ExcludeByAttribute", String.concat "," param.ExcludeByAttribute
if not (List.isEmpty param.ExcludeByFile) then
"ExcludeByFile", String.concat "," param.ExcludeByFile
yield "ExcludeByFile", String.concat "," param.ExcludeByFile
match param.MergeWith with
| Some f -> "MergeWith", f
| Some f -> yield "MergeWith", f
| None -> ()
match param.Threshold with
| Some t ->
"Threshold", string t
"ThresholdType", thresholdTypeToString param.ThresholdType
"ThresholdStat", thresholdStatToString param.ThresholdStat
yield "Threshold", string t
yield "ThresholdType", thresholdTypeToString param.ThresholdType
yield "ThresholdStat", thresholdStatToString param.ThresholdStat
| None -> ()
if param.UseSourceLink then
"UseSourceLink", "true"
yield "UseSourceLink", "true"
]
{ args with Properties = args.Properties @ properties }

Expand Down
10 changes: 6 additions & 4 deletions src/test/Fake.Core.UnitTests/Fake.DotNet.Testing.Coverlet.fs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ let tests =
ThresholdStat = Coverlet.ThresholdStat.Total
UseSourceLink = true
})
Expect.containsAll [
Expect.isTrue (props.Length > 0) "Result should contain some elements"
Expect.containsAll props [
"CollectCoverage", "true"
"CoverletOutput", "coverage.json"
"OutputFormat", "cobertura"
Expand All @@ -47,13 +48,14 @@ let tests =
"ThresholdType", "branch"
"ThresholdStat", "total"
"UseSourceLink", "true"
] props "expected proper MSBuild properties"
] "expected proper MSBuild properties"

testCase "Test that default properties are converted" <| fun _ ->
let props = getProps id
Expect.containsAll [
Expect.isTrue (props.Length > 0) "Result should contain some elements"
Expect.containsAll props [
"CollectCoverage", "true"
"CoverletOutput", "./"
"OutputFormat", "json"
] props "expected proper MSBuild properties"
] "expected proper MSBuild properties"
]