Repository navigation
docs(cmd): tighten and cut comments - #692
Merged
Merged
Conversation
Shorten the comments in the root agent.go, approval/, session/ and the larger cmd/flynn files so each states what the code does not: the invariant, the failure guarded against, or the reason for an order. Comments that restated the code are deleted; exported names keep a one-line doc. The parsed code is unchanged: every touched file prints identically with comments stripped. The comment baseline loses the entries for the files fixed here. Signed-off-by: Ion Alpha <contact@ionalpha.io>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What
Shortens the comments in the root
agent.go,approval/,session/and the largercmd/flynnfiles so each one states something the code does not, and deletes the comments that restated the code. Comment lines across these packages drop from 5148 to 4414. The comment baseline loses the 19 entries for the files fixed here.Why
Doc comments are the published API reference, and restatement buries the invariants, failure modes and ordering reasons a reader needs. The comment gate also still carried baseline exemptions for banned words and over-long blocks in these files.
How to verify
Parsing each touched file at
mainand on this branch without comments and comparing thego/printeroutput gives identical results for all 32 Go files, so no code changed.go test ./internal/rigor/...passes with the reduced baseline, and putting a banned word back intocmd/flynn/tui.gomakes it fail../dev/lintreports 0 issues, and./dev/test . ./cmd/... ./session/... ./approval/...passes.Notes for reviewers
Exported names keep a one-line doc, with wording that adds to the signature where there was something to add. About 60 smaller
cmd/flynnfiles are untouched apart from targeted fixes for baseline entries; they can follow in a separate change.