Skip to content

Commit 5e4566e

Browse files
committed
Removing teamcity output command line param
1 parent 0eb8ce4 commit 5e4566e

File tree

4 files changed

+1
-33
lines changed

4 files changed

+1
-33
lines changed

src/coverlet.console/Program.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.Diagnostics;
44
using System.IO;
55
using System.Text;
6-
using coverlet.core;
76
using ConsoleTables;
87
using Coverlet.Console.Logging;
98
using Coverlet.Core;
@@ -35,7 +34,6 @@ static int Main(string[] args)
3534
CommandOption includeFilters = app.Option("--include", "Filter expressions to include only specific modules and types.", CommandOptionType.MultipleValue);
3635
CommandOption excludedSourceFiles = app.Option("--exclude-by-file", "Glob patterns specifying source files to exclude.", CommandOptionType.MultipleValue);
3736
CommandOption mergeWith = app.Option("--merge-with", "Path to existing coverage result to merge.", CommandOptionType.SingleValue);
38-
CommandOption teamCityOutput = app.Option("--teamcity-output", "Output coverage results to console using TeamCity service messages.", CommandOptionType.NoValue);
3937

4038
app.OnExecute(() =>
4139
{
@@ -137,15 +135,6 @@ static int Main(string[] args)
137135
logger.LogInformation($"Total Branch: {overallBranchCoverage.Percent * 100}%");
138136
logger.LogInformation($"Total Method: {overallMethodCoverage.Percent * 100}%");
139137

140-
if (teamCityOutput.HasValue())
141-
{
142-
logger.LogInformation(string.Empty);
143-
var teamCityServiceMessageWriter = new TeamCityServiceMessageWriter(logger.LogInformation);
144-
teamCityServiceMessageWriter.OutputLineCoverage(overallLineCoverage);
145-
teamCityServiceMessageWriter.OutputBranchCoverage(overallBranchCoverage);
146-
teamCityServiceMessageWriter.OutputMethodCoverage(overallMethodCoverage);
147-
}
148-
149138
if (thresholdFailed)
150139
throw new Exception(exceptionBuilder.ToString().TrimEnd(Environment.NewLine.ToCharArray()));
151140

src/coverlet.msbuild.tasks/CoverageResultTask.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
using System;
2-
using System.ComponentModel;
32
using System.IO;
43
using System.Linq;
54
using System.Text;
6-
using coverlet.core;
75
using ConsoleTables;
86
using Coverlet.Core;
97
using Coverlet.Core.Reporters;
@@ -18,7 +16,6 @@ public class CoverageResultTask : Task
1816
private string _format;
1917
private int _threshold;
2018
private string _thresholdType;
21-
private bool _teamCityOutput;
2219

2320
[Required]
2421
public string Output
@@ -48,13 +45,6 @@ public string ThresholdType
4845
set { _thresholdType = value; }
4946
}
5047

51-
[Required]
52-
public bool TeamCityOutput
53-
{
54-
get { return _teamCityOutput; }
55-
set { _teamCityOutput = value; }
56-
}
57-
5848
public override bool Execute()
5949
{
6050
try
@@ -139,15 +129,6 @@ public override bool Execute()
139129
Console.WriteLine($"Total Branch: {overallBranchCoverage.Percent * 100}%");
140130
Console.WriteLine($"Total Method: {overallMethodCoverage.Percent * 100}%");
141131

142-
if (_teamCityOutput)
143-
{
144-
Console.WriteLine();
145-
var teamCityServiceMessageWriter = new TeamCityServiceMessageWriter(Console.WriteLine);
146-
teamCityServiceMessageWriter.OutputLineCoverage(overallLineCoverage);
147-
teamCityServiceMessageWriter.OutputBranchCoverage(overallBranchCoverage);
148-
teamCityServiceMessageWriter.OutputMethodCoverage(overallMethodCoverage);
149-
}
150-
151132
if (thresholdFailed)
152133
throw new Exception(exceptionBuilder.ToString().TrimEnd(Environment.NewLine.ToCharArray()));
153134
}

src/coverlet.msbuild/coverlet.msbuild.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@
99
<MergeWith Condition="$(MergeWith) == ''"></MergeWith>
1010
<Threshold Condition="$(Threshold) == ''">0</Threshold>
1111
<ThresholdType Condition="$(ThresholdType) == ''">line,branch,method</ThresholdType>
12-
<TeamCityOutput Condition="$(TeamCityOutput) == ''">false</TeamCityOutput>
1312
</PropertyGroup>
1413
</Project>

src/coverlet.msbuild/coverlet.msbuild.targets

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
Output="$(CoverletOutput)"
3030
OutputFormat="$(CoverletOutputFormat)"
3131
Threshold="$(Threshold)"
32-
ThresholdType="$(ThresholdType)"
33-
TeamCityOutput="$(TeamCityOutput)" />
32+
ThresholdType="$(ThresholdType)" />
3433
</Target>
3534

3635
</Project>

0 commit comments

Comments
 (0)