Skip to content

ENH Warn on unused options #1975

@Lestropie

Description

@Lestropie

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions