[tooling] check_conventions.py copy rule can't see block comments, so ReconstructedResume.tsx always trips it
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python, typescript
- Domain
- tooling
Research direction
Start in scripts/hooks/check_conventions.py at copy-discipline check 2 and its strip_line_comments(contents) call. Inspect src/components/features/ReconstructedResume.tsx around line 873 to reproduce the false positive, then run the convention check. Done means both // and /* */ comments are ignored while exactly or precisely in JSX strings and user-facing literals still trigger the rule.
Written by the indexing model from the issue text.
Description
scripts/hooks/check_conventions.py's copy-discipline rule (check 2: forbid exactly / precisely in user-facing files) calls strip_line_comments(contents) before scanning — so a // comment is correctly ignored, but a /* */ block comment is not.
src/components/features/ReconstructedResume.tsx contains "exactly" inside a docblock (~line 873, pre-existing on main), so the hook fires on any edit to that file regardless of what the edit does.
Why it is worth fixing rather than tolerating
Observed consequence during #958: an implementing agent edited an unrelated, pre-existing // comment — deleting the word "exactly" from a #672 explanation — to appease a rule that was not even looking at it. That is the failure mode this repo has a written norm against: enforce by config, not by having humans (or agents) tidy around a tool. A check that fires on a file for reasons unrelated to the current change trains people to work around it.
The rule itself is good and should stay — it encodes a real copy standard (feedback_no_false_precision_in_parser_copy). The bug is only that its scanner cannot see block comments.
Proposed fix
Strip /* */ blocks as well as // lines before the regex scan, so the check tests copy rather than prose about copy. JSX text is what it exists to police.
Acceptance criteria
- The rule ignores
exactly/preciselyinside both comment styles. - It still fires on the same word in a JSX string or user-facing literal.
- Editing
ReconstructedResume.tsxno longer trips it for an unrelated reason.
- Dominant language
- TypeScript
- Stars
- 11
- Forks
- 4
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 40
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from offlinecv/OfflineCV
-
chore
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
testing
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
improvement ux:edit-export
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
refactor testing
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 92/100
All issues in offlinecv/OfflineCV
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
receptron/mulmoterminal#2264 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
components-web-app/docs#96 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
simonsobs/tileviewer#114 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100