Skip to content

chore: block comments that describe the edit history - #130

Merged
BartWaardenburg merged 1 commit into
mainfrom
chore/comment-history-check
Nov 5, 2026
Merged

BartWaardenburg merged 1 commit into
mainfrom
chore/comment-history-check

Conversation

@BartWaardenburg

Copy link
Copy Markdown
Contributor

What

  • Replace scripts/check-comment-quality.mjs and its tests with the current fallow version. The check now also blocks comments that describe the edit history, for example "used to be", "the old behavior" or "as requested in review".
  • Add the Claude Code PreToolUse and Stop hooks in .claude/settings.json. The hooks run the same script on new comments.
  • Add the "Write for the reader" rule to AGENTS.md.
  • Rename the CI step to "Comment quality guard" and update the Quality gates table in CONTRIBUTING.md.

Why

A comment that describes the edit history only makes sense to the person who made the edit. fallow-rs/fallow#4227 added this check to fallow. This change keeps the copy in this repository the same.

Test plan

  • node --test scripts/check-comment-quality.test.mjs
  • node scripts/check-comment-quality.mjs --all (no findings)
  • npm run test:scripts
  • npm run lint:js and npm run fmt:js:check
  • node scripts/check-file-size.mjs --base origin/main
  • typos and python3 scripts/scan-hidden-unicode.py --mode committed
  • .claude/settings.json is valid JSON

Changelog

No fragment. The change touches only repository tooling, so a user cannot see it.

Not in this change

No follow-up planned.

Replace scripts/check-comment-quality.mjs with the current fallow
version. The check now also blocks comments that describe the edit
history, for example "used to be" or "as requested in review".

Add the Claude Code PreToolUse and Stop hooks in .claude/settings.json.
Add the "Write for the reader" rule to AGENTS.md. Rename the CI step to
"Comment quality guard".

Signed-off-by: Bart Waardenburg <bart@waardenburg.dev>
@BartWaardenburg
BartWaardenburg enabled auto-merge (squash) November 5, 2026 10:03
@BartWaardenburg
BartWaardenburg merged commit 39977c8 into main Nov 5, 2026
23 checks passed
@BartWaardenburg
BartWaardenburg deleted the chore/comment-history-check branch November 5, 2026 17:43
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