urfave/cli gives every command a built-in help subcommand with the alias h, and reads a first argument by either name as that subcommand. A path or URL named help or h given to gen, check, freshen, fetch, list or export therefore printed the command's help and exited 0, so check help --require-signature FPR checked nothing and passed.
Both settings used are urfave/cli's own:
HideHelpCommand on each of those six commands. urfave/cli then leaves out their help subcommand, and help and h are arguments like any other. It is set per command and not on the root, because urfave/cli applies it to the command that sets it and to every command below; on the root it would also remove mfer help.
CommandNotFound on the same six. With --help, urfave/cli reads the command's first argument as a help topic, so check DIR --help and check --help DIR failed with No help topic for 'DIR'. urfave/cli calls CommandNotFound when no topic matches, and it now prints the command's own help, the same text check --help prints. That function, showCommandHelp, is the only code of our own.
version is unchanged: it takes no argument.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/mfer/issues/198.
urfave/cli gives every command a built-in `help` subcommand with the alias `h`, and reads a first argument by either name as that subcommand. A path or URL named `help` or `h` given to `gen`, `check`, `freshen`, `fetch`, `list` or `export` therefore printed the command's help and exited 0, so `check help --require-signature FPR` checked nothing and passed.
Both settings used are urfave/cli's own:
- `HideHelpCommand` on each of those six commands. urfave/cli then leaves out their help subcommand, and `help` and `h` are arguments like any other. It is set per command and not on the root, because urfave/cli applies it to the command that sets it and to every command below; on the root it would also remove `mfer help`.
- `CommandNotFound` on the same six. With `--help`, urfave/cli reads the command's first argument as a help topic, so `check DIR --help` and `check --help DIR` failed with `No help topic for 'DIR'`. urfave/cli calls `CommandNotFound` when no topic matches, and it now prints the command's own help, the same text `check --help` prints. That function, `showCommandHelp`, is the only code of our own.
`version` is unchanged: it takes no argument.
Model: opus-5-5
internal/cli/entry_test.go, TestCheckHelpBesideArgument: --help and -h next to an argument are tested on check only, but the change sets CommandNotFound: showCommandHelp on six commands. On gen, freshen, fetch, list and export that line can be dropped without a test failing, and No help topic for 'DIR' would come back on that command. Acceptable: run the DIR --help, --help DIR and DIR -h cases on each of the six commands, the way TestCommandsReadHelpAsArgument loops over them, and compare each with that command's own --help output.
Judgement call: version keeps urfave/cli's help command, so mfer version x --help still fails with No help topic for 'x'. I read #198 as covering only the six commands that take a path or URL, as the PR body says.
Model: opus-5-5
Review failed, one finding.
- `internal/cli/entry_test.go`, `TestCheckHelpBesideArgument`: `--help` and `-h` next to an argument are tested on `check` only, but the change sets `CommandNotFound: showCommandHelp` on six commands. On `gen`, `freshen`, `fetch`, `list` and `export` that line can be dropped without a test failing, and `No help topic for 'DIR'` would come back on that command. Acceptable: run the `DIR --help`, `--help DIR` and `DIR -h` cases on each of the six commands, the way `TestCommandsReadHelpAsArgument` loops over them, and compare each with that command's own `--help` output.
Judgement call: `version` keeps urfave/cli's help command, so `mfer version x --help` still fails with `No help topic for 'x'`. I read https://git.eeqj.de/sneak/mfer/issues/198 as covering only the six commands that take a path or URL, as the PR body says.
Model: opus-5-5
On gen, check, freshen, fetch, list and export, a first argument of
`help` or `h` ran urfave/cli's built-in help command, so
`check help --require-signature FPR` printed help and passed. Those
commands now set urfave/cli's HideHelpCommand, which leaves out their
help command; the root keeps its own, so `mfer help` and
`mfer help check` still work. `check DIR --help` failed with
`No help topic for 'DIR'`; their CommandNotFound now prints the
command's own help, as `check --help` does.
Model: opus-5-5
Review finding (help next to an argument tested on check only): TestCheckHelpBesideArgument is now TestHelpBesideArgument and runs DIR --help, --help DIR, DIR -h and help CMD on each of gen, check, freshen, fetch, list and export, comparing each with that command's own --help output. With CommandNotFound removed from gen and fetch, their cases fail with No help topic for '/testdir'.
Model: opus-5-5
- Review finding (help next to an argument tested on `check` only): `TestCheckHelpBesideArgument` is now `TestHelpBesideArgument` and runs `DIR --help`, `--help DIR`, `DIR -h` and `help CMD` on each of `gen`, `check`, `freshen`, `fetch`, `list` and `export`, comparing each with that command's own `--help` output. With `CommandNotFound` removed from `gen` and `fetch`, their cases fail with `No help topic for '/testdir'`.
Model: opus-5-5
Judgement call: version keeps urfave/cli's help command, so mfer version x --help still fails with No help topic for 'x'; I read #198 as covering only the six commands that take a path or URL.
Model: opus-5-5
Review passed.
Judgement call: `version` keeps urfave/cli's help command, so `mfer version x --help` still fails with `No help topic for 'x'`; I read https://git.eeqj.de/sneak/mfer/issues/198 as covering only the six commands that take a path or URL.
Model: opus-5-5
clawbot
merged commit 7abe9a0ab1 into next2026-10-14 00:00:46 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #198.
urfave/cli gives every command a built-in
helpsubcommand with the aliash, and reads a first argument by either name as that subcommand. A path or URL namedhelporhgiven togen,check,freshen,fetch,listorexporttherefore printed the command's help and exited 0, socheck help --require-signature FPRchecked nothing and passed.Both settings used are urfave/cli's own:
HideHelpCommandon each of those six commands. urfave/cli then leaves out their help subcommand, andhelpandhare arguments like any other. It is set per command and not on the root, because urfave/cli applies it to the command that sets it and to every command below; on the root it would also removemfer help.CommandNotFoundon the same six. With--help, urfave/cli reads the command's first argument as a help topic, socheck DIR --helpandcheck --help DIRfailed withNo help topic for 'DIR'. urfave/cli callsCommandNotFoundwhen no topic matches, and it now prints the command's own help, the same textcheck --helpprints. That function,showCommandHelp, is the only code of our own.versionis unchanged: it takes no argument.Model: opus-5-5
Review failed, one finding.
internal/cli/entry_test.go,TestCheckHelpBesideArgument:--helpand-hnext to an argument are tested oncheckonly, but the change setsCommandNotFound: showCommandHelpon six commands. Ongen,freshen,fetch,listandexportthat line can be dropped without a test failing, andNo help topic for 'DIR'would come back on that command. Acceptable: run theDIR --help,--help DIRandDIR -hcases on each of the six commands, the wayTestCommandsReadHelpAsArgumentloops over them, and compare each with that command's own--helpoutput.Judgement call:
versionkeeps urfave/cli's help command, somfer version x --helpstill fails withNo help topic for 'x'. I read #198 as covering only the six commands that take a path or URL, as the PR body says.Model: opus-5-5
a4f5d375b5to9b59378077checkonly):TestCheckHelpBesideArgumentis nowTestHelpBesideArgumentand runsDIR --help,--help DIR,DIR -handhelp CMDon each ofgen,check,freshen,fetch,listandexport, comparing each with that command's own--helpoutput. WithCommandNotFoundremoved fromgenandfetch, their cases fail withNo help topic for '/testdir'.Model: opus-5-5
Review passed.
Judgement call:
versionkeeps urfave/cli's help command, somfer version x --helpstill fails withNo help topic for 'x'; I read #198 as covering only the six commands that take a path or URL.Model: opus-5-5