review: full-repo style audit — godoc and declaration-layout normalization#93
Merged
Conversation
…hod siblings From a full-repo /code audit against the updated SKILL.md. Only exported types, New constructors, and methods whose documented siblings make the omission an inconsistency are covered; interface-implementing methods, consistent accessor/skip-all files, and build-tag stubs are left as-is.
Full-repo /code audit follow-up; layout-only, zero behavior change: - metering: place compile-time interface checks above their implementing types (Entry, NopRecorder) instead of a shared top-of-file var block - cloudhypervisor/utils: move chMemoryRestoreMode below const/var (imports -> const -> var -> types) - oci/cloudimg image: keep imageIndex and imageEntry each adjacent to their own method set; leaf/vocabulary types trail - types/vm: move VMConfig.Validate next to VMConfig (was split off by the whole VM type in between) - cloudhypervisor/clone_test: drop bare function-name section labels
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.
Follow-up to the updated code standard: a full audit of all 244 non-vendor Go files, applied as two layout/comment-only commits with zero behavior change.
Commit 1 — godoc
+15 lines, comments only. Adds godoc to exported types,
Newconstructors, and methods whose documented siblings made the omission an inconsistency (e.g.Ops.Listbetween documentedInspect/Delete,DirectRestorenext to documentedDirectClone). Deliberately NOT covered: interface-implementing methods (the interface documents the contract), consistent accessor/skip-all files, and build-tag stub twins.Commit 2 — declaration layout
Pure moves and comment deletions (verified per file: sorted line multiset unchanged):
Entry,NopRecorder)chMemoryRestoreModemoved below const/var (imports → const → var → types; const referencing a later-declared type matches thetypes/vm.goprecedent)imageIndexandimageEntryeach kept adjacent to their own method set; leaf types trailVMConfig.Validatemoved next toVMConfig(was split off by the wholeVMblock)Deliberately unchanged
extend/fs·vfio·netresize+utils/process_linux: consistent existing design (Spec leads → vocabulary types → methods); reshuffling adds churn without clarityFinalizeClonecallers all pass&types.VM{...}literals andGetRecordnil-checks;ToVMis reached only viaResolveRef(every branch requires a non-nil record) orMapValues(skips nil entries)Verification
-race)