Commit Graph
7 Commits
Author SHA1 Message Date
clawbot 4fd857bc32 Keep going past unreadable files with check --continue (closes #11)
check / check (push) Successful in 2m1s
With --continue, check stopped at the first file whose content or
checksum attribute it could not read, and at the first directory it
could not list. Each of these now counts as failed, its error, which
names the path, goes to stderr, and the walk goes on; the run still
exits non-zero. The count that sizes the progress bar leaves such a
path out, so the bar stays. The walk and the count, shared with sum
and clear, take the continue setting; those commands pass false and
still stop at the first error. Without --continue the first such error
still stops the run, and the summary printed before it now counts an
unreadable checksum attribute as failed, as it already did for
unreadable content.

Model: opus-5-5
2026-10-06 05:44:04 +02:00
sneak 7f75f2ee72 Clear all golangci-lint findings and make the CI build green (closes #1)
check / check (push) Successful in 1m7s
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).
2026-07-27 00:55:46 +07:00
sneak b9d65115c2 Use single progress bar when processing multiple paths
Instead of creating a new progress bar for each path, count total files
across all paths upfront and use a single unified progress bar. This
provides clearer UX when processing multiple directories.
2026-02-02 13:46:18 -08:00
sneak 86764abadf Add quiet mode, progress bar, summary report, and stdin support
- 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
2026-02-01 04:22:13 -08:00
sneak ebbe20dbdf now skips all but regular files 2025-05-08 14:10:38 -07:00
sneak 1bb9528548 seems to work, tests pass. woo! 2025-05-08 13:59:35 -07:00
sneak 1378f1d221 initial 2025-05-08 13:26:05 -07:00