Repository navigation
refactor(goast): the shared walker — parsedSources over an extended parsedFile - #320
Merged
Merged
Conversation
…arsedFile The structure ruling pre-declared in the complexity plan's phase-3 notes. parsedFile gains the path it was parsed from (one concept, one type); parsedEntry becomes the single cache-or-parse primitive with parseFile layered over it; parsedSources yields iter.Seq[*parsedFile] — collection failures surface at the call so every client keeps its own error wrap, parse failures skip mid-iteration (the existing semantics stated once), and breaking the range is the early exit Callable and TypeDoc use naturally. Four clients converted (Callable, ConstGroups, Structs, TypeDoc); Deps and Metrics stay — they share only the collection, parsing with different modes. Ownership rider: phase 7's final squeeze skipped the full-config recount and shipped eleven style debts in my own helpers — seven unnamedResult, one paramTypeCombine, one G204 (extraction changed gosec's taint view; suppressed with provenance), one misspell, one unparam (failAndUnwind's always-nil result dropped). All fixed here. Full-config lint: zero findings, uncapped. make vet and full make test pass; gofmt clean. Plan: docs/plans/goast-walker.md.
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.
The pre-declared phase-3 structure ruling, executed as ruled:
iter.Seq[*parsedFile]with the cache entry extended to carry its path. Four true walker clients converted;Deps/Metricsdeliberately untouched (different parse modes). Rider owned in the plan doc: eleven style findings my phase-7 squeeze helpers shipped (the batch skipped the full-config recount) are fixed here — the board reads zero again, uncapped. Vet + full suite green.