mfer check -q prints nothing about a missing, corrupted or wrongly-moded file, nor about an extra file under --no-extra-files; only exit status 1 says the check failed. countCheckFailures and findExtraFiles in internal/cli/check.go log each failure with log.Infof, and -q sets the level to errors only (setVerbosity in internal/cli/mfer.go). The -q help says Suppress output except errors, the README says check displays an error for a bad file, and #103 settled that --quiet suppresses the warnings, not the failures.
Reproduce on next (0fbb3da): mfer gen t; echo corrupt > t/a.txt; mfer check -q t exits 1 and prints nothing.
Correct: each failed file (MISSING, SIZE_MISMATCH, HASH_MISMATCH, MODE_MISMATCH, ERROR, and EXTRA under --no-extra-files) is logged at error level, so -q still shows it; EXTRA without --no-extra-files stays a warning. The closing N failed summary may stay at info level.
Definition of done
Failing test first through the CLI: check -q on a corrupted file prints the HASH_MISMATCH line; check -q on a passing tree prints nothing.
The fix in internal/cli/check.go.
make check passes.
Model: fable-5-1
`mfer check -q` prints nothing about a missing, corrupted or wrongly-moded file, nor about an extra file under `--no-extra-files`; only exit status 1 says the check failed. `countCheckFailures` and `findExtraFiles` in `internal/cli/check.go` log each failure with `log.Infof`, and `-q` sets the level to errors only (`setVerbosity` in `internal/cli/mfer.go`). The `-q` help says `Suppress output except errors`, the README says `check` displays an error for a bad file, and https://git.eeqj.de/sneak/mfer/issues/103 settled that `--quiet` suppresses the warnings, not the failures.
Reproduce on `next` (0fbb3da): `mfer gen t; echo corrupt > t/a.txt; mfer check -q t` exits 1 and prints nothing.
Correct: each failed file (`MISSING`, `SIZE_MISMATCH`, `HASH_MISMATCH`, `MODE_MISMATCH`, `ERROR`, and `EXTRA` under `--no-extra-files`) is logged at error level, so `-q` still shows it; `EXTRA` without `--no-extra-files` stays a warning. The closing `N failed` summary may stay at info level.
## Definition of done
- Failing test first through the CLI: `check -q` on a corrupted file prints the `HASH_MISMATCH` line; `check -q` on a passing tree prints nothing.
- The fix in `internal/cli/check.go`.
- `make check` passes.
Model: fable-5-1
clawbot
self-assigned this 2026-10-12 11:17:37 +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.
mfer check -qprints nothing about a missing, corrupted or wrongly-moded file, nor about an extra file under--no-extra-files; only exit status 1 says the check failed.countCheckFailuresandfindExtraFilesininternal/cli/check.golog each failure withlog.Infof, and-qsets the level to errors only (setVerbosityininternal/cli/mfer.go). The-qhelp saysSuppress output except errors, the README sayscheckdisplays an error for a bad file, and #103 settled that--quietsuppresses the warnings, not the failures.Reproduce on
next(0fbb3da):mfer gen t; echo corrupt > t/a.txt; mfer check -q texits 1 and prints nothing.Correct: each failed file (
MISSING,SIZE_MISMATCH,HASH_MISMATCH,MODE_MISMATCH,ERROR, andEXTRAunder--no-extra-files) is logged at error level, so-qstill shows it;EXTRAwithout--no-extra-filesstays a warning. The closingN failedsummary may stay at info level.Definition of done
check -qon a corrupted file prints theHASH_MISMATCHline;check -qon a passing tree prints nothing.internal/cli/check.go.make checkpasses.Model: fable-5-1