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

Added DotCover Cover command #713

Merged
merged 1 commit into from
Mar 1, 2016

Conversation

bjorkstromm
Copy link
Member

Added DotCover Cover command. Needed since TeamCity only want snapshots, not HTML/XML reports.

If possible, to remove duplicate code, I would like to reuse DotCoverCoverSettings in DotCoverAnalyser by having DotCoverAnalyseSettings to inherit from DotCoverCoverSettings. Is this allowed since it will make documentation unclear?

NOTE: Quickly hacked using my Linux box, need to verify functionality on Windows (dotCover.exe doesn't run under Mono). But this have to wait until monday when I'm back at work.

//cc @patriksvensson

@patriksvensson
Copy link
Member

@mholo65 Nice! 👍

Funny, but as you published this PR I was updating the site to show inherited members better (cake-build/website#65) 😄 As soon as that PR is merged, this won't be a problem anymore. As long as it's not a breaking change, the refactoring is OK with me.

I would however recommending adding an abstract DotCoverSettings for settings shared between different (related) DotCover tools and add all shared functionality there.

Great job!

@bjorkstromm
Copy link
Member Author

Nice! Shouldn't be a breaking change, Analyse uses all settings as Coverer plus ReportType.

@bjorkstromm bjorkstromm force-pushed the dotcover-cover branch 2 times, most recently from 987ab40 to c145a8a Compare February 28, 2016 20:09
@bjorkstromm
Copy link
Member Author

@patriksvensson, refactored, rebased and done.

An additional suggestion for removing duplicate code.

  • Create an abstract class for handling DotCoverSettings argument creation and interception of the unit test runner process.
DotCoverWhateverName<TSettings> : DotCoverTool<TSettings> where TSettings : DotCoverSettings
  • Or an internal extension method (GetArguments) for DotCoverSettings and move InterceptAction to DotCoverTool
internal static ProcessArgumentBuilder GetArguments(this DotCoverSettings settings, ProcessArgumentBuilder builder)

What do you think? Or should we leave it as is.

@patriksvensson
Copy link
Member

@mholo65 Sorry for not getting back sooner about this.
This PR looks good to me 👍

I think it's better to do more refactoring in a separate PR. It makes it easier to see how things are affected.

@devlead and @gep13: Any comments on this PR before merging?


/// <summary>
/// Gets the coverage filters using the following syntax: +:module=*;class=*;function=*;
/// Use -:myassembly to exclude an assembly from code coverage.
Copy link
Member

Choose a reason for hiding this comment

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

Trim trailing white space here.

@devlead
Copy link
Member

devlead commented Mar 1, 2016

@patriksvensson looks good to me, just left one minor comment, remove WIP and rebase, also do we have an referring issue to the PR assigned to a release?

@patriksvensson
Copy link
Member

@devlead Doh! Assumed there was an issue for this.

@mholo65 Can you create an issue for this?

@patriksvensson
Copy link
Member

@mholo65 Perfect, thanks!

@bjorkstromm
Copy link
Member Author

Trimmed, rebased and done.

@devlead You probably meant the trailing whitespace in DotCoverSettings.cs:35 not DotCoverAnalyseSettings.cs:35 since You are referring to an deletion in your comment.

@bjorkstromm bjorkstromm changed the title [WIP] Added DotCover Cover command Added DotCover Cover command Mar 1, 2016
@bjorkstromm
Copy link
Member Author

HOLD!. sorry, forgot to rebase :)

@bjorkstromm
Copy link
Member Author

Rebased and checks have passed.

@patriksvensson patriksvensson merged commit a0c88b3 into cake-build:develop Mar 1, 2016
@patriksvensson
Copy link
Member

Merged! Thank you for this! 👍

@bjorkstromm bjorkstromm deleted the dotcover-cover branch March 1, 2016 14:06
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.

3 participants