fix(parser): warn instead of silently dropping tasks with invalid due dates

A malformed due: value (e.g. due:2024-13-99) left DueDate nil, causing
ToRemind to silently emit nothing for that task. Now ParseLine reports
an error so the problem surfaces on stderr instead of vanishing.

Also fixes staticcheck QF1012 (WriteString(Sprintf(...)) -> Fprintf)
flagged by the IDE in ToRemind.
This commit is contained in:
2026-07-09 23:54:47 +02:00
parent d692fa5a4c
commit 096216579d
2 changed files with 22 additions and 11 deletions

View File

@@ -73,6 +73,9 @@ X 2012-01-01 Make resolutions
(A) 2024-13-99 Call Mom
x 2024-99-99 Call Mom
# Malformed: due date with invalid format (should error, task dropped from output)
(A) Call Mom due:2024-13-99
# Malformed: key:value with whitespace in key or value
foo bar:baz
foo:bar baz