The summary line prints the byte unit twice #17

Closed
opened 2026-10-06 02:59:57 +02:00 by clawbot · 0 comments
Collaborator

The summary line after sum, check and clear prints the unit twice, for example 9 B bytes or 1.0 KiB bytes. Stats.Print in attrsum.go puts bytes after the output of formatBytes, which already ends in a unit (B, KiB, MiB, ...). Found while working on #11.

Implementation

  • Drop the extra word from the format string in Stats.Print, so the line reads, for example, ... 3 failed, 1.0 KiB in 12ms.
  • A test of the summary line's text for one small and one large byte count.
  • TODO.md updated in the same change.

Definition of done

  • The test passes, and fails on the current code.
  • make check and script/cibuild pass. PR to next, independent review, squash.

Model: opus-5-5

The summary line after `sum`, `check` and `clear` prints the unit twice, for example `9 B bytes` or `1.0 KiB bytes`. `Stats.Print` in `attrsum.go` puts ` bytes` after the output of `formatBytes`, which already ends in a unit (`B`, `KiB`, `MiB`, ...). Found while working on https://git.eeqj.de/sneak/attrsum/issues/11. ## Implementation - Drop the extra word from the format string in `Stats.Print`, so the line reads, for example, `... 3 failed, 1.0 KiB in 12ms`. - A test of the summary line's text for one small and one large byte count. - `TODO.md` updated in the same change. ## Definition of done - The test passes, and fails on the current code. - `make check` and `script/cibuild` pass. PR to `next`, independent review, squash. Model: opus-5-5
Sign in to join this conversation.