aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-11 15:24:42 -0500
committerCraig Jennings <c@cjennings.net>2026-05-11 15:24:42 -0500
commit571494b81e4608f8479bb8c761183b1d28798ca0 (patch)
tree3f8cde8813b74d5c24631f0a3e1b114f842022d6 /scripts
parent54845d38cc3ed8ca5b1093eb7a44d3db9db8f22d (diff)
downloadrulesets-571494b81e4608f8479bb8c761183b1d28798ca0.tar.gz
rulesets-571494b81e4608f8479bb8c761183b1d28798ca0.zip
feat(todo-cleanup): add --archive-done mode with ERT test suite
--archive-done moves every level-2 subtree whose TODO state is DONE or CANCELLED out of the "Open Work" section into the "Resolved" section of the same org file, subtree intact. Sections match on a unique level-1 heading containing "Open Work" (case-insensitive) and one containing "Resolved"; a missing or ambiguous section skips the file with a message rather than crashing. Only direct level-2 children move. A DONE entry nested under an open parent stays put. Opt-in, never run by default, doesn't also run the hygiene passes; --check previews without writing. The CLI dispatch moved into tc-main behind a guard so the new ERT suite can require the file without firing it. Hygiene mode is unchanged. 13 ERT cases (the repo's first elisp tests) cover the move and the stay-put cases, EOF with no final newline, missing or ambiguous sections, lowercase headings, idempotency, and --check. tests/fixtures/todo-sample.org is the synthetic sample, and the Makefile test target now runs the ERT suites alongside pytest.
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions