Replaced PartCover with OpenCover #27

Closed
wants to merge 14 commits into
from

Conversation

Projects
None yet
4 participants
Contributor

lextm commented Jul 21, 2012

PartCover only works for x86 libraries, which is a limitation I cannot afford any more.

OpenCover supports x64 libraries, so I modified the PartCover addin and let it support OpenCover.

OpenCover binaries are taken from OpenCover 4.0.519 release.

My modifications can be released under LGPL (the same as the original license). Some code is also based on ReportGenerator project (http://reportgenerator.codeplex.com/), which is under Apache License.

Member

mrward commented Jul 21, 2012

Thanks. Good work. This has been on the TODO list for a while.

Have you signed the SharpDevelop JCA? I cannot find you on the list. The main reason for asking is that SharpDevelop's license will be changing for vNext and releasing your code under the LGPL will most likely mean we cannot take it. The options are to either sign the JCA or release your new code under the BSD license.

I also noticed that none of the unit tests for the Code Coverage addin were updated. It would be good to have those updated too.

Contributor

lextm commented Jul 21, 2012

Thanks for the comments.

I am ok to release the modification I made in this fork under BSD of course.

For the unit test cases I didn't notice them until you mentioned. Will try to update them as soon as possible.

Owner

dgrunwald commented Jul 21, 2012

Actually MIT would be preferred over BSD, as we plan to switch to MIT with SharpDevelop 5. But both are OK (they're pretty much the same anyways).

Can you change the license header on the code files?

// Copyright (c) <AUTHOR>
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.

@lextm lextm commented on an outdated diff Jul 22, 2012

...CodeCoverage/Project/Src/CodeCoverageSequencePoint.cs
Line = GetInteger(reader, "sl");
Column = GetInteger(reader, "sc");
EndLine = GetInteger(reader, "el");
EndColumn = GetInteger(reader, "ec");
- Length = GetInteger(reader, "len");
+ Length = 10; // TODO: need to find a way to get this. GetInteger(reader, "len");
@lextm

lextm Jul 22, 2012

Contributor

Have to hard code a value here, as OpenCover does not expose this value yet, sawilde/opencover#111

lextm referenced this pull request in OpenCover/opencover Jul 22, 2012

Closed

SharpDevelop Integration #111

Contributor

lextm commented Jul 22, 2012

@dgrunwald, I am OK to release my modification under any license your team accept, and signing JCA is not a problem either. So once this task is finished, I will spend some time on the code file headers.

I already tried to fix all reasonable unit test cases. The remaining broken ones are closely related to "len" information, which is not available right now. Since this is an issue of OpenCover's design, let's switch to the OpenCover issue tracker to follow up.

sawilde/opencover#111

Owner

christophwille commented Jul 22, 2012

I have passed it on the Matt.

Chris

On Sat, Jul 21, 2012 at 12:57 PM, Lex Li <
reply@reply.github.com

wrote:

PartCover only works for x86 libraries, which is a limitation I cannot
afford any more.

OpenCover supports x64 libraries, so I modified the PartCover addin and
let it support OpenCover.

OpenCover binaries are taken from OpenCover 4.0.519 release.

My modifications can be released under LGPL (the same as the original
license). Some code is also based on ReportGenerator project (
http://reportgenerator.codeplex.com/), which is under Apache License.

You can merge this Pull Request by running:

git pull https://github.com/lextm/SharpDevelop master

Or you can view, comment on it, or merge it online at:

#27

-- Commit Summary --

  • Changed PartCover support to OpenCover support.
  • Modified result parsing to meet OpenCover's format.
  • Added reference to Systen.Xml.Linq.
  • Fixed NullReferenceException.
  • Performed renaming.
  • Added OpenCover files. Removed PartCover files.
  • Updated addin manifest.
  • Fixed CodeCoverage.csproj.

-- File Changes --

M src/AddIns/Analysis/CodeCoverage/Project/CodeCoverage.addin (2)
M src/AddIns/Analysis/CodeCoverage/Project/CodeCoverage.csproj (29)
M src/AddIns/Analysis/CodeCoverage/Project/Src/CodeCoverageMethod.cs (31)
M
src/AddIns/Analysis/CodeCoverage/Project/Src/CodeCoverageProjectOptionsPanel.cs
(8)
M src/AddIns/Analysis/CodeCoverage/Project/Src/CodeCoverageResults.cs (109)
M
src/AddIns/Analysis/CodeCoverage/Project/Src/CodeCoverageSequencePoint.cs
(14)
M src/AddIns/Analysis/CodeCoverage/Project/Src/CodeCoverageTestRunner.cs
(10)
R src/AddIns/Analysis/CodeCoverage/Project/Src/OpenCoverApplication.cs (43)
R src/AddIns/Analysis/CodeCoverage/Project/Src/OpenCoverSettings.cs (10)
R src/AddIns/Analysis/CodeCoverage/Project/Src/OpenCoverSettingsFactory.cs
(16)
A src/Tools/OpenCover/Gendarme.Framework.dll (0)
A src/Tools/OpenCover/Gendarme.Rules.Maintainability.dll (0)
A src/Tools/OpenCover/License.rtf (166)
A src/Tools/OpenCover/Microsoft.Practices.Unity.dll (0)
A src/Tools/OpenCover/Mono.Cecil.Pdb.dll (0)
A src/Tools/OpenCover/Mono.Cecil.dll (0)
A src/Tools/OpenCover/OpenCover.Console.exe (0)
A src/Tools/OpenCover/OpenCover.Console.exe.config (8)
A src/Tools/OpenCover/OpenCover.Framework.dll (0)
A src/Tools/OpenCover/log4net.config (29)
A src/Tools/OpenCover/log4net.dll (0)
A src/Tools/OpenCover/x64/OpenCover.Profiler.dll (0)
A src/Tools/OpenCover/x86/OpenCover.Profiler.dll (0)
D src/Tools/PartCover/Interop.PartCover.dll (0)
D src/Tools/PartCover/PartCover.Framework.dll (0)
D src/Tools/PartCover/PartCover.dll (0)
D src/Tools/PartCover/PartCover.exe (0)
D src/Tools/PartCover/PartCover.exe.config (4)
M src/Tools/Tools.build (8)

-- Patch Links --

https://github.com/icsharpcode/SharpDevelop/pull/27.patch
https://github.com/icsharpcode/SharpDevelop/pull/27.diff


Reply to this email directly or view it on GitHub:
#27

Contributor

lextm commented Jul 28, 2012

@mrward I almost finished all test cases (by converting PartCover xml files to OpenCover alternatives) in

lextm/SharpDevelop@98c93a3aee60e2db1a2b8cc83696a40258b6ed4c

However, I am not sure whether this is enough for the pull request. Any advice?

Member

mrward commented Jul 28, 2012

Should be fine. I am planning to look at merging your work into SharpDevelop 4.3 this weekend.

Contributor

lextm commented Aug 7, 2012

The latest code is now in SharpDevelop opencover branch,

https://github.com/icsharpcode/SharpDevelop/tree/opencover

Close this pull request.

lextm closed this Aug 7, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment