Skip to content
This repository has been archived by the owner on Jun 10, 2021. It is now read-only.

Usage should indicate that one of '--extensions' and '--include-extensionless' is required #56

Closed
DanielHeath opened this issue Jun 2, 2015 · 4 comments

Comments

@DanielHeath
Copy link

Currently, if I run codemod.py foo bar, I get the following:

usage: codemod.py [-h] [-m] [-d D] [-i] [--start START] [--end END]
                  [--extensions EXTENSIONS] [--include-extensionless]
                  [--exclude-paths EXCLUDE_PATHS] [--accept-all]
                  [--editor EDITOR] [--count] [--test]
                  [match] [subst]

In most utilities I've used, the usage string does not use square brackets around required parameters.

@keyan
Copy link
Contributor

keyan commented Jun 22, 2015

The brackets will be removed if the argument is set to required=True but there is no way to specify that one of two arguments is required. Instead the way in which extension passing is handled needs to be changed to do this.

@keyan
Copy link
Contributor

keyan commented Jun 22, 2015

@DanielHeath

@DanielHeath
Copy link
Author

Yep - just something I found a little confusing when figuring out the options.

@josericardo
Copy link

+1. Or it could just scan all file extensions by default.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants