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

Porting DotCover module #2058

Merged
merged 6 commits into from
Aug 27, 2018
Merged

Conversation

cthangn
Copy link
Contributor

@cthangn cthangn commented Aug 6, 2018

@matthid Any suggestion with those internal buildXXXXArgs from other modules which are used in DotCover?

@matthid
Copy link
Member

matthid commented Aug 11, 2018

internal buildXXXXArgs from other modules which are used in DotCover?

Not really, but somehow it looks wrong ;)

Would it be enough to add another public API to those modules with the following signature:

let buildArgs (setDotCoverParams: DotCoverParams -> DotCoverParams) : string =
   // ...

?

@cthangn
Copy link
Contributor Author

cthangn commented Aug 21, 2018

It is not sufficient, because those buildArgs are dependent on those modules parameters not on DotCoverParams. It also doesn't feel right to have DotCover as dependency in those modules. I'd rather make those public than this. :) I may miss something though.

@vbfox
Copy link
Contributor

vbfox commented Aug 22, 2018

I think that having buildArgs methods in each module with their current signature is the best that can be done.

Maybe with /// [omit] because it's not something that users need to find (Except if they wrap another coverage tool).

@matthid
Copy link
Member

matthid commented Aug 22, 2018

Ah yes, sorry this is actually what I meant... Basically we can make these things public as you suggest in the PR but we should make this a "feature" and unify the signatures (just like we did for <Module>.run we now have <Module>.buildArgs).

Maybe with /// [omit] because it's not something that users need to find

I'm not 100% sure about this because sometimes it can be used for unblocking people, the disadvantage is that there is less need to contribute back ;)

Copy link
Member

@matthid matthid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor API cleanup and this is good to go

| NDependXml = 3

/// The dotCover parameter type for running coverage
[<CLIMutable>]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove CLIMutable?

CustomParameters = ""
ErrorLevel = ErrorLevel.Error}

[<CLIMutable>]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here as well

TempDir = ""
CustomParameters = "" }

[<CLIMutable>]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and one more

/// ## Parameters
///
/// - `setParams` - Function used to overwrite the dotCover default parameters.
let DotCover (setParams: DotCoverParams -> DotCoverParams) =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename this to run as other modules?

/// Source = artifactsDir @@ "dotCoverSnapshot.dcvr"
/// Output = artifactsDir @@ "dotCoverReport.xml"
/// ReportType = DotCoverReportType.Xml })
let DotCoverReport (setParams: DotCoverReportParams -> DotCoverReportParams) =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DotCover.report?

/// Output = artifactsDir @@ "NUnitDotCoverSnapshot.dcvr" })
/// (fun nUnitOptions -> { nUnitOptions with
/// DisableShadowCopy = true })
let DotCoverNUnit (setDotCoverParams: DotCoverParams -> DotCoverParams) (setNUnitParams: NUnit.Common.NUnitParams -> NUnit.Common.NUnitParams) (assemblies: string seq) =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DotCover.runNunit?

@matthid
Copy link
Member

matthid commented Aug 25, 2018

Sorry for the late review

@matthid matthid mentioned this pull request Aug 25, 2018
3 tasks
Copy link
Member

@matthid matthid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks!

@matthid matthid merged commit 8d9e5ce into fsprojects:release/next Aug 27, 2018
@matthid
Copy link
Member

matthid commented Aug 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants