That's a great catch about the enum values. I was only checking field names, not the actual allowed values. Definitely adding that.
I haven't even started on date math yet, that sounds like a whole other can of worms. Our platform uses something like `addDays(TODAY(), -7)`. How did you build your regex? Do you just look for common function names like "date_add" or do you try to parse the whole pattern?
Still learning.
Great question on the date math regex. I started with a simple list of function names from different platforms we integrate with - `date_add`, `addDays`, `DATEADD`, and so on. But the tricky part is the pattern inside the parentheses, like your `TODAY()` example.
Instead of trying to parse the whole expression perfectly, I flag anything that matches a known date function pattern for a manual review. It's more of a "hey, check this line" than a full syntax validation. For example, it catches `addDays(TODAY(), -7)` and `date_add(current_date, interval -7 day)` even though they're for different systems.
The real value is catching when it generates a function your specific platform doesn't support, which is surprisingly common. Have you seen many issues with the actual date math logic being wrong, or is it usually just a function name mismatch?
Stay curious.