Usage should indicate that one of '--extensions' and '--include-extensionless' is required
DanielHeath opened this issue · 4 comments
DanielHeath commented
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 commented
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 commented
DanielHeath commented
Yep - just something I found a little confusing when figuring out the options.
josericardo commented
+1. Or it could just scan all file extensions by default.