You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Grouping arguments would allow for over-arching documentation for specific groups of arguments.
Might be able to use a similar interface as #33 for this. Possibly only annotate first arg of group, and assume all args until next group annotation are in that group:
script({
int timeout,
// ... other options that don't belong to a specific group.@HelpBlock('Formatting options', 'Options to tailor the output')
bool indent,
String separator:' ',
//...
}) {
}
Positional arguments should just be in their own single group, since there should never be more than 2 or 3 of them.
Possibly related dart feature request, which might be able to provide a less command-line specific interface for this: http://dartbug.com/2783
Also, flag groups could be made mutually exclusive where only one option from the group can be specified, otherwise a helpful error message is displayed. For example, there might be multiple verbosity options like --quiet, --verbose, --trace etc, see #4. These options could potentially be modeled by an enum (when dart supports those), and a single enum value could be passed to the script method,
Still need to think about the interface to declare that a script takes one of these mutually exclusive flag groups. It might involve the allowed attribute, and be related to #13.
Note: Verbosity option groups may not actually be passed as a direct value, see #4.
The text was updated successfully, but these errors were encountered:
Grouping arguments would allow for over-arching documentation for specific groups of arguments.
Might be able to use a similar interface as #33 for this. Possibly only annotate first arg of group, and assume all args until next group annotation are in that group:
Positional arguments should just be in their own single group, since there should never be more than 2 or 3 of them.
Possibly related dart feature request, which might be able to provide a less command-line specific interface for this: http://dartbug.com/2783
Also, flag groups could be made mutually exclusive where only one option from the group can be specified, otherwise a helpful error message is displayed. For example, there might be multiple verbosity options like --quiet, --verbose, --trace etc, see #4. These options could potentially be modeled by an enum (when dart supports those), and a single enum value could be passed to the script method,
Still need to think about the interface to declare that a script takes one of these mutually exclusive flag groups. It might involve the
allowed
attribute, and be related to #13.Note: Verbosity option groups may not actually be passed as a direct value, see #4.
The text was updated successfully, but these errors were encountered: