Fix option values and log output
This commit is contained in:
@@ -28,7 +28,7 @@ namespace Coverlet.Console
|
||||
CommandOption target = app.Option("-t|--target", "Path to the test runner application.", CommandOptionType.SingleValue);
|
||||
CommandOption targs = app.Option("-a|--targetargs", "Arguments to be passed to the test runner.", CommandOptionType.SingleValue);
|
||||
CommandOption output = app.Option("-o|--output", "Output of the generated coverage report", CommandOptionType.SingleValue);
|
||||
CommandOption<LogLevel> verbosity = app.Option<LogLevel>("-v|--verbosity", "Sets the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed].", CommandOptionType.SingleValue);
|
||||
CommandOption<LogLevel> verbosity = app.Option<LogLevel>("-v|--verbosity", "Sets the verbosity level of the command. Allowed values are quiet, minimal, normal, detailed.", CommandOptionType.SingleValue);
|
||||
CommandOption formats = app.Option("-f|--format", "Format of the generated coverage report.", CommandOptionType.MultipleValue);
|
||||
CommandOption threshold = app.Option("--threshold", "Exits with error if the coverage % is below value.", CommandOptionType.SingleValue);
|
||||
CommandOption thresholdTypes = app.Option("--threshold-type", "Coverage type to apply the threshold to.", CommandOptionType.MultipleValue);
|
||||
@@ -124,8 +124,8 @@ namespace Coverlet.Console
|
||||
if (reporter.OutputType == ReporterOutputType.Console)
|
||||
{
|
||||
// Output to console
|
||||
logger.LogInformation(" Outputting results to console");
|
||||
logger.LogInformation(reporter.Report(result));
|
||||
logger.LogInformation(" Outputting results to console", important: true);
|
||||
logger.LogInformation(reporter.Report(result), important: true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -135,7 +135,7 @@ namespace Coverlet.Console
|
||||
filename = Path.HasExtension(filename) ? filename : $"{filename}.{reporter.Extension}";
|
||||
|
||||
var report = Path.Combine(directory, filename);
|
||||
logger.LogInformation($" Generating report '{report}'");
|
||||
logger.LogInformation($" Generating report '{report}'", important: true);
|
||||
File.WriteAllText(report, reporter.Report(result));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user