Repository navigation
Report trace files that scan cannot read, decompress or parse - #23
Merged
jackfranklin merged 1 commit intoNov 25, 2026
Merged
Conversation
`scan` lists these files in `skippedFiles` with the reason and continues with the other files. Before, it dropped them silently, so a broken trace looked the same as a trace without matches. A file with invalid JSON is only reported when its text contains the query, because the text pre-filter runs before parsing and a file without the query text cannot match.
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.
scanlists files that it cannot read, decompress or parse inskippedFiles, with the reason, and continues with the other files. Before, it dropped them silently, so a corrupt.json.gzor a truncated trace looked the same as a trace without matches, andtotalFilesScannedstill counted it.A file with invalid JSON is only reported when its text contains the query. The text pre-filter runs before parsing, and a file without the query text cannot match, so it is not missing from the results.
Markdown output adds a "Files Skipped" count and a "Skipped Files" table when there are skipped files. TOON and JSON always include
skippedFiles, as an empty list when every file was searched.Tests cover a corrupt gzip file, truncated JSON, an unreadable file, invalid JSON that cannot match, and the Markdown output. Verified with
npm run check,npm run build,npm testand the built CLI on a folder with valid and broken traces.Fixes the silently skipped files reported in #9.