Repository navigation
Name the full path of a file that fails to hash [patch] - #167
Merged
Merged
Conversation
FileHasher.ReportSkipped printed only the file name, so in a tree where IMG_0001.jpg or index.js repeats there was no way to tell which copy could not be read. It now prints the absolute path, like every other diagnostic the tool writes. Fixes #154 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q5ZFyLG9PgeKn5RpzhWEUQ
|
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.



Fixes #154
What changed
FileHasher.ReportSkippedprintedError hashing {filePath.FileName}. In a tree whereIMG_0001.jpgorindex.jsappears many times, that doesn't tell you which copy failed. It now prints the absolute path, as every other diagnostic in the tool already does.Tests
I added
VerbOutputTests.AHashingErrorNamesTheFullPath. It putsIMG_0001.jpgin two folders, holds one of them open withFileShare.None(the same techniqueStatsReportsAFileItCannotHashAsUnreadableuses, so it also works under root), and asserts that the output containsError hashing <full path>:.The issue suggested asserting this in
FileScannerAndHasherTests.HashingSkipsAnUnreadableFileAndStillHashesTheRestinstead. That class is not[DoNotParallelize], and redirecting the console there would race other tests.VerbOutputTestsalready redirects the console safely, so the test lives there.With the
FileHasher.cschange reverted, the new test fails. With it, the full suite passes: 60 passed, 2 pre-existing skips.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q5ZFyLG9PgeKn5RpzhWEUQ
Generated by Claude Code