Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use type validations to check consistency #77

Merged
merged 4 commits into from
Feb 27, 2014

Conversation

pezholio
Copy link
Contributor

Fixes #32 (I think)

As suggested by @ldodds. we're now using the TYPE_VALIDATIONS constant used for schemas to check cell formatting.

Currently checks for:

  • Strings
  • Integers
  • URIs
  • DateTimes
  • Dates
  • Times

This could possibly be improved by perhaps checking against common date / datetime formats and raise a warning if they don't match.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 485352d on feature-32-improve-consistency-checks into c0ee948 on master.

@pezholio
Copy link
Contributor Author

OK, so I've added Date / DateTime checking. Using ActiveSupport we now match against the date formats that ActiveSupport knows about and check they are mostly the same. If not, it raises an warning. We can also add date formats as per https://github.com/theodi/csvlint.rb/blob/feature-32-improve-consistency-checks/lib/csvlint/types.rb#L33

Floppy added a commit that referenced this pull request Feb 27, 2014
@Floppy Floppy merged commit 01bb95d into master Feb 27, 2014
@Floppy Floppy deleted the feature-32-improve-consistency-checks branch February 27, 2014 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent values due to number format differences
3 participants