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)
7272 if ( reporter == null )
7373 throw new Exception ( $ "Specified output format '{ format } ' is not supported") ;
7474
75- if ( reporter . UseConsoleOutput )
75+ if ( reporter . OutputType == ReporterOutputType . Console )
7676 {
7777 // Output to console
7878 logger . LogInformation ( " Outputting results to console" ) ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ namespace Coverlet.Core.Reporters
1010{
1111 public class CoberturaReporter : IReporter
1212 {
13- public bool UseConsoleOutput => false ;
13+ public ReporterOutputType OutputType => ReporterOutputType . File ;
1414
1515 public string Format => "cobertura" ;
1616
Original file line number Diff line number Diff line change @@ -2,9 +2,15 @@ namespace Coverlet.Core.Reporters
22{
33 public interface IReporter
44 {
5- bool UseConsoleOutput { get ; }
5+ ReporterOutputType OutputType { get ; }
66 string Format { get ; }
77 string Extension { get ; }
88 string Report ( CoverageResult result ) ;
99 }
10+
11+ public enum ReporterOutputType
12+ {
13+ File ,
14+ Console ,
15+ }
1016}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ namespace Coverlet.Core.Reporters
44{
55 public class JsonReporter : IReporter
66 {
7- public bool UseConsoleOutput => false ;
7+ public ReporterOutputType OutputType => ReporterOutputType . File ;
88
99 public string Format => "json" ;
1010
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ namespace Coverlet.Core.Reporters
66{
77 public class LcovReporter : IReporter
88 {
9- public bool UseConsoleOutput => false ;
9+ public ReporterOutputType OutputType => ReporterOutputType . File ;
1010
1111 public string Format => "lcov" ;
1212
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ namespace Coverlet.Core.Reporters
99{
1010 public class OpenCoverReporter : IReporter
1111 {
12- public bool UseConsoleOutput => false ;
12+ public ReporterOutputType OutputType => ReporterOutputType . File ;
1313
1414 public string Format => "opencover" ;
1515
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ namespace coverlet.core.Reporters
66{
77 public class TeamCityReporter : IReporter
88 {
9- public bool UseConsoleOutput => true ;
9+ public ReporterOutputType OutputType => ReporterOutputType . Console ;
1010
1111 public string Format => "teamcity" ;
1212
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ public override bool Execute()
6565 if ( reporter == null )
6666 throw new Exception ( $ "Specified output format '{ format } ' is not supported") ;
6767
68- if ( reporter . UseConsoleOutput )
68+ if ( reporter . OutputType == ReporterOutputType . Console )
6969 {
7070 // Output to console
7171 Console . WriteLine ( " Outputting results to console" ) ;
You can’t perform that action at this time.
0 commit comments