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

Extend nuke --help to show the accepted values for parameters #1242

Open
BusHero opened this issue Aug 27, 2023 · 1 comment
Open

Extend nuke --help to show the accepted values for parameters #1242

BusHero opened this issue Aug 27, 2023 · 1 comment

Comments

@BusHero
Copy link
Contributor

BusHero commented Aug 27, 2023

Description

As a user
I would like to see what values parameters are accepting when running nuke --help
So that I don't have to guess how correctly to use a parameter.

Currently, nuke doesn't show what values parameters are accepting. This makes it harder to use parameters, as you have either to guess what values a parameter is accepting or look in other places(ex .nuke\build.schema.json, source files, etc.) for the accepted values. The problem becomes obvious when trying to use some lesser used parameters(ex. --verbosity) and when working with an unfamiliar code base that uses nuke.

By adding the accepted values(or data types?) to the description of parameters when running nuke --help, it will make it simpler for the user to run nuke.

Here is what it can look like:

Parameters:

  --continue(switch)                                           Indicates to continue a previously failed build attempt.
  --profile(string)                                            Defines the profiles to load.
  --verbosity(''Minimal', 'Quiet', 'Normal', 'Verbose')        Logging verbosity during build execution. Default is 'Normal'.
  --root(AbsolutePath)                                         Root directory during build execution.

Usage Example

> nuke --help
...
Parameters:

  --continue(switch)                                    Indicates to continue a previously failed build attempt.
  --profile(string)                                     Defines the profiles to load.
  --verbosity(''Minimal', 'Quiet', 'Normal', 'Verbose') Logging verbosity during build execution. Default is 'Normal'.
  --root(AbsolutePath)                                  Root directory during build execution.

Alternative

  • Include the accepted values in the description of each parameter.
  • Trust nuke's completer to suggest the right value(works for enums)
  • look in .nuke\build.schema.json
  • search through the projects source files

Could you help with a pull-request?

Yes

@BusHero BusHero changed the title Extend the nuke --help to show the accepted values for parameters Extend nuke --help to show the accepted values for parameters Aug 28, 2023
@JinsPeter
Copy link

A Target to Parameter mapping can also be useful. is should be best to accept a parameter list as Fluent method on the Target definition just list we do for Required parameters

@matkoch matkoch removed the triage label Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants