Skip to content

Commit 1f29ea8

Browse files
committed
incorporate review comments
1 parent e11900d commit 1f29ea8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/coverlet.console/Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static int Main(string[] args)
3737
new Option<string>(new[] { "--targetargs", "-a" }, "Arguments to be passed to the test runner."){Arity = ArgumentArity.ZeroOrOne},
3838
new Option<string>(new[] { "--output", "-o" }, "Output of the generated coverage report"){Arity = ArgumentArity.ZeroOrOne},
3939
new Option<LogLevel>(new[] { "--verbosity", "-v" }, () => LogLevel.Normal, "Sets the verbosity level of the command. Allowed values are quiet, minimal, normal, detailed."){Arity = ArgumentArity.ZeroOrOne},
40-
new Option<string[]>(new[] { "--formats", "-f" }, () => new[] {"json"} , "Format of the generated coverage report."){Arity = ArgumentArity.ZeroOrMore},
40+
new Option<string[]>(new[] { "--format", "-f" }, () => new[] {"json"} , "Format of the generated coverage report."){Arity = ArgumentArity.ZeroOrMore},
4141
new Option<string>("--threshold", "Exits with error if the coverage % is below value."){Arity = ArgumentArity.ZeroOrOne},
4242
new Option<List<string>>("--threshold-type", () => new List<string>(new string[] { "line", "branch", "method" }), "Coverage type to apply the threshold to.") {Arity = ArgumentArity.ZeroOrMore},
4343
new Option<ThresholdStatistic>("--threshold-stat", () => ThresholdStatistic.Minimum, "Coverage statistic used to enforce the threshold value."){Arity = ArgumentArity.ZeroOrMore},
@@ -63,7 +63,7 @@ private static Task<int> HandleCommand(string path,
6363
string targetargs,
6464
string output,
6565
LogLevel verbosity,
66-
string[] formats,
66+
string[] format,
6767
string threshold,
6868
List<string> thresholdType,
6969
ThresholdStatistic thresholdStat,
@@ -175,12 +175,12 @@ string excludeAssembliesWithoutSources
175175
Directory.CreateDirectory(directory);
176176
}
177177

178-
foreach (string fmt in formats)
178+
foreach (string fmt in format)
179179
{
180180
Core.Abstractions.IReporter reporter = new ReporterFactory(fmt).CreateReporter();
181181
if (reporter == null)
182182
{
183-
throw new Exception($"Specified output format '{formats}' is not supported");
183+
throw new Exception($"Specified output format '{fmt}' is not supported");
184184
}
185185

186186
if (reporter.OutputType == ReporterOutputType.Console)

0 commit comments

Comments
 (0)