-
Notifications
You must be signed in to change notification settings - Fork 197
ENH Warn on unused options #1975
Description
Raising in the context of mrfilter, but there's probably other commands where the same argument is applicable.
In commands where there are discrete set of operations available, each of which has its own unique set of command-line options, but the user provides a command-line option that isn't applicable to the operation selected, the command should at the very least issue a warning, if not abort outright (probably my preference). In this specific case, mrfilter smooth -extent was used: -extent gets ignored and the default smoothing FWHM is used, both silently.
I'm sure I've used code somewhere that generates a list of all available command-line options, removes only those options applicable to the operation selected, and then verifies that the user hasn't specified any of the other options. Maybe there should be something along these lines embedded deeper within MR::App?