Repository navigation
fix: harden fingerprint, const resolve, and version parse - #8
Merged
Merged
Conversation
Length-prefix finding fingerprints so field boundaries cannot collide, bump baseline to v2 (regenerate with --baseline-write), carry Go const expression lists across omitted specs, and parse leading ints in ast-grep versions so pre-release suffixes do not become 0. Add fuzz targets and benchmarks for the touched paths. Co-authored-by: Bartłomiej Piekarz <Pieczasz@users.noreply.github.com>
Fingerprint encoding remains length-prefixed; baseline schema stays at version 2 so old v1 baseline files are rejected and must be rewritten. Co-authored-by: Bartłomiej Piekarz <Pieczasz@users.noreply.github.com>
The draft PR's scanOpts refactor predates TAR-47 check sharing normalizeEngine/flagString/ensurePatternRules; keep those APIs. Co-authored-by: Bartłomiej Piekarz <Pieczasz@users.noreply.github.com>
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.
Summary
Restores valuable correctness work from incorrectly closed #5 (sibling closed as "stale" while commits were not on main). Rebased onto current
main.|inside a field cannot collide across boundaries. Baseline version bumped to 2; v1 files are rejected (regenerate with--baseline-write).analyzeGonow mirrors omitted const expression lists.leadingIntso1-rc.1does not parse as0.Dropped the draft's stale
scanOptsrefactor so TAR-47checkshared helpers stay intact.Test plan
go test -race -count=1 ./...(ast-grep 0.45.1)go veton touched packagesCloses the gap left by #5.