Data-Liberation-Front / csvlint.rb

The gem behind http://csvlint.io
MIT License
287 stars 88 forks source link

Header error detection #96

Open Floppy opened 10 years ago

Floppy commented 10 years ago

A few suggestions for detecting errors in headers are in https://github.com/jekyll/jekyll/pull/2761, from @paulfitz. Might be nice to integrate.

I think it'd definitely be reasonable to treat the following cases as errors:

Blank cells in the alleged header.
Repeated cells in the alleged header.
Numeric-looking cells (integer, float) in the alleged header (this one is a bit less reasonable than the first two, but would catch a lot more headerless CSV files).

Anything that tries to be much smarter than that, it'd be great to have a configuration switch to turn off for when predictability is important.