Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename symbol types with Cli prefix #2132

Merged
merged 4 commits into from
Mar 31, 2023

Conversation

jonsequitur
Copy link
Contributor

@jonsequitur jonsequitur commented Mar 30, 2023

This also renames a number of properties and renames or moves a few other files so that file names match type names.

It fixes #2131.
fixes #1892
fixes #1916

@jonsequitur jonsequitur enabled auto-merge (squash) March 30, 2023 23:51
Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, :shipit: !

@@ -89,19 +92,19 @@ public ArgumentArity Arity
/// </example>
public bool AllowMultipleArgumentsPerToken { get; set; }

internal virtual bool IsGreedy
internal virtual bool Greedy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great idea to rename the internal properties as well! 👍

@@ -6,25 +6,27 @@ namespace System.CommandLine
/// Enables the use of the <c>[parse]</c> directive, which when specified on the command line will short
/// circuit normal command handling and display a diagram explaining the parse result for the command line input.
/// </summary>
public sealed class ParseDirective : Directive
public sealed class ParseDiagramDirective : CliDirective
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The approved name is DiagramDirective. I am going to send a separate PR with a rename and changing [parse] to [diagram] just to start a discussion


/// <summary>
/// Indicates whether the result was created implicitly and not due to the option being specified on the command line.
/// </summary>
/// <remarks>Implicit results commonly result from options having a default value.</remarks>
public bool IsImplicit => IdentifierToken is null || IdentifierToken.IsImplicit;
public bool Implicit => IdentifierToken is null || IdentifierToken.Implicit;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for renaming all the properties, including even these which were not officially approved yet. It's great for consistency and should help in the next API review round

@jonsequitur jonsequitur merged commit 403234a into dotnet:main Mar 31, 2023
@jonsequitur
Copy link
Contributor Author

Thanks for linking the other issues this addressed. @adamsitnik!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants