Skip to content

Commit 9215bdf

Browse files
author
Chet Husk
committed
Update baselines and unify help outputs
1 parent 193fe4d commit 9215bdf

21 files changed

+263
-249
lines changed

src/Cli/Microsoft.DotNet.Cli.CommandLine/OptionBuilderExtensions.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,11 @@ public T AddCompletions(Func<CompletionContext, IEnumerable<CompletionItem>> com
4242
option.CompletionSources.Add(completionSource);
4343
return option;
4444
}
45+
46+
public T Recursive(bool isRecursive = true)
47+
{
48+
option.Recursive = isRecursive;
49+
return option;
50+
}
4551
}
4652
}

src/Cli/dotnet/Commands/CliCommandStrings.resx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2343,7 +2343,8 @@ and the corresponding package Ids for installed tools using the command
23432343
<value>Shut down the VB/C# compiler build server.</value>
23442344
</data>
23452345
<data name="Verbosity_OptionDescription" xml:space="preserve">
2346-
<value>Sets the verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], and diag[nostic].</value>
2346+
<value>Sets the verbosity level. Allowed values are: {0}.</value>
2347+
<comment>{0} is a comma separated list of verbosity levels: quiet, minimal, normal, detailed, diagnostic</comment>
23472348
</data>
23482349
<data name="VerbosityArgumentName" xml:space="preserve">
23492350
<value>Verbosity</value>

src/Cli/dotnet/Commands/New/NewCommandParser.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,10 @@ internal static class NewCommandParser
4848
Recursive = true
4949
}.Hide();
5050

51-
private static readonly Option<Verbosity> s_verbosityOption = new("--verbosity", "-v")
52-
{
53-
DefaultValueFactory = _ => DefaultVerbosity,
54-
Description = CliCommandStrings.Verbosity_OptionDescription,
55-
HelpName = CliStrings.LevelArgumentName,
56-
Recursive = true
57-
};
51+
private static readonly Option<Verbosity> s_verbosityOption =
52+
CommonOptions.VerbosityOption(DefaultVerbosity)
53+
.WithDescription(string.Format(CliCommandStrings.Verbosity_OptionDescription, string.Join(", ", VerbosityData.VerbosityNames)))
54+
.Recursive();
5855

5956
private static readonly Option<bool> s_diagnosticOption =
6057
CommonOptionsFactory

src/Cli/dotnet/Commands/xlf/CliCommandStrings.cs.xlf

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)