`make fmt` now runs prettier over the Markdown files after the Go
formatters, and `make fmt-check` fails when prettier would change one.
`package.json`, `yarn.lock`, `.prettierrc` and `.prettierignore` are the
`sneak/prompts` copies at `dd4027b`, except for `"private": true` in
`package.json` in place of the licence field. Both scripts find yarn the
way that repo's scripts do. `script/bootstrap` installs prettier with
`yarn install --frozen-lockfile`. When the yarn those scripts would run
is not 1.22.22, it installs yarn through corepack under node 22.17.0:
the node on `PATH` if it has that version, otherwise one installed
through nvm from a hash-checked archive. `README.md` and `TODO.md` are
reformatted once.
Model: opus-5-5
script/fmt writes with gofmt -s and goimports, but script/fmt-check
only ran gofmt -l. A file that gofmt -s would simplify, or whose
imports goimports would regroup, passed make check and then changed
on the next make fmt.
script/fmt-check now runs gofmt -s -l and goimports -l, prints each
file either would change once, and fails. It puts Go's bin directory
on PATH first, as script/fmt does, so it runs the goimports that
script/bootstrap installs. The README line on what make check runs
now names both formatters.
Model: opus-5-5
The Dockerfile gets a lint phase on the pinned golangci-lint v2.12.2
image and a test phase on the Debian Go image. The tests run as an
unprivileged user, because root reads a file with mode 0000 and the
permission test then fails. The build stage copies a file from each
phase, so no build finishes unless both pass, and it no longer runs
make check. script/lint and script/test each build their phase,
uncached and tagged; script/cibuild bootstraps, runs script/check, then
builds the image. script/bootstrap no longer installs golangci-lint.
README.md and TODO.md describe the new setup.
Model: opus-5-5
Fix every golangci-lint finding under the repo's standard .golangci.yml
(from ~192 down to 0 under the pinned v2.10.1) without changing program
behavior:
- gochecknoglobals: replace the verbose/quiet/exclude* package globals with
an options struct threaded through the command implementations.
- err113: introduce package-level sentinel errors and wrap them with %w.
- errcheck: check or explicitly discard every previously unchecked error
(bar.Add/Finish, deferred Close, verbose writes).
- forbidigo: route verbose output through os.Stdout instead of fmt.Print*.
- noinlineerr / wsl_v5 / nlreturn / gofmt: split inline error checks and
normalize whitespace.
- complexity (cyclop/gocognit/nestif): extract small behavior-preserving
helpers (runOverPaths, countAndBar, walkSkip, clearOne, checkOne,
missingChecksum, reportCheck).
- mnd/lll/nonamedreturns/revive/modernize/nilnil: named constants, wrapped
lines, unnamed returns, doc comments, SplitSeq, non-(nil,nil) returns.
- paralleltest/thelper: mark tests parallel (now race-safe with no shared
globals) and add t.Helper(); probe the real xattr key so the guard is
accurate.
Also make the tests actually runnable in CI rather than skipping:
- move the xattr keys into the user.* namespace (user.berlin.sneak.app.*),
which Linux requires for regular-file xattrs; macOS treats the whole
string as an opaque name, so behavior is unchanged there.
- run the Docker builder's checks as an unprivileged user so the permission
tests are meaningful (root bypasses file mode bits).
- Add -q/--quiet flag to suppress all output except errors
- Add progress bar with 250ms refresh, file count, and ETA display
- Print summary report to stderr on completion (files processed, skipped, failed, bytes, duration)
- Support reading paths from stdin with "-" argument (e.g., find | attrsum sum add -)
- Update README with new features and updated TODO section
- Change sum add, sum update, check, and clear to accept 1+ paths
- Update README usage examples to show multiple path support
- Add TODO section with planned future improvements