Skip to content

refactor(complexity): phase 3 — the goast provider methods - #315

Merged
David-Noble-at-work merged 1 commit into
developfrom
refactor/complexity-goast-provider
Aug 3, 2026
Merged

David-Noble-at-work merged 1 commit into
developfrom
refactor/complexity-goast-provider

Conversation

@David-Noble-at-work

Copy link
Copy Markdown
Contributor

Phase 3 of docs/plans/complexity-refactors.md (#312): nine functions decomposed under the thresholds, including the repo's worst (ConstGroups, 70 → a named state machine with an explicit flush). Behavior-preserving throughout — the suite passes unmodified. The pre-declared structure question is now concrete in the phase notes: five methods still repeat the per-file parse walk; a shared walker awaits a ruling. Plan doc rides along with phase 3 marked complete.

Third phase of the complexity plan (#312): nine functions under the
thresholds by behavior-preserving decomposition, including the repo's
worst. ConstGroups (70) becomes a named state machine —
constGroupsFromDecl with an explicit flush closure, entries via
constEntriesFromSpec, its anonymous local types promoted to file-level
constEntry/constGroup. Structs (49) extracts
structFields/fieldDetailsFrom; Callable (49) and TypeDoc (24) share
typeSpecDoc via per-file finders; Methods (38) splits filter from
construction; SortDeclarations (24) splits block collection from
splicing; Calls (22) and Composites (35) extract their closure bodies;
spacingRulesFromConfig (17 gocyclo) goes table-driven over its
order-independent fields.

The plan's pre-declared structure question is now concrete and recorded
in the phase notes: the collectGoFiles+parseFile iteration remains
repeated in five methods; a shared per-file walker is available for a
ruling, not adopted unilaterally.

Zero complexity findings remain in the file; no new findings anywhere;
make vet and full make test pass unmodified; gofmt clean.
Plan: docs/plans/complexity-refactors.md (phase 3 complete).
@David-Noble-at-work David-Noble-at-work self-assigned this Aug 3, 2026
@David-Noble-at-work
David-Noble-at-work merged commit d3302ca into develop Aug 3, 2026
2 checks passed
@David-Noble-at-work
David-Noble-at-work deleted the refactor/complexity-goast-provider branch August 3, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant