joereynolds / joereynolds/sql-lint
Check: Invalid date format
- Dominant language
- TypeScript
- Stars
- 459
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
On columns that specify a `datetime` or `date`, warn of an invalid date. We should also do this on date and time functions,
Sample output:
```
Invalid date '45/67/2018' specified for column 'purchase_date'
```
```
Invalid date '45/67/2018' given for call to 'DATEDIFF'
```
See the list here:
https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html
- [x] - Create a new directory `src/syntax`. The `syntax` directory should be responsible for holding all keywords, functions, operators etc... of the language
- [x] - Move `Keywords.ts` into this directory
- [x] - Create a new directory `src/syntax/{driver}/functions/datetime/`
- [x] - Create a file in here `src/syntax/{driver}/functions/datetime/functions.ts`
Note the `{driver}` part of the path. This can be any valid driver supported by `sql-lint`, for now, just do `mysql`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.