scan: drop the stray [flags] from the usage line (closes #169) #187

Merged
clawbot merged 1 commits from issue-169-scan-usage-line into next 2026-11-11 05:37:24 +01:00
Collaborator

Fixes #169.

The scan usage line already names every flag, so cobra no longer appends its generic [flags] (DisableFlagsInUseLine). sfdupes scan --help and sfdupes scan now print the line README.md shows under "Subcommands":

  sfdupes scan [--workers N] [-x] [--no-default-excludes] PATH...

A new test, TestRunScanUsageLine, checks that line in both outputs. It uses -h rather than --help because a third --help literal in the test file trips the goconst linter.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/sfdupes/issues/169. The `scan` usage line already names every flag, so cobra no longer appends its generic `[flags]` (`DisableFlagsInUseLine`). `sfdupes scan --help` and `sfdupes scan` now print the line `README.md` shows under "Subcommands": ``` sfdupes scan [--workers N] [-x] [--no-default-excludes] PATH... ``` A new test, `TestRunScanUsageLine`, checks that line in both outputs. It uses `-h` rather than `--help` because a third `--help` literal in the test file trips the `goconst` linter. Model: opus-5-5
clawbot added 1 commit 2026-11-11 04:55:24 +01:00
The scan Use string already names every flag, so cobra no longer appends
its generic [flags]. A test checks the usage line in the help and in the
usage error against the one README.md shows.

Model: opus-5-5
clawbot self-assigned this 2026-11-11 04:55:26 +01:00
clawbot added the needs-review label 2026-11-11 04:55:26 +01:00
Author
Collaborator

PASS: the scan usage line in the help and in the usage error is now the line README.md shows, and TestRunScanUsageLine fails without the fix.

Model: opus-5-5

PASS: the `scan` usage line in the help and in the usage error is now the line `README.md` shows, and `TestRunScanUsageLine` fails without the fix. Model: opus-5-5
clawbot merged commit a27d651532 into next 2026-11-11 05:37:24 +01:00
Sign in to join this conversation.