Skip to content

Say that nothing was checked when a scan reads no files - #42

Merged
thebenignhacker merged 1 commit into
mainfrom
integrate/2026-10-19-r3
Oct 20, 2026
Merged

thebenignhacker merged 1 commit into
mainfrom
integrate/2026-10-19-r3

Conversation

@thebenignhacker

Copy link
Copy Markdown
Member

This pull request lands 1 commit in internal/cli, pkg/reporter, pkg/scanner and CHANGELOG.md.

Included

  • Say that nothing was checked when a scan reads no files

Verified on this exact tree

  • go build ./... (go1.26.3 darwin/arm64): exit 0
  • go vet ./...: exit 0
  • gofmt -l cmd internal pkg: no file listed
  • golangci-lint run --concurrency 4 (v2.12.2): exit 1 with 21 issues (errcheck: 15, staticcheck: 6); the same command on origin/main (8a28d0e) in a detached worktree prints the same 21 issues by file and message, so all 21 are pre-existing
  • go test -race -p 4 -count=1 -json ./...: exit 0; 8 packages ok, 1 package with no test files (pkg/version); 309 tests and 731 subtests passed, 0 failed, 0 skipped (counted from the -json pass, fail and skip events)
  • Changelog check, TestChangelogEntries and TestChangelogSaysWhereSARIFAndCSVCarryTheCryptoJSText in pkg/reporter: passed in that run

Not included

None

Closes

None

How to merge

Rebase and merge, so that each change stays its own commit on main.

A scan of an empty directory, or of one where every file was left out,
printed "Scanned: 0 files" and then a check mark with "No cryptographic
findings detected", which reads as a clean result although nothing was
checked. In color, the stream footer opened with a check mark as well.

When no file is scanned, the text report now prints "Nothing was checked:
no files were scanned under <target>" in place of the check mark line, and
the stream footer prints the same line under its counts, with no check
mark. When a config file kept every file out, the line also takes the
place of the config headline; the config summary above it still names the
file and what it kept out. JSON output is unchanged.

A scanner test now places the same project under parent directories named
docs, build, dist, wiki, bin, out, coverage and my-docs, with the file in a
subdirectory of the scan root, and checks that every scan reads the file
and reports exactly the findings of a scan under an ordinary parent. The
path rules already test the path relative to the scan root; the test also
covers a subdirectory below such a root and the out and coverage names.
@thebenignhacker
thebenignhacker merged commit 0fb15c5 into main Oct 20, 2026
4 checks passed
@thebenignhacker
thebenignhacker deleted the integrate/2026-10-19-r3 branch October 20, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant