Both tools parse sys.argv by hand, so --help was taken as the input folder:
classify_carve reported '--help: does not exist' (exit 2) and spirv_stubs
'missing --help/index.json' (exit 1). -h and --help now print the usage to
stdout and exit 0 without touching the file system. Tests cover both flags
on both tools and fail on the previous code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The module docstring has said types.json holds counts and size stats, but
only files and bytes were written. Each per-class entry, overall and per
archive, now also has min, max and median: the smallest, largest and
median (lower middle for an even count) file size in bytes. The existing
keys, their values and the printed summary are unchanged.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
main() read sys.argv[1] directly: no argument was an IndexError, a
missing root a FileNotFoundError from os.listdir and a file a
NotADirectoryError, all as tracebacks. A second argument was silently
ignored and the run went ahead. Now a wrong argument count prints the
usage line, and a missing or non-folder root names the path; both exit
2 before types.json is written.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>