Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions build/opencover-report.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ $target_dll_csharp7 = "..\StyleCop.Analyzers\StyleCop.Analyzers.Test.CSharp7\bin
$target_dll_csharp8 = "..\StyleCop.Analyzers\StyleCop.Analyzers.Test.CSharp8\bin\$Configuration\net472\StyleCop.Analyzers.Test.CSharp8.dll"
$target_dll_csharp9 = "..\StyleCop.Analyzers\StyleCop.Analyzers.Test.CSharp9\bin\$Configuration\net472\StyleCop.Analyzers.Test.CSharp9.dll"
$target_dll_csharp10 = "..\StyleCop.Analyzers\StyleCop.Analyzers.Test.CSharp10\bin\$Configuration\net472\StyleCop.Analyzers.Test.CSharp10.dll"
$target_dll_csharp11 = "..\StyleCop.Analyzers\StyleCop.Analyzers.Test.CSharp11\bin\$Configuration\net472\StyleCop.Analyzers.Test.CSharp11.dll"

If (Test-Path $report_folder) {
Remove-Item -Recurse -Force $report_folder
Expand Down Expand Up @@ -149,6 +150,24 @@ If (($AppVeyor -or $Azure) -and -not $?) {
$exitCode = $LASTEXITCODE
}

&$opencover_console `
-register:$register_mode `
-threshold:1 -oldStyle `
-returntargetcode `
-hideskipped:All `
-filter:"+[StyleCop*]*" `
-excludebyattribute:*.ExcludeFromCodeCoverage* `
-excludebyfile:*\*Designer.cs `
-output:"$report_folder\OpenCover.StyleCopAnalyzers.xml" `
-mergebyhash -mergeoutput `
-target:"$xunit_runner_console_net472" `
-targetargs:"$target_dll_csharp11 -noshadow $AppVeyorArg -xml StyleCopAnalyzers.CSharp11.xunit.xml"

If (($AppVeyor -or $Azure) -and -not $?) {
$host.UI.WriteErrorLine('Build failed; coverage analysis may be incomplete.')
$exitCode = $LASTEXITCODE
}

If (-not $NoReport) {
&$report_generator -targetdir:$report_folder -reports:$report_folder\OpenCover.*.xml
$host.UI.WriteLine("Open $report_folder\index.htm to see code coverage results.")
Expand Down