File tree Expand file tree Collapse file tree 8 files changed +14
-8
lines changed Expand file tree Collapse file tree 8 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ static int Main(string[] args)
72
72
if ( reporter == null )
73
73
throw new Exception ( $ "Specified output format '{ format } ' is not supported") ;
74
74
75
- if ( reporter . UseConsoleOutput )
75
+ if ( reporter . OutputType == ReporterOutputType . Console )
76
76
{
77
77
// Output to console
78
78
logger . LogInformation ( " Outputting results to console" ) ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ namespace Coverlet.Core.Reporters
10
10
{
11
11
public class CoberturaReporter : IReporter
12
12
{
13
- public bool UseConsoleOutput => false ;
13
+ public ReporterOutputType OutputType => ReporterOutputType . File ;
14
14
15
15
public string Format => "cobertura" ;
16
16
Original file line number Diff line number Diff line change @@ -2,9 +2,15 @@ namespace Coverlet.Core.Reporters
2
2
{
3
3
public interface IReporter
4
4
{
5
- bool UseConsoleOutput { get ; }
5
+ ReporterOutputType OutputType { get ; }
6
6
string Format { get ; }
7
7
string Extension { get ; }
8
8
string Report ( CoverageResult result ) ;
9
9
}
10
+
11
+ public enum ReporterOutputType
12
+ {
13
+ File ,
14
+ Console ,
15
+ }
10
16
}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ namespace Coverlet.Core.Reporters
4
4
{
5
5
public class JsonReporter : IReporter
6
6
{
7
- public bool UseConsoleOutput => false ;
7
+ public ReporterOutputType OutputType => ReporterOutputType . File ;
8
8
9
9
public string Format => "json" ;
10
10
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ namespace Coverlet.Core.Reporters
6
6
{
7
7
public class LcovReporter : IReporter
8
8
{
9
- public bool UseConsoleOutput => false ;
9
+ public ReporterOutputType OutputType => ReporterOutputType . File ;
10
10
11
11
public string Format => "lcov" ;
12
12
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ namespace Coverlet.Core.Reporters
9
9
{
10
10
public class OpenCoverReporter : IReporter
11
11
{
12
- public bool UseConsoleOutput => false ;
12
+ public ReporterOutputType OutputType => ReporterOutputType . File ;
13
13
14
14
public string Format => "opencover" ;
15
15
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ namespace coverlet.core.Reporters
6
6
{
7
7
public class TeamCityReporter : IReporter
8
8
{
9
- public bool UseConsoleOutput => true ;
9
+ public ReporterOutputType OutputType => ReporterOutputType . Console ;
10
10
11
11
public string Format => "teamcity" ;
12
12
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ public override bool Execute()
65
65
if ( reporter == null )
66
66
throw new Exception ( $ "Specified output format '{ format } ' is not supported") ;
67
67
68
- if ( reporter . UseConsoleOutput )
68
+ if ( reporter . OutputType == ReporterOutputType . Console )
69
69
{
70
70
// Output to console
71
71
Console . WriteLine ( " Outputting results to console" ) ;
You can’t perform that action at this time.
0 commit comments