Add TODO/FIXME drift checker and fix checker count docs - #60
Conversation
theDakshJaitly
left a comment
There was a problem hiding this comment.
Thanks for this, @advancedresearcharray — and welcome! Really nice first contribution. It's clear you studied the existing checkers: the signature, the swallow-on-unreadable try/catch, and the index.ts registration all match the house style exactly, and you reconciled the checker count cleanly (the README table was actually missing tool-config-sync and undercounting — you fixed both and landed at 10). Tests cover all the acceptance criteria, and I ran typecheck / test (169 passing) / build locally — all green.
Approving. I've left a couple of non-blocking notes inline — purely optional follow-ups, nothing that should hold up the merge. Thanks again for picking up a good-first-issue and seeing it through.
| import { relative } from "node:path"; | ||
| import type { DriftIssue } from "../../types.js"; | ||
|
|
||
| const MARKER_RE = /\b(TODO|FIXME)\b/g; |
There was a problem hiding this comment.
Non-blocking, just flagging two behaviors of the match for posterity:
- False positives: this matches
TODO/FIXMEliterally anywhere, including inside fenced code blocks or apatterns/*.mdthat documents the convention (e.g. an example showing// TODO). That's exactly what Add a TODO/FIXME drift checker #54 asked for (warning per occurrence), so it's correct as-is — just noting that code-fence/inline-code skipping could be a nice v2 to cut noise. - Case-sensitive: only uppercase
TODO/FIXMEmatch;todo/Fixmeare ignored. That's the conventional marker form, so probably intended — confirming it was a deliberate choice.
(FYI the MARKER_RE.lastIndex = 0 reset per line is a good defensive touch on a reused /g regex.)
|
|
||
| const MARKER_RE = /\b(TODO|FIXME)\b/g; | ||
|
|
||
| /** Scan scaffold markdown for unresolved TODO/FIXME markers. */ |
There was a problem hiding this comment.
Tiny cosmetic note: the comment says "scaffold markdown," but scaffoldFiles can include root .cursorrules / .windsurfrules, which aren't markdown. Harmless — the warning message reads fine either way.
Closes #54
Closes #49
Summary
checkTodoFixme— warns on unresolvedTODO/FIXMEmarkers in scaffold markdown (file + line).TODO_FIXMEissue code and remediation hint.Test plan
npm run typecheck && npm test && npm run build