chore: remove restate-what comments across code and tests#578
Conversation
Drop the 8 function-divider banners in BlockStore.c / FileBlockDevice.c (they only repeat the name of the function below) and the two "Little-endian read/write" comments in CircularBuffer.c (the shift expression says it). No behaviour change; the kept comments are rationale, contracts, and standards refs only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop section-divider banners that only name the block/function below
(BlockStoreTest, FileFake, FileFakeTest) and inline comments that restate
the adjacent code ("verify magic bytes", "Fill block 00 with two records",
"handleA opens file ..."). Kept comments that explain test intent or a
non-obvious mechanism: the Given/When/Then specs, the cleartext-header
note, "Covered by teardown", "Doesn't crash; nothing to assert", the
poisoned-vtable seam, and the arg-capture/failure-mode rationale dividers.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Remove the `/* <symbol> configuration|accessors|spy */` banners in the Tests/Support fake headers — they only restate the well-named Fake_Set*/CallCount declarations beneath them. The .c fakes keep their banners (they map abbreviated statics back to the faked symbol). Kept any header banner carrying extra info: getsockopt's modelled options, MqFake's one-shot semantics, the lwIP spy-capture notes, mbedTLS conf_own_cert mTLS note, OpenSSL SNI/ctrl-path notes, forward-decl and injection-seam notes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop the 6 section-divider banners in BddTargetFreeRtosPipeline.c and three Python restatements (syslog_steps.py "refresh the line count" / "Check that IDs form a contiguous ascending sequence", environment.py "Clean up any long-lived interactive process"). Kept the "Allow time for ..." sleep comments — they explain the async operation a magic time.sleep() waits on, which the code can't express — and the cross-scenario-contamination note. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (25)
💤 Files with no reviewable changes (25)
📝 WalkthroughWalkthroughThis PR removes section-divider and group-header comments across 26 files spanning production C sources ( ChangesComment Section-Header Cleanup
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
☀️ Quality Summary 🚦 build-linux-gcc: 100% successful (✔️ 1521 passed) Created by Quality Monitor v1.14.0 (#f3859fd). More details are shown in the GitHub Checks Result. |
Comment hygiene pass: remove comments that merely restate what the code does, per the Clean Code "say why, not what" principle. Pure deletions — no code/behaviour change (25 files, ~300 lines removed).
What was removed
/* ---- BlockStore_Write ---- */) + 2 "Little-endian read/write" restatements./* <symbol> configuration|accessors|spy */banners that only repeat theFake_Set*/*CallCountnames beneath them. The.cfakes keep theirs (there the banners map abbreviated statics back to the faked symbol).BddTargetFreeRtosPipeline.c+ 3 Python restatements.What was deliberately kept
RFC/MISRA/standard refs,
cppcheck-suppress/NOLINT/IWYU justifications, third-party API gotchas (lwIP/OpenSSL/Winsock quirks), ownership/contract/threshold docs, deliberately-empty-branch markers, Given/When/Then test specs, seam explanations (poisoned-vtable, injection-via-UT_PTR_SET), header banners carrying extra info (e.g. getsockopt's modelled options, MqFake one-shot semantics, mbedTLSconf_own_certmTLS note, OpenSSL SNI path), the magic-sleep()purpose comments, and test-intent notes ("Covered by teardown", "Doesn't crash; nothing to assert").Verification
LwipTcpFake.h).Platform/*/Source/trees) — an environment gap, not a regression. No comment-only change can introduce a MISRA finding, and none of the modified files touchPlatform/. CI'sanalyze-cppcheck(full toolchain) is the authority.🤖 Generated with Claude Code
Summary by CodeRabbit
Note: No functional changes, features, or bug fixes included in this release.