Skip to content

Commit 0bc6d22

Browse files
committed
#408: Fixed coverage of generic classes
1 parent 3b4fc59 commit 0bc6d22

File tree

19 files changed

+63
-47
lines changed

19 files changed

+63
-47
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ variables:
1212
- name: disable.coverage.autogenerate
1313
value: 'true'
1414
- name: version
15-
value: '4.8.6'
15+
value: '4.8.7'
1616

1717
stages:
1818
- stage: Build

src/AzureDevopsTask/ReportGenerator/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"version": {
1414
"Major": 4,
1515
"Minor": 8,
16-
"Patch": 6
16+
"Patch": 7
1717
},
1818
"instanceNameFormat": "ReportGenerator",
1919
"groups": [

src/AzureDevopsTask/vss-extension.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifestVersion": 1,
33
"id": "reportgenerator",
44
"name": "ReportGenerator",
5-
"version": "4.8.6",
5+
"version": "4.8.7",
66
"publisher": "Palmmedia",
77
"public": true,
88
"targets": [

src/Readme.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ For further details take a look at LICENSE.txt.
6363

6464
CHANGELOG
6565

66+
4.8.7.0
67+
68+
* Fix: #408: Fixed coverage of generic classes
69+
6670
4.8.6.0
6771

6872
* New: #405: Added support for deterministic source paths

src/ReportGenerator.Console.NetCore/ReportGenerator.Console.NetCore.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<AssemblyName>ReportGenerator</AssemblyName>
88
<RootNamespace>Palmmedia.ReportGenerator</RootNamespace>
99
<StartupObject>Palmmedia.ReportGenerator.Console.NetCore.Program</StartupObject>
10-
<AssemblyVersion>4.8.6.0</AssemblyVersion>
11-
<FileVersion>4.8.6.0</FileVersion>
10+
<AssemblyVersion>4.8.7.0</AssemblyVersion>
11+
<FileVersion>4.8.7.0</FileVersion>
1212
</PropertyGroup>
1313

1414
<ItemGroup>

src/ReportGenerator.Console/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
// You can specify all the values or you can default the Build and Revision Numbers
3232
// by using the '*' as shown below:
3333
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("4.8.6.0")]
35-
[assembly: AssemblyFileVersion("4.8.6.0")]
34+
[assembly: AssemblyVersion("4.8.7.0")]
35+
[assembly: AssemblyFileVersion("4.8.7.0")]

src/ReportGenerator.Console/ReportGenerator.Console.Net.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
</ItemGroup>
9595
<ItemGroup>
9696
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" />
97-
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="16.8.0" />
97+
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="16.9.0" />
9898
</ItemGroup>
9999
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
100100
</Project>

src/ReportGenerator.Core.Test/ReportGenerator.Core.Test.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
<TargetFramework>net5.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<RootNamespace>Palmmedia.ReportGenerator.Core.Test</RootNamespace>
7-
<AssemblyVersion>4.8.6.0</AssemblyVersion>
8-
<FileVersion>4.8.6.0</FileVersion>
7+
<AssemblyVersion>4.8.7.0</AssemblyVersion>
8+
<FileVersion>4.8.7.0</FileVersion>
99
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="coverlet.msbuild" Version="3.0.2">
13+
<PackageReference Include="coverlet.msbuild" Version="3.0.3">
1414
<PrivateAssets>all</PrivateAssets>
1515
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1616
</PackageReference>
17-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.0-preview-20201020-06" />
18-
<PackageReference Include="Moq" Version="4.16.0" />
17+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
18+
<PackageReference Include="Moq" Version="4.16.1" />
1919
<PackageReference Include="xunit" Version="2.4.1" />
2020
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
2121
<PrivateAssets>all</PrivateAssets>

src/ReportGenerator.Core/Parser/Analysis/Class.cs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ internal Class(string name, Assembly assembly)
4545
this.Name = name ?? throw new ArgumentNullException(nameof(name));
4646
this.Assembly = assembly ?? throw new ArgumentNullException(nameof(assembly));
4747

48+
this.DisplayName = name;
49+
4850
/*
4951
* Convert class name of generic classes:
5052
* See: https://github.com/coverlet-coverage/coverlet/issues/1077
@@ -59,29 +61,29 @@ internal Class(string name, Assembly assembly)
5961

6062
if (match.Success)
6163
{
62-
this.Name = match.Groups["Name"].Value;
64+
this.DisplayName = match.Groups["Name"].Value;
6365

6466
int number = int.Parse(match.Groups["Number"].Value);
6567

6668
if (number == 1)
6769
{
68-
this.Name += "<T>";
70+
this.DisplayName += "<T>";
6971
}
7072
else if (number > 1)
7173
{
72-
this.Name += "<";
74+
this.DisplayName += "<";
7375

7476
for (int i = 1; i <= number; i++)
7577
{
7678
if (i > 1)
7779
{
78-
this.Name += ", ";
80+
this.DisplayName += ", ";
7981
}
8082

81-
this.Name += "T" + i;
83+
this.DisplayName += "T" + i;
8284
}
8385

84-
this.Name += ">";
86+
this.DisplayName += ">";
8587
}
8688
}
8789
}
@@ -92,6 +94,11 @@ internal Class(string name, Assembly assembly)
9294
/// </summary>
9395
public string Name { get; }
9496

97+
/// <summary>
98+
/// Gets the display name of the class.
99+
/// </summary>
100+
public string DisplayName { get; }
101+
95102
/// <summary>
96103
/// Gets the assembly.
97104
/// </summary>

src/ReportGenerator.Core/ReportGenerator.Core.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
88
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
99
<AssemblyName>ReportGenerator.Core</AssemblyName>
10-
<AssemblyVersion>4.8.6.0</AssemblyVersion>
11-
<FileVersion>4.8.6.0</FileVersion>
10+
<AssemblyVersion>4.8.7.0</AssemblyVersion>
11+
<FileVersion>4.8.7.0</FileVersion>
1212
</PropertyGroup>
1313

1414
<PropertyGroup>

0 commit comments

Comments
 (0)