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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user