Skip to content

Commit e1213cd

Browse files
committed
Merge branch 'v4.6.0'
2 parents 47fdfaf + 08564be commit e1213cd

File tree

61 files changed

+599
-183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+599
-183
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Use the online [configuration tool](https://danielpalme.github.io/ReportGenerato
3737
|**Package**|**Platforms**|**Installation/Usage**|
3838
|:----------|:------------|:---------------------|
3939
|[ReportGenerator](https://www.nuget.org/packages/ReportGenerator)<br/><br/>[![Nuget](https://img.shields.io/nuget/v/ReportGenerator.svg)![Nuget](https://img.shields.io/nuget/dt/ReportGenerator.svg)](https://www.nuget.org/packages/ReportGenerator)|.NET Core 2.x, 3.x<br/>.NET Framework 4.7|Use this package if your project is based on *.NET Framework* or *.NET Core* and you want to use *ReportGenerator* via the command line or a build script.<br/><br/>**Usage**<br/>```dotnet $(UserProfile).nuget\packages\reportgenerator\x.y.z\tools\netcoreapp3.0\ReportGenerator.dll [options]```<br/>```$(UserProfile).nuget\packages\reportgenerator\x.y.z\tools\netcoreapp3.0\ReportGenerator.exe [options]```<br/><br/>```$(UserProfile)\.nuget\packages\reportgenerator\x.y.z\tools\net47\ReportGenerator.exe [options]```|
40-
|[dotnet-reportgenerator-globaltool](https://www.nuget.org/packages/dotnet-reportgenerator-globaltool)<br/><br/>[![Nuget](https://img.shields.io/nuget/v/dotnet-reportgenerator-globaltool.svg)![Nuget](https://img.shields.io/nuget/dt/dotnet-reportgenerator-globaltool.svg)](https://www.nuget.org/packages/dotnet-reportgenerator-globaltool)|.NET Core 2.1, 3.x|Use this package if your project is based on *.NET Core* and you want to use *ReportGenerator* as a (global) 'DotnetTool'.<br/><br/>**Installation**<br/>```dotnet tool install -g dotnet-reportgenerator-globaltool```<br/>```dotnet tool install dotnet-reportgenerator-globaltool --tool-path tools```<br/><br/>**Usage**<br/>```reportgenerator [options]```<br/>```tools\reportgenerator.exe [options]```|
40+
|[dotnet-reportgenerator-globaltool](https://www.nuget.org/packages/dotnet-reportgenerator-globaltool)<br/><br/>[![Nuget](https://img.shields.io/nuget/v/dotnet-reportgenerator-globaltool.svg)![Nuget](https://img.shields.io/nuget/dt/dotnet-reportgenerator-globaltool.svg)](https://www.nuget.org/packages/dotnet-reportgenerator-globaltool)|.NET Core 2.1, 3.x|Use this package if your project is based on *.NET Core* and you want to use *ReportGenerator* as a (global) 'DotnetTool'.<br/><br/>**Installation**<br/>```dotnet tool install -g dotnet-reportgenerator-globaltool```<br/><br/>```dotnet tool install dotnet-reportgenerator-globaltool --tool-path tools```<br/><br/>```dotnet new tool-manifest```<br/>```dotnet tool install dotnet-reportgenerator-globaltool```<br/><br/>**Usage**<br/>```reportgenerator [options]```<br/>```tools\reportgenerator.exe [options]```<br/>```dotnet reportgenerator [options]```|
4141
|[dotnet-reportgenerator-cli](https://www.nuget.org/packages/dotnet-reportgenerator-cli)<br/><br/>[![Nuget](https://img.shields.io/nuget/v/dotnet-reportgenerator-cli.svg)![Nuget](https://img.shields.io/nuget/dt/dotnet-reportgenerator-cli.svg)](https://www.nuget.org/packages/dotnet-reportgenerator-cli)|.NET Core 2.0|Use this package if your project is based on *.NET Core 2.x* and you want to use *ReportGenerator* as a 'DotnetCliTool'.<br/><br/>**Warning**<br/>This package is intended for *.NET Core 2.x*. It will not work with .NET Core 3.x.<br/>Consider the [dotnet-reportgenerator-globaltool](https://www.nuget.org/packages/dotnet-reportgenerator-globaltool) for *.NET Core 3.x*.<br/><br/>**Installation**<br/>Add `<DotNetCliToolReference Include="dotnet-reportgenerator-cli" Version="x.y.z" />` to your project file.<br/><br/>**Usage**<br/>```dotnet reportgenerator [options]```|
4242
|[ReportGenerator.Core](https://www.nuget.org/packages/ReportGenerator.Core)<br/><br/>[![Nuget](https://img.shields.io/nuget/v/ReportGenerator.Core.svg)![Nuget](https://img.shields.io/nuget/dt/ReportGenerator.Core.svg)](https://www.nuget.org/packages/ReportGenerator.Core)|.NET Standard 2.0|Use this package if you want to write a custom **plugin** for *ReportGenerator* or if you want to call/execute *ReportGenerator* within your code base.<br/><br/>**Plugin development**<br/>[Custom reports](https://github.com/danielpalme/ReportGenerator/wiki/Custom-reports)<br/>[Custom history storage](https://github.com/danielpalme/ReportGenerator/wiki/Custom-history-storage)|
4343
|[Azure DevOps extension](https://marketplace.visualstudio.com/items?itemName=Palmmedia.reportgenerator)<br/><br/>[![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/Palmmedia.reportgenerator.svg)![Visual Studio Marketplace Installs - Azure DevOps Extension](https://img.shields.io/visual-studio-marketplace/azure-devops/installs/total/Palmmedia.reportgenerator.svg)](https://marketplace.visualstudio.com/items?itemName=Palmmedia.reportgenerator)|.NET Core >=2.1| Add the Azure DevOps extension to your build pipeline.<br />[Learn more](https://github.com/danielpalme/ReportGenerator/wiki/Integration#azure-devops-extension)|
@@ -123,7 +123,7 @@ If you need a custom format, you can create a [plugin](https://github.com/daniel
123123

124124
| **Input formats** | **Output formats** |
125125
|:------------------|:-------------------|
126-
| <ul><li>[OpenCover](https://github.com/OpenCover/opencover) ([Nuget](https://www.nuget.org/packages/OpenCover))<br/>OpenCover format is also generated by [coverlet](https://github.com/tonerdo/coverlet/) and [altcover](https://github.com/SteveGilham/altcover)</li><li>[dotCover](https://www.jetbrains.com/dotcover/help/dotCover__Console_Runner_Commands.html) ([Nuget](https://www.nuget.org/packages/JetBrains.dotCover.CommandLineTools/), /ReportType=DetailedXML)</li><li>Visual Studio ([vstest.console.exe](https://github.com/danielpalme/ReportGenerator/wiki/Visual-Studio-Coverage-Tools#vstestconsoleexe), [CodeCoverage.exe](https://github.com/danielpalme/ReportGenerator/wiki/Visual-Studio-Coverage-Tools#codecoverageexe))</li><li>[NCover](https://www.ncover.com/info/download) (tested version 1.5.8, other versions may not work)</li><li>[Cobertura](https://github.com/cobertura/cobertura)</li><li>[JaCoCo](https://www.jacoco.org/jacoco/index.html)</li><li>[Clover](https://openclover.org/)</li><li>Mono ([mprof-report](https://www.mono-project.com/docs/debug+profile/profile/profiler/#analyzing-the-profile-data))</li><li>[gcov](https://gcc.gnu.org/onlinedocs/gcc/Gcov.html)</li><li>[lcov](https://github.com/linux-test-project/lcov)</li></ul><br/> | <ul><li>Html, HtmlSummary, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlChart, [MHtml](https://en.wikipedia.org/wiki/MHTML)</li><li>Clover</li><li>Cobertura</li><li>[SonarQube](https://docs.sonarqube.org/latest/analysis/generic-test)</li><li>TeamCitySummary</li><li>[lcov](https://github.com/linux-test-project/lcov)</li><li>Xml, XmlSummary</li><li>JsonSummary</li><li>Latex, LatexSummary</li><li>TextSummary</li><li>CsvSummary</li><li>PngChart</li><li>Badges</li><li>[Custom reports](https://github.com/danielpalme/ReportGenerator/wiki/Custom-reports)</li></ul> |
126+
| <ul><li>[OpenCover](https://github.com/OpenCover/opencover) ([Nuget](https://www.nuget.org/packages/OpenCover))<br/>OpenCover format is also generated by [coverlet](https://github.com/coverlet-coverage/coverlet/) and [altcover](https://github.com/SteveGilham/altcover)</li><li>[dotCover](https://www.jetbrains.com/dotcover/help/dotCover__Console_Runner_Commands.html) ([Nuget](https://www.nuget.org/packages/JetBrains.dotCover.CommandLineTools/), /ReportType=DetailedXML)</li><li>Visual Studio ([vstest.console.exe](https://github.com/danielpalme/ReportGenerator/wiki/Visual-Studio-Coverage-Tools#vstestconsoleexe), [CodeCoverage.exe](https://github.com/danielpalme/ReportGenerator/wiki/Visual-Studio-Coverage-Tools#codecoverageexe))</li><li>[NCover](https://www.ncover.com/info/download) (tested version 1.5.8, other versions may not work)</li><li>[Cobertura](https://github.com/cobertura/cobertura)</li><li>[JaCoCo](https://www.jacoco.org/jacoco/index.html)</li><li>[Clover](https://openclover.org/)</li><li>Mono ([mprof-report](https://www.mono-project.com/docs/debug+profile/profile/profiler/#analyzing-the-profile-data))</li><li>[gcov](https://gcc.gnu.org/onlinedocs/gcc/Gcov.html)</li><li>[lcov](https://github.com/linux-test-project/lcov)</li></ul><br/> | <ul><li>Html, HtmlSummary, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlChart, [MHtml](https://en.wikipedia.org/wiki/MHTML)</li><li>Clover</li><li>Cobertura</li><li>[SonarQube](https://docs.sonarqube.org/latest/analysis/generic-test)</li><li>TeamCitySummary</li><li>[lcov](https://github.com/linux-test-project/lcov)</li><li>Xml, XmlSummary</li><li>JsonSummary</li><li>Latex, LatexSummary</li><li>TextSummary</li><li>CsvSummary</li><li>PngChart</li><li>Badges</li><li>[Custom reports](https://github.com/danielpalme/ReportGenerator/wiki/Custom-reports)</li></ul> |
127127

128128
### Screenshots
129129
The screenshots show two snippets of the generated reports:

azure-pipelines.yml

Lines changed: 8 additions & 4 deletions
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.5.8'
15+
value: '4.6.0'
1616

1717
stages:
1818
- stage: Build
@@ -26,10 +26,10 @@ stages:
2626
custom: '--info'
2727

2828
- task: UseDotNet@2
29-
displayName: 'Use .NET Core SDK 3.1.202'
29+
displayName: 'Use .NET Core SDK 3.1.300'
3030
inputs:
3131
packageType: sdk
32-
version: 3.1.202
32+
version: 3.1.300
3333

3434
- task: DotNetCoreCLI@2
3535
displayName: 'dotnet info'
@@ -49,8 +49,11 @@ stages:
4949
versionSpec: 5.3.0
5050

5151
- task: NuGetCommand@2
52+
displayName: 'NuGet Restore'
5253
inputs:
5354
restoreSolution: '$(solution)'
55+
feedsToUse: config
56+
nugetConfigPath: 'src/NuGet.Config'
5457

5558
# Compile
5659
- task: VSBuild@1
@@ -125,7 +128,7 @@ stages:
125128
inputs:
126129
command: test
127130
projects: 'src\ReportGenerator.Core.Test\ReportGenerator.Core.Test.csproj'
128-
arguments: '--configuration $(BuildConfiguration) --no-build /p:CollectCoverage=true /p:IncludeTestAssembly=true /p:CoverletOutputFormat=opencover%2ccobertura /p:CoverletOutput=../target/reports/coverage/'
131+
arguments: '--configuration $(BuildConfiguration) --no-build /p:CollectCoverage=true /p:DeterministicSourcePaths=true /p:IncludeTestAssembly=true /p:CoverletOutputFormat=opencover%2ccobertura /p:CoverletOutput=../target/reports/coverage/'
129132

130133
- task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4
131134
displayName: ReportGenerator
@@ -252,6 +255,7 @@ stages:
252255
ArtifactName: packages
253256

254257
- stage: Deployment
258+
condition: eq(variables['build.sourceBranch'], 'refs/heads/master')
255259
jobs:
256260
- deployment: Deployment
257261
environment: 'Deployment'
810 Bytes
Binary file not shown.

docs/resources/SampleReports.zip

4.54 KB
Binary file not shown.

docs/usage.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ <h4>Usage</h4>
226226
runtimes: '.NET Core',
227227
description: 'Use this package if your project is based on .NET Core and you want to use ReportGenerator as a (global) \'DotnetTool\'.',
228228
installoptions: [
229-
{ tool: '.NET CLI', command: 'dotnet tool install --global dotnet-reportgenerator-globaltool --version x.y.z' }
229+
{ tool: '.NET CLI', command: 'dotnet tool install --global dotnet-reportgenerator-globaltool --version x.y.z\r\n\r\ndotnet tool install dotnet-reportgenerator-globaltool --tool-path tools --version x.y.z\r\n\r\ndotnet new tool-manifest\r\ndotnet tool install dotnet-reportgenerator-globaltool --version x.y.z' }
230230
],
231231
executables: [{ runtime: '.NET Core', tool: 'reportgenerator' }]
232232
},

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "3.1.201",
3+
"version": "3.1.300",
44
"rollForward": "latestMajor"
55
}
66
}

src/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@
1414
bin
1515
obj
1616
.DS_Store
17-
node_modules
17+
.AssemblyAttributes
18+
node_modules

src/AngularComponents/src/app/components/coverageinfo/coverage-info.component.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ import { CodeElementViewModel } from "./viewmodels/codelement-viewmodel.class";
147147
})
148148
export class CoverageInfoComponent {
149149
window: Window;
150+
queryString: string = "";
150151

151152
historicCoverageExecutionTimes: string[] = [];
152153
branchCoverageAvailable: boolean = false;
@@ -193,6 +194,12 @@ export class CoverageInfoComponent {
193194
console.log("Grouping maximum: " + groupingMaximum);
194195
}
195196

197+
const startOfQueryString: number = window.location.href.indexOf("?");
198+
199+
if (startOfQueryString > -1) {
200+
this.queryString = window.location.href.substr(startOfQueryString);
201+
}
202+
196203
this.updateCoverageInfo();
197204

198205
if (restoredFromHistory) {
@@ -234,7 +241,7 @@ export class CoverageInfoComponent {
234241
codeElements.push(assemblyElement);
235242

236243
for (let j: number = 0; j < assemblies[i].classes.length; j++) {
237-
assemblyElement.insertClass(new ClassViewModel(assemblies[i].classes[j]), null);
244+
assemblyElement.insertClass(new ClassViewModel(assemblies[i].classes[j], this.queryString), null);
238245
numberOfClasses++;
239246
}
240247
}
@@ -244,7 +251,7 @@ export class CoverageInfoComponent {
244251

245252
for (let i: number = 0; i < assemblies.length; i++) {
246253
for (let j: number = 0; j < assemblies[i].classes.length; j++) {
247-
assemblyElement.insertClass(new ClassViewModel(assemblies[i].classes[j]), null);
254+
assemblyElement.insertClass(new ClassViewModel(assemblies[i].classes[j], this.queryString), null);
248255
numberOfClasses++;
249256
}
250257
}
@@ -254,7 +261,7 @@ export class CoverageInfoComponent {
254261
codeElements.push(assemblyElement);
255262

256263
for (let j: number = 0; j < assemblies[i].classes.length; j++) {
257-
assemblyElement.insertClass(new ClassViewModel(assemblies[i].classes[j]), this.settings.grouping);
264+
assemblyElement.insertClass(new ClassViewModel(assemblies[i].classes[j], this.queryString), this.settings.grouping);
258265
numberOfClasses++;
259266
}
260267
}

src/AngularComponents/src/app/components/coverageinfo/viewmodels/class-viewmodel.class.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ export class ClassViewModel extends ElementBase {
1414
currentHistoricCoverage: HistoricCoverage = null;
1515

1616
constructor(
17-
clazz: Class) {
17+
clazz: Class,
18+
queryString: string) {
1819
super();
1920
this.name = clazz.name;
20-
this.reportPath = clazz.rp;
21+
this.reportPath = clazz.rp ? clazz.rp + queryString : clazz.rp;
2122

2223
this.coveredLines = clazz.cl;
2324
this.uncoveredLines = clazz.ucl;

src/AngularComponents/src/app/components/riskhotspots/riskhotspots.component.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ import { RiskHotspotsSettings } from "./data/riskhotspots-settings.class";
6666
<tbody>
6767
<tr *ngFor="let riskHotspot of riskHotspots | slice:0:settings.numberOfRiskHotspots">
6868
<td>{{riskHotspot.assembly}}</td>
69-
<td><a [href]="riskHotspot.reportPath">{{riskHotspot.class}}</a></td>
69+
<td><a [href]="riskHotspot.reportPath + queryString">{{riskHotspot.class}}</a></td>
7070
<td [title]="riskHotspot.methodName">
71-
<a [href]="riskHotspot.reportPath + '#file' + riskHotspot.fileIndex + '_line' + riskHotspot.line">
71+
<a [href]="riskHotspot.reportPath + queryString + '#file' + riskHotspot.fileIndex + '_line' + riskHotspot.line">
7272
{{riskHotspot.methodShortName}}
7373
</a>
7474
</td>
@@ -83,6 +83,7 @@ import { RiskHotspotsSettings } from "./data/riskhotspots-settings.class";
8383
})
8484
export class RiskHotspotsComponent implements OnInit {
8585
window: Window;
86+
queryString: string = "";
8687

8788
riskHotspotMetrics: RiskHotspotMetric[] = [];
8889
riskHotspots: RiskHotspot[] = [];
@@ -110,6 +111,13 @@ export class RiskHotspotsComponent implements OnInit {
110111
console.log("Risk hotspots: Restoring from history", this.window.history.state.riskHotspotsSettings);
111112
this.settings = JSON.parse(JSON.stringify(this.window.history.state.riskHotspotsSettings));
112113
}
114+
115+
const startOfQueryString: number = window.location.href.indexOf("?");
116+
117+
if (startOfQueryString > -1) {
118+
this.queryString = window.location.href.substr(startOfQueryString);
119+
}
120+
113121
this.updateRiskHotpots();
114122
}
115123

src/AzureDevopsTask/ReportGenerator/reportgenerator.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ async function executeReportGenerator(): Promise<number> {
2020
return await tool.exec();
2121
}
2222

23-
function copyHtmIndexToHtmlIndex() {
24-
var sourceFile = path.join(tl.getInput('targetdir'), 'index.htm');
25-
if (tl.exist(sourceFile)) {
26-
tl.cp(sourceFile, path.join(tl.getInput('targetdir'), 'index.html'), '-f');
27-
}
28-
}
29-
3023
async function run() {
3124
try {
3225
tl.setResourcePath(path.join( __dirname, 'task.json'));
@@ -37,8 +30,6 @@ async function run() {
3730
tl.setResult(tl.TaskResult.Failed, tl.loc('FailedMsg'));
3831
}
3932

40-
copyHtmIndexToHtmlIndex();
41-
4233
tl.setResult(tl.TaskResult.Succeeded, tl.loc('SucceedMsg'));
4334
} catch (e) {
4435
tl.debug(e.message);

src/AzureDevopsTask/ReportGenerator/task.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"author": "Palmmedia",
1313
"version": {
1414
"Major": 4,
15-
"Minor": 5,
16-
"Patch": 8
15+
"Minor": 6,
16+
"Patch": 0
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.5.8",
5+
"version": "4.6.0",
66
"publisher": "Palmmedia",
77
"public": true,
88
"targets": [

0 commit comments

Comments
 (0)