MichaelXavier / cron

Cron data structure and parser for Haskell
Other
53 stars 33 forks source link

Can I check cron tab syntax? #56

Open schoettl opened 1 month ago

schoettl commented 1 month ago

Hi, I just thought I use this parser to check if some cron tabs have valid syntax but then noticed that the parser never fails.

For example, I can successfully parse a haskell source file.

I guess this is intended? Is there still a way to check if a cron tab is valid?

MichaelXavier commented 4 weeks ago

I think it might be a bug in the parser. i'm pretty sure cron files can have blank lines, comments, env var sets and cron lines. I suspect the parser is probably stopping on unknown lines or something. I'm not sure if I'll have time any time soon to check into this but I'd happily review an MR. Seems like it could be easy to write a test for too.