Repository navigation
chore: block comments that describe the edit history - #130
Merged
Merged
Conversation
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>
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.
What
scripts/check-comment-quality.mjsand 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".PreToolUseandStophooks in.claude/settings.json. The hooks run the same script on new comments.AGENTS.md.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.mjsnode scripts/check-comment-quality.mjs --all(no findings)npm run test:scriptsnpm run lint:jsandnpm run fmt:js:checknode scripts/check-file-size.mjs --base origin/maintyposandpython3 scripts/scan-hidden-unicode.py --mode committed.claude/settings.jsonis valid JSONChangelog
No fragment. The change touches only repository tooling, so a user cannot see it.
Not in this change
No follow-up planned.