Repository navigation
Say that nothing was checked when a scan reads no files - #42
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request lands 1 commit in
internal/cli,pkg/reporter,pkg/scannerandCHANGELOG.md.Included
Verified on this exact tree
go build ./...(go1.26.3 darwin/arm64): exit 0go vet ./...: exit 0gofmt -l cmd internal pkg: no file listedgolangci-lint run --concurrency 4(v2.12.2): exit 1 with 21 issues (errcheck: 15, staticcheck: 6); the same command onorigin/main(8a28d0e) in a detached worktree prints the same 21 issues by file and message, so all 21 are pre-existinggo 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-jsonpass, fail and skip events)TestChangelogEntriesandTestChangelogSaysWhereSARIFAndCSVCarryTheCryptoJSTextinpkg/reporter: passed in that runNot included
None
Closes
None
How to merge
Rebase and merge, so that each change stays its own commit on
main.