Closed lukasdietrich closed 2 years ago
Thank you for your contribution!
The sanity check is a useful features. But as I have already mentioned in person, I still had some minor issues with the first implementation.
First, your implementation assumed that the activities in the file would be in chronological order. This in normally the case, especially if the file has never been touched by hand, but this has not been a hard requirement before. So we should not make this a requirement now.
Secondly, activities that overlap or have negative duration may contain logical errors, but these are definitely not parsing errors. So I would not check them during activity parsing and would not check for them in the check
command which should only check for parsing errors.
I have modified your solution a little and moved the sanity checks into a new subcommand sanity
. This command reports any activity with the logical errors.
Hello Stranger from the internet,
with this pull request I propose a sanity check for the start- and endtimes of activities.
It checks for two things:
Errors are reported in
bartib check
. Additionally a warning is printed whenever the list of activies is parsed.Big thanks for the project und bis Morgen !