SonarCommunity/sonar-dotnet — pull request #2 by xianjing (2012-11-19 07:24:21+00:00)
Title: changes the way to verify a valid line of code

Dear,

This is to request you to pull our team changes regarding code coverage in dotnet gallio plugin.

In summary, the changes are to consider one statement as one valid line of code when doing statistics , including coverage.

Example:

13: routes.MapHttpRoute(
14	name: "DefaultApi",
15	routeTemplate: "api/{controller}/{id}",
16	defaults: new { id = RouteParameter.Optional }
17	);

Those lines above, e.g. one statement, will be consider as one line of code when calculating coverage.

As we all know, a test method will cover the whole statement in source, it is not possible to cover some lines inside one statement. So we think one statement should be one valid line of code when we doing such statistics, the coverage will be more accurate in this way and we think it is the real coverage.

I will be happy to help if you need more information. Look forward to hearing from you.

Regards,
Xianjing